Skip to content

Commit 2743179

Browse files
ickletursulin
authored andcommitted
drm/i915: Execlists cannot pin a context without the object
Given that the intel_lr_context_pin cannot succeed without the object, we cannot reach intel_lr_context_unpin() without first allocating that object - so we can remove the redundant test. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1456485751-15213-1-git-send-email-tvrtko.ursulin@linux.intel.com
1 parent 596c592 commit 2743179

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/gpu/drm/i915/intel_lrc.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,10 +1145,6 @@ void intel_lr_context_unpin(struct intel_context *ctx,
11451145
struct drm_i915_gem_object *ctx_obj = ctx->engine[engine->id].state;
11461146

11471147
WARN_ON(!mutex_is_locked(&ctx->i915->dev->struct_mutex));
1148-
1149-
if (WARN_ON_ONCE(!ctx_obj))
1150-
return;
1151-
11521148
if (--ctx->engine[engine->id].pin_count == 0) {
11531149
kunmap(kmap_to_page(ctx->engine[engine->id].lrc_reg_state));
11541150
intel_unpin_ringbuffer_obj(ctx->engine[engine->id].ringbuf);

0 commit comments

Comments
 (0)