[PATCH 1/3] drm/exynos: correct dma_buf exporter permission as ReadWrite

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

 



Set dma_buf exporter permission as ReadWrite, otherwise mmap will get
errno 13: permission denied.

Signed-off-by: Cooper Yuan <cooperyuan@xxxxxxxxx>
---
 drivers/gpu/drm/exynos/exynos_drm_dmabuf.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
index 613bf8a..e4eeb0b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
@@ -29,6 +29,7 @@
 #include "exynos_drm_drv.h"
 #include "exynos_drm_gem.h"

+#include <linux/fcntl.h>
 #include <linux/dma-buf.h>

 static struct sg_table *exynos_pages_to_sg(struct page **pages, int nr_pages,
@@ -179,7 +180,7 @@ struct dma_buf *exynos_dmabuf_prime_export(struct
drm_device *drm_dev,
 	struct exynos_drm_gem_obj *exynos_gem_obj = to_exynos_gem_obj(obj);

 	return dma_buf_export(exynos_gem_obj, &exynos_dmabuf_ops,
-				exynos_gem_obj->base.size, 0600);
+				exynos_gem_obj->base.size, O_RDWR);
 }

 struct drm_gem_object *exynos_dmabuf_prime_import(struct drm_device *drm_dev,
-- 
1.7.0.4
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://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