Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Unified Diff: ui/ozone/platform/drm/host/drm_display_host_manager.cc

Issue 1071273002: NotForReview: Implement zero/one-copy texture for ozone freon using Intel DRM Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after ClientNativePixmap is introduced Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/drm/host/drm_display_host_manager.h ('k') | ui/ozone/public/ozone_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/host/drm_display_host_manager.cc
diff --git a/ui/ozone/platform/drm/host/drm_display_host_manager.cc b/ui/ozone/platform/drm/host/drm_display_host_manager.cc
index 0305559fbe6dc5f2be5afa5377042504b7fa6f35..24846d9b5d191466d6aa18d7165336781f1fc650 100644
--- a/ui/ozone/platform/drm/host/drm_display_host_manager.cc
+++ b/ui/ozone/platform/drm/host/drm_display_host_manager.cc
@@ -23,6 +23,9 @@
#include "ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h"
#include "ui/ozone/platform/drm/host/drm_native_display_delegate.h"
+#include "base/command_line.h"
+#include "ui/ozone/public/ozone_switches.h"
+
namespace ui {
namespace {
@@ -31,6 +34,7 @@ typedef base::Callback<void(const base::FilePath&, scoped_ptr<DrmDeviceHandle>)>
OnOpenDeviceReplyCallback;
const char kDefaultGraphicsCardPattern[] = "/dev/dri/card%d";
+const char kDefaultRenderNodePattern[] = "/dev/dri/renderD128";
const char kVgemDevDriCardPath[] = "/dev/dri/";
const char kVgemSysCardPath[] = "/sys/bus/platform/devices/vgem/drm/";
@@ -129,6 +133,13 @@ DrmDisplayHostManager::DrmDisplayHostManager(
}
drm_devices_.insert(primary_graphics_card_path_);
+ int fd = HANDLE_EINTR(open(kDefaultRenderNodePattern, O_RDWR | O_CLOEXEC));
+ if (fd < 0) {
+ PLOG(ERROR) << "Failed to open primary render node: "
+ << kDefaultRenderNodePattern;
+ }
+ primary_render_node_file_.reset(fd);
+
vgem_card_path_ = GetVgemCardPath();
if (!vgem_card_path_.empty()) {
int fd = HANDLE_EINTR(
« no previous file with comments | « ui/ozone/platform/drm/host/drm_display_host_manager.h ('k') | ui/ozone/public/ozone_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698