summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorJoonyoung Shim <jy0922.shim@samsung.com>2016-08-11 14:02:28 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:52:25 +0900
commit52b3332c830bdba63d0a3f349798666bc02bb091 (patch)
tree29e2b261279748c5991a6f2e125e5ba63202b188 /drivers/gpu/drm
parent2e3fa49e386b18689abe961b4ad0ad87792d5eed (diff)
drm/exynos: workaround to permit O_RDWR of dma-buf
It is possible for userspace to mmap() directly by the commit bfe981a09528 ("drm: prime: Honour O_RDWR during prime-handle-to-fd") but userspace using DRM_IOCTL_PRIME_HANDLE_TO_FD should be modified as adding DRM_RDWR flag. This patch permits O_RDWR of dma-buf as workaround until all tizen kernel applies the commit bfe981a09528 ("drm: prime: Honour O_RDWR during prime-handle-to-fd") userspace uses DRM_RDWR flag on DRM_IOCTL_PRIME_HANDLE_TO_FD to mmap() dma-buf directly. Change-Id: I29e86e98cece1fb84af35b2333c998525a94a381 Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_dmabuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
index 73749226cac8..f5eb2ff84c95 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
@@ -237,7 +237,7 @@ struct dma_buf *exynos_dmabuf_prime_export(struct drm_device *drm_dev,
exp_info.ops = &exynos_dmabuf_ops;
exp_info.size = exynos_gem_obj->base.size;
- exp_info.flags = flags;
+ exp_info.flags = flags | O_RDWR;
exp_info.priv = obj;
return dma_buf_export(&exp_info);