diff options
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_execbuffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 981e14f000e3..5af631e788c8 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | |||
@@ -1228,6 +1228,10 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, | |||
1228 | } | 1228 | } |
1229 | } | 1229 | } |
1230 | 1230 | ||
1231 | ret = i915_switch_context(ring, file, ctx_id); | ||
1232 | if (ret) | ||
1233 | goto err; | ||
1234 | |||
1231 | if (ring == &dev_priv->ring[RCS] && | 1235 | if (ring == &dev_priv->ring[RCS] && |
1232 | mode != dev_priv->relative_constants_mode) { | 1236 | mode != dev_priv->relative_constants_mode) { |
1233 | ret = intel_ring_begin(ring, 4); | 1237 | ret = intel_ring_begin(ring, 4); |
@@ -1249,10 +1253,6 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, | |||
1249 | goto err; | 1253 | goto err; |
1250 | } | 1254 | } |
1251 | 1255 | ||
1252 | ret = i915_switch_context(ring, file, ctx_id); | ||
1253 | if (ret) | ||
1254 | goto err; | ||
1255 | |||
1256 | trace_i915_gem_ring_dispatch(ring, seqno); | 1256 | trace_i915_gem_ring_dispatch(ring, seqno); |
1257 | 1257 | ||
1258 | exec_start = batch_obj->gtt_offset + args->batch_start_offset; | 1258 | exec_start = batch_obj->gtt_offset + args->batch_start_offset; |