-
-
Save tiagovignatti/a8f26843e4eb63f1cb6d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ui/ozone/platform/drm/gpu/client_native_pixmap_vgem.cc b/ui/ozone/platform/drm/gpu/client_native_pixmap_vgem.cc | |
index 0b3d145..0d73fb0 100644 | |
--- a/ui/ozone/platform/drm/gpu/client_native_pixmap_vgem.cc | |
+++ b/ui/ozone/platform/drm/gpu/client_native_pixmap_vgem.cc | |
@@ -6,9 +6,14 @@ | |
#include <fcntl.h> | |
#include <sys/mman.h> | |
-#include <vgem_drm.h> | |
#include <xf86drm.h> | |
+#define LOCAL_DRM_VGEM_MODE_MAP_DUMB 0x00 | |
+ | |
+#define LOCAL_DRM_IOCTL_VGEM_MODE_MAP_DUMB \ | |
+ DRM_IOWR(DRM_COMMAND_BASE + LOCAL_DRM_VGEM_MODE_MAP_DUMB, struct drm_mode_map_dumb) | |
+ | |
+ | |
#include "base/process/memory.h" | |
#include "base/trace_event/trace_event.h" | |
@@ -56,7 +61,7 @@ void* ClientNativePixmapVgem::Map() { | |
mmap_arg.handle = vgem_bo_handle_; | |
size_t size = stride_ * size_.height(); | |
- int ret = drmIoctl(vgem_fd_, DRM_IOCTL_VGEM_MODE_MAP_DUMB, &mmap_arg); | |
+ int ret = drmIoctl(vgem_fd_, LOCAL_DRM_IOCTL_VGEM_MODE_MAP_DUMB, &mmap_arg); | |
if (ret) { | |
PLOG(ERROR) << "fail to map a vgem buffer."; | |
base::TerminateBecauseOutOfMemory(size); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment