aboutsummaryrefslogtreecommitdiffstats
path: root/omap/omap_drm.c
diff options
context:
space:
mode:
authorHemant Hariyani <hemanthariyani@ti.com>2019-04-24 10:08:41 -0700
committerEmil Velikov <emil.l.velikov@gmail.com>2019-04-25 10:58:27 +0100
commit357ef598827ee93a21a8410080f2528b6fb14a26 (patch)
tree21848c4852b2adcfbba04dec633e1a828eae418b /omap/omap_drm.c
parent763f646d7fee7c2457469d681b97029d4fd5e9d4 (diff)
downloadexternal_libdrm-357ef598827ee93a21a8410080f2528b6fb14a26.tar.gz
external_libdrm-357ef598827ee93a21a8410080f2528b6fb14a26.tar.bz2
external_libdrm-357ef598827ee93a21a8410080f2528b6fb14a26.zip
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 <seanpaul@chromium.org> Cc: Alistair Strachan <astrachan@google.com> Cc: Marissa Wall <marissaw@google.com> Acked-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com> [picked and updated commitmsg from http://git.ti.com/cgit/cgit.cgi/android/external-libdrm.git/] Signed-off-by: Praneeth Bajjuri <praneeth@ti.com> Signed-off-by: Alistair Strachan <astrachan@google.com> [jstultz: Tweaked commit message] Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'omap/omap_drm.c')
-rw-r--r--omap/omap_drm.c2
1 files changed, 1 insertions, 1 deletions
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;