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

Unified Diff: ui/ozone/platform/drm/common/client_native_pixmap_dmabuf.cc

Issue 2488673003: Ozone DRM: Improve inclusions of hardcoded definitions for dma-buf. (Closed)
Patch Set: Use correct version of Linux. Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/common/client_native_pixmap_dmabuf.cc
diff --git a/ui/ozone/platform/drm/common/client_native_pixmap_dmabuf.cc b/ui/ozone/platform/drm/common/client_native_pixmap_dmabuf.cc
index 8c1be5e4cda781592a9a21d75961466d5ff60c7a..7dbb1d481a628d26765811c099b8534a0bba51e5 100644
--- a/ui/ozone/platform/drm/common/client_native_pixmap_dmabuf.cc
+++ b/ui/ozone/platform/drm/common/client_native_pixmap_dmabuf.cc
@@ -5,6 +5,7 @@
#include "ui/ozone/platform/drm/common/client_native_pixmap_dmabuf.h"
#include <fcntl.h>
+#include <linux/version.h>
#include <stddef.h>
#include <sys/mman.h>
#include <xf86drm.h>
@@ -13,9 +14,7 @@
#include "base/process/memory.h"
#include "base/trace_event/trace_event.h"
-#if defined(USE_OZONE)
-// TODO(vignatti): replace the local definitions below with #include
-// <linux/dma-buf.h> once kernel version 4.6 becomes widely used.
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
#include <linux/types.h>
struct local_dma_buf_sync {
@@ -32,6 +31,9 @@ struct local_dma_buf_sync {
#define LOCAL_DMA_BUF_BASE 'b'
#define LOCAL_DMA_BUF_IOCTL_SYNC \
_IOW(LOCAL_DMA_BUF_BASE, 0, struct local_dma_buf_sync)
+
+#else
+#include <linux/dma-buf.h>
#endif
namespace ui {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698