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

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

Issue 1124063003: drm: GPU process manages VGEM fd. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to ToT Created 5 years, 7 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
Index: ui/ozone/platform/drm/host/drm_device_handle.cc
diff --git a/ui/ozone/platform/drm/host/drm_device_handle.cc b/ui/ozone/platform/drm/host/drm_device_handle.cc
index 8d9fc0c53af256964ff95b8175229814145ae113..ccfceaa396dec491d1f001caba2ca84ab4527ab0 100644
--- a/ui/ozone/platform/drm/host/drm_device_handle.cc
+++ b/ui/ozone/platform/drm/host/drm_device_handle.cc
@@ -26,7 +26,7 @@ bool Authenticate(int fd) {
} // namespace
-DrmDeviceHandle::DrmDeviceHandle() {
+DrmDeviceHandle::DrmDeviceHandle() : is_vgem_(false) {
}
DrmDeviceHandle::~DrmDeviceHandle() {
@@ -34,9 +34,10 @@ DrmDeviceHandle::~DrmDeviceHandle() {
base::ThreadRestrictions::AssertIOAllowed();
}
-bool DrmDeviceHandle::Initialize(const base::FilePath& path) {
+bool DrmDeviceHandle::Initialize(const base::FilePath& path, bool is_vgem) {
CHECK(path.DirName() == base::FilePath("/dev/dri"));
base::ThreadRestrictions::AssertIOAllowed();
+ is_vgem_ = is_vgem;
bool print_warning = true;
while (true) {
file_.reset();
@@ -47,6 +48,8 @@ bool DrmDeviceHandle::Initialize(const base::FilePath& path) {
}
file_.reset(fd);
+ if (is_vgem_)
+ break;
if (Authenticate(file_.get()))
break;
« no previous file with comments | « ui/ozone/platform/drm/host/drm_device_handle.h ('k') | ui/ozone/platform/drm/host/drm_display_host_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698