diff options
author | Rob Clark <robdclark@gmail.com> | 2016-04-23 10:08:59 -0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-09-15 17:21:13 -0400 |
commit | d9c181e22a0599fa7e27c3717f56bc1b3b020e63 (patch) | |
tree | e95318f3dc683b374328a0523bde3f80b8d0084b /drivers/gpu/drm/msm/msm_gem_submit.c | |
parent | 1d42a3fee6e83ae6e7c83808ccdf8620fc30447e (diff) | |
download | linux-d9c181e22a0599fa7e27c3717f56bc1b3b020e63.tar.bz2 |
drm/msm: extend the submit ioctl to pass in flags
We'll want to be able to pass in flags, such as asking for explicit
fencing, and possibly other things down the road. Fortunately we
don't need a full 32b for the pipe-id. So use the upper 16 bits
for flags (which could be extended or reduced later if needed, so
start adding flags from the high bits).
Since anything with the upper bits set would not be a valid pipe-id,
an old userspace would not set any of the upper bits, and an old
kernel would reject it as an invalid pipe-id.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gem_submit.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem_submit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index 9766f9ae4b7d..0b96d85d99f9 100644 --- a/drivers/gpu/drm/msm/msm_gem_submit.c +++ b/drivers/gpu/drm/msm/msm_gem_submit.c @@ -370,7 +370,10 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data, /* for now, we just have 3d pipe.. eventually this would need to * be more clever to dispatch to appropriate gpu module: */ - if (args->pipe != MSM_PIPE_3D0) + if (MSM_PIPE_ID(args->flags) != MSM_PIPE_3D0) + return -EINVAL; + + if (MSM_PIPE_FLAGS(args->flags) & ~MSM_SUBMIT_FLAGS) return -EINVAL; ret = mutex_lock_interruptible(&dev->struct_mutex); |