Skip to content

Commit

Permalink
drm/vc4: Add a getparam to signal support for branches.
Browse files Browse the repository at this point in the history
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 7363cee)
  • Loading branch information
anholt committed Aug 15, 2016
1 parent c7ffcfa commit a3c0391
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/vc4/vc4_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,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;
Expand Down
1 change: 1 addition & 0 deletions include/uapi/drm/vc4_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a3c0391

Please sign in to comment.