diff mbox series

[15/20] drm/i915/gt: Use built-in active intel_context reference

Message ID 20200511075722.13483-15-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [01/20] drm/i915/gt: Mark up the racy read of execlists->context_tag | expand

Commit Message

Chris Wilson May 11, 2020, 7:57 a.m. UTC
Since a few rearragements ago, we have an explicit reference to the
containing intel_context from inside the active reference and can drop
our own reference handling dancing around releasing the i915_active.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_context.c | 8 --------
 1 file changed, 8 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_context.c b/drivers/gpu/drm/i915/gt/intel_context.c
index e4aece20bc80..e9b754b317bb 100644
--- a/drivers/gpu/drm/i915/gt/intel_context.c
+++ b/drivers/gpu/drm/i915/gt/intel_context.c
@@ -155,15 +155,7 @@  void intel_context_unpin(struct intel_context *ce)
 	CE_TRACE(ce, "unpin\n");
 	ce->ops->unpin(ce);
 
-	/*
-	 * Once released, we may asynchronously drop the active reference.
-	 * As that may be the only reference keeping the context alive,
-	 * take an extra now so that it is not freed before we finish
-	 * dereferencing it.
-	 */
-	intel_context_get(ce);
 	intel_context_active_release(ce);
-	intel_context_put(ce);
 }
 
 static int __context_pin_state(struct i915_vma *vma)