[PATCH 6/6 v2] libdrm: omap: Add DRM_RDWR flag to dmabuf export

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hemant Hariyani <hemanthariyani@xxxxxx>

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: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>
Cc: Sean Paul <seanpaul@xxxxxxxxxxxx>
Cc: Alistair Strachan <astrachan@xxxxxxxxxx>
Cc: Marissa Wall <marissaw@xxxxxxxxxx>
Signed-off-by: Hemant Hariyani <hemanthariyani@xxxxxx>
[picked and updated commitmsg from http://git.ti.com/cgit/cgit.cgi/android/external-libdrm.git/]
Signed-off-by: Praneeth Bajjuri <praneeth@xxxxxx>
Signed-off-by: Alistair Strachan <astrachan@xxxxxxxxxx>
[jstultz: Tweaked commit message]
Signed-off-by: John Stultz <john.stultz@xxxxxxxxxx>
---
v2: Tweaked commit message
---
 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

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux