| 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(
|
|
|