aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0450-drm-vc4-Fix-ioctl-permissions-for-render-nodes.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2016-12-02 11:50:26 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2016-12-04 12:32:04 +0100
commit011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e (patch)
treebe53d4f11f7625508ee3aea9889e854ab5b5f263 /target/linux/brcm2708/patches-4.4/0450-drm-vc4-Fix-ioctl-permissions-for-render-nodes.patch
parent4257f6548b9480cdb436115b63d5c134c5e91303 (diff)
downloadupstream-011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e.tar.gz
upstream-011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e.tar.bz2
upstream-011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e.zip
brcm2708: update linux 4.4 patches to latest version
As usual these patches were extracted and rebased from the raspberry pi repo: https://github.com/raspberrypi/linux/tree/rpi-4.4.y Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0450-drm-vc4-Fix-ioctl-permissions-for-render-nodes.patch')
-rw-r--r--target/linux/brcm2708/patches-4.4/0450-drm-vc4-Fix-ioctl-permissions-for-render-nodes.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0450-drm-vc4-Fix-ioctl-permissions-for-render-nodes.patch b/target/linux/brcm2708/patches-4.4/0450-drm-vc4-Fix-ioctl-permissions-for-render-nodes.patch
new file mode 100644
index 0000000000..5ba6969870
--- /dev/null
+++ b/target/linux/brcm2708/patches-4.4/0450-drm-vc4-Fix-ioctl-permissions-for-render-nodes.patch
@@ -0,0 +1,39 @@
+From 590e54b9ca38b0700b1b61cdd414205cdc3eef8b Mon Sep 17 00:00:00 2001
+From: Herve Jourdain <herve.jourdain@neuf.fr>
+Date: Wed, 1 Jun 2016 02:24:46 +0800
+Subject: [PATCH] drm/vc4: Fix ioctl permissions for render nodes.
+
+Contrary to other flags to DRM_IOCTL_DEF_DRV(), which restrict usage,
+the flag for render node is an enabler (the IOCTL can't be used from
+render node if it's not present). So DRM_RENDER_ALLOW needs to be
+added to all the flags that were previously 0.
+
+Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
+Reviewed-by: Eric Anholt <eric@anholt.net>
+Fixes: 0cd3e2747662 ("drm/vc4: Add missing render node support")
+(cherry picked from commit b10c22e5f9902a329450c2027e9291b71e9f1602)
+---
+ drivers/gpu/drm/vc4/vc4_drv.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+--- a/drivers/gpu/drm/vc4/vc4_drv.c
++++ b/drivers/gpu/drm/vc4/vc4_drv.c
+@@ -88,12 +88,12 @@ static const struct file_operations vc4_
+ };
+
+ static const struct drm_ioctl_desc vc4_drm_ioctls[] = {
+- DRM_IOCTL_DEF_DRV(VC4_SUBMIT_CL, vc4_submit_cl_ioctl, 0),
+- DRM_IOCTL_DEF_DRV(VC4_WAIT_SEQNO, vc4_wait_seqno_ioctl, 0),
+- DRM_IOCTL_DEF_DRV(VC4_WAIT_BO, vc4_wait_bo_ioctl, 0),
+- DRM_IOCTL_DEF_DRV(VC4_CREATE_BO, vc4_create_bo_ioctl, 0),
+- DRM_IOCTL_DEF_DRV(VC4_MMAP_BO, vc4_mmap_bo_ioctl, 0),
+- DRM_IOCTL_DEF_DRV(VC4_CREATE_SHADER_BO, vc4_create_shader_bo_ioctl, 0),
++ DRM_IOCTL_DEF_DRV(VC4_SUBMIT_CL, vc4_submit_cl_ioctl, DRM_RENDER_ALLOW),
++ DRM_IOCTL_DEF_DRV(VC4_WAIT_SEQNO, vc4_wait_seqno_ioctl, DRM_RENDER_ALLOW),
++ DRM_IOCTL_DEF_DRV(VC4_WAIT_BO, vc4_wait_bo_ioctl, DRM_RENDER_ALLOW),
++ DRM_IOCTL_DEF_DRV(VC4_CREATE_BO, vc4_create_bo_ioctl, DRM_RENDER_ALLOW),
++ DRM_IOCTL_DEF_DRV(VC4_MMAP_BO, vc4_mmap_bo_ioctl, DRM_RENDER_ALLOW),
++ DRM_IOCTL_DEF_DRV(VC4_CREATE_SHADER_BO, vc4_create_shader_bo_ioctl, DRM_RENDER_ALLOW),
+ DRM_IOCTL_DEF_DRV(VC4_GET_HANG_STATE, vc4_get_hang_state_ioctl,
+ DRM_ROOT_ONLY),
+ };