Skip to content

Commit

Permalink
drm/i915: Catch abuse of I915_EXEC_GEN7_SOL_RESET
Browse files Browse the repository at this point in the history
Currently we catch it, but silently succeed. Our userspace is
better than this.

v2: Add DRM_DEBUG (Chris)

Testcase: igt/gem_exec_params/sol-reset-*
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Daniel Vetter committed May 5, 2014
1 parent 48e48a0 commit 9d662da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/gpu/drm/i915/i915_gem_execbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,8 +981,10 @@ i915_reset_gen7_sol_offsets(struct drm_device *dev,
struct drm_i915_private *dev_priv = dev->dev_private;
int ret, i;

if (!IS_GEN7(dev) || ring != &dev_priv->ring[RCS])
return 0;
if (!IS_GEN7(dev) || ring != &dev_priv->ring[RCS]) {
DRM_DEBUG("sol reset is gen7/rcs only\n");
return -EINVAL;
}

ret = intel_ring_begin(ring, 4 * 3);
if (ret)
Expand Down

0 comments on commit 9d662da

Please sign in to comment.