From 357ef598827ee93a21a8410080f2528b6fb14a26 Mon Sep 17 00:00:00 2001 From: Hemant Hariyani Date: Wed, 24 Apr 2019 10:08:41 -0700 Subject: [PATCH] libdrm: omap: Add DRM_RDWR flag to dmabuf export Allows mmap on dmabuf fd with MAP_SHARED and PROT_WRITE. This fixes boot failures with Android (likely w/ closed source user-space drivers) that were caused due to mmap() returning error. Cc: Sean Paul Cc: Alistair Strachan Cc: Marissa Wall Acked-by: Emil Velikov Signed-off-by: Hemant Hariyani [picked and updated commitmsg from http://git.ti.com/cgit/cgit.cgi/android/external-libdrm.git/] Signed-off-by: Praneeth Bajjuri Signed-off-by: Alistair Strachan [jstultz: Tweaked commit message] Signed-off-by: John Stultz --- 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 3aed4e0a..ffacea69 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;