diff options
author | Eric Anholt <eric@anholt.net> | 2016-07-02 23:14:27 +0200 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2016-07-16 00:19:51 +0200 |
commit | 7363cee5b467c31dc3af2ac98df0634bb8bbc668 (patch) | |
tree | c98b9e23f35f23be2c3b2fb7df71c417c7554b72 /drivers | |
parent | drm/vc4: Add support for branching in shader validation. (diff) | |
download | linux-7363cee5b467c31dc3af2ac98df0634bb8bbc668.tar.xz linux-7363cee5b467c31dc3af2ac98df0634bb8bbc668.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_drv.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 047d7a265ceb..9435894822d5 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -76,6 +76,9 @@ static int vc4_get_param_ioctl(struct drm_device *dev, void *data, 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; |