linux-uconsole/include/uapi/drm
Daniel Thompson ed55942044 UPSTREAM: drm: prime: Honour O_RDWR during prime-handle-to-fd
Currently DRM_IOCTL_PRIME_HANDLE_TO_FD rejects all flags except
(DRM|O)_CLOEXEC making it difficult (maybe impossible) for userspace
to mmap() the resulting dma-buf even when this is supported by the
DRM driver.

It is trivial to relax the restriction and permit read/write access.
This is safe because the flags are seldom touched by drm; mostly they
are passed verbatim to dma_buf calls.

v3 (Tiago): removed unused flags variable from drm_prime_handle_to_fd_ioctl.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1450820214-12509-2-git-send-email-tiago.vignatti@intel.com
(cherry picked from commit bfe981a095)
Signed-off-by: Brian Norris <briannorris@chromium.org>

Change-Id: Ieb3c547b1a08bd9c90fe72e0a1df1757d100aa8e
Reviewed-on: https://chrome-internal-review.googlesource.com/255266
Tested-by: Brian Norris <briannorris@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-14 09:25:43 +08:00
..
amdgpu_drm.h drm/amdgpu: update the core VI support for Stoney 2015-10-21 12:21:31 -04:00
armada_drm.h DRM: Armada: Add Armada DRM driver 2013-10-12 10:13:40 +01:00
drm.h UPSTREAM: drm: prime: Honour O_RDWR during prime-handle-to-fd 2016-04-14 09:25:43 +08:00
drm_fourcc.h drm: Use userspace compatible type in fourcc_mod_code macro 2015-11-05 14:39:55 +02:00
drm_mode.h rk: revert to v3.10 2015-11-11 15:57:28 +08:00
drm_sarea.h
exynos_drm.h drm/exynos: use drm generic mmap interface 2014-09-20 01:00:13 +09:00
i810_drm.h drm/i810_drm.h: include drm/drm.h 2015-10-16 15:51:00 +02:00
i915_drm.h drm/i915: Wa32bitGeneralStateOffset & Wa32bitInstructionBaseOffset 2015-10-01 18:12:17 +02:00
Kbuild virtio-gpu: add 3d/virgl support 2015-10-16 10:44:02 +02:00
mga_drm.h
msm_drm.h drm/msm: use __s32, __s64, __u32 and __u64 from linux/types.h for uabi 2015-06-11 13:11:05 -04:00
nouveau_drm.h drm/nouveau: remove unnecessary usage of object handles 2015-11-03 15:02:18 +10:00
omap_drm.h drm/omap: move out of staging 2013-02-16 17:38:06 -05:00
qxl_drm.h drm: add new QXL driver. (v1.4) 2013-04-12 13:51:07 +10:00
r128_drm.h r128_drm.h: include drm/drm.h 2015-10-16 15:50:59 +02:00
radeon_drm.h rk: revert to v3.10 2015-11-11 15:57:28 +08:00
rockchip_drm.h CHROMIUM: drm/rockchip: add GEM CPU acquire/release ioctls 2016-04-08 11:40:51 +08:00
savage_drm.h savage_drm.h: include <drm/drm.h> 2015-10-16 15:50:59 +02:00
sis_drm.h include/uapi/drm/sis_drm.h: move sis_file_private to drivers/gpu/drm/sis/sis_drv.h 2015-10-16 11:27:46 +10:00
tegra_drm.h rk: revert to v3.10 2015-11-11 15:57:28 +08:00
via_drm.h via_drm.h: move struct via_file_private definition to drivers/gpu/drm/via/via_drv.h 2015-10-16 11:27:49 +10:00
virtgpu_drm.h virtio-gpu: add 3d/virgl support 2015-10-16 10:44:02 +02:00
vmwgfx_drm.h drm/vmwgfx: Fix copyright headers 2015-08-12 10:06:56 -07:00