diff options
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0480-drm-vc4-Add-a-getparam-to-signal-support-for-branche.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.4/0480-drm-vc4-Add-a-getparam-to-signal-support-for-branche.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0480-drm-vc4-Add-a-getparam-to-signal-support-for-branche.patch b/target/linux/brcm2708/patches-4.4/0480-drm-vc4-Add-a-getparam-to-signal-support-for-branche.patch new file mode 100644 index 0000000000..63c0445c50 --- /dev/null +++ b/target/linux/brcm2708/patches-4.4/0480-drm-vc4-Add-a-getparam-to-signal-support-for-branche.patch @@ -0,0 +1,38 @@ +From f6b1410aedc0c8d04363a930fd70509e30e23eeb Mon Sep 17 00:00:00 2001 +From: Eric Anholt <eric@anholt.net> +Date: Sat, 2 Jul 2016 14:14:27 -0700 +Subject: [PATCH] drm/vc4: Add a getparam to signal support for branches. + +Userspace needs to know if it can create shaders that do branching. +Otherwise, for backwards compatibility with old kernels it needs to +lower if statements to conditional assignments. + +Signed-off-by: Eric Anholt <eric@anholt.net> +(cherry picked from commit 7363cee5b467c31dc3af2ac98df0634bb8bbc668) +--- + drivers/gpu/drm/vc4/vc4_drv.c | 3 +++ + include/uapi/drm/vc4_drm.h | 1 + + 2 files changed, 4 insertions(+) + +--- a/drivers/gpu/drm/vc4/vc4_drv.c ++++ b/drivers/gpu/drm/vc4/vc4_drv.c +@@ -97,6 +97,9 @@ static int vc4_get_param_ioctl(struct dr + args->value = V3D_READ(V3D_IDENT2); + pm_runtime_put(&vc4->v3d->pdev->dev); + break; ++ case DRM_VC4_PARAM_SUPPORTS_BRANCHES: ++ args->value = true; ++ break; + default: + DRM_DEBUG("Unknown parameter %d\n", args->param); + return -EINVAL; +--- a/include/uapi/drm/vc4_drm.h ++++ b/include/uapi/drm/vc4_drm.h +@@ -285,6 +285,7 @@ struct drm_vc4_get_hang_state { + #define DRM_VC4_PARAM_V3D_IDENT0 0 + #define DRM_VC4_PARAM_V3D_IDENT1 1 + #define DRM_VC4_PARAM_V3D_IDENT2 2 ++#define DRM_VC4_PARAM_SUPPORTS_BRANCHES 3 + + struct drm_vc4_get_param { + __u32 param; |