[RFC][PATCH 5/5] libdrm: omap: Add DRM_RDWR flag to dmabuf export

John Stultz john.stultz at linaro.org
Sat Apr 20 04:24:55 UTC 2019


From: Hemant Hariyani <hemanthariyani at ti.com>

Allows mmap on dmabuf fd with MAP_SHARED and PROT_WRITE.

This fixes boot failures caused due to mmap() returning error

Cc: Emil Velikov <emil.velikov at collabora.com>
Cc: Sean Paul <seanpaul at chromium.org>
Cc: Alistair Strachan <astrachan at google.com>
Cc: Marissa Wall <marissaw at google.com>
Signed-off-by: Hemant Hariyani <hemanthariyani at ti.com>
[picked and updated commitmsg from http://git.ti.com/cgit/cgit.cgi/android/external-libdrm.git/]
Signed-off-by: Praneeth Bajjuri <praneeth at ti.com>
Signed-off-by: Alistair Strachan <astrachan at google.com>
Signed-off-by: John Stultz <john.stultz at linaro.org>
---
 omap/omap_drm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/omap/omap_drm.c b/omap/omap_drm.c
index 3aed4e0..ffacea6 100644
--- a/omap/omap_drm.c
+++ b/omap/omap_drm.c
@@ -414,7 +414,7 @@ drm_public int omap_bo_dmabuf(struct omap_bo *bo)
 	if (bo->fd < 0) {
 		struct drm_prime_handle req = {
 				.handle = bo->handle,
-				.flags = DRM_CLOEXEC,
+				.flags = DRM_CLOEXEC | DRM_RDWR,
 		};
 		int ret;
 
-- 
2.7.4



More information about the dri-devel mailing list