[Intel-gfx] [PATCH 3/5] drm/i915: Detach from timeline after all barries in i915_request_retire

Chris Wilson chris at chris-wilson.co.uk
Fri Nov 22 11:21:50 UTC 2019


I can't explain it, but this did improve its first and only test run.
Maybe it was a fluke, maybe I need to understand the barrier (engine-pm
and timelines->lock) and how that is interacting with engine_retire and
intel_gt_retire_requests()...

Hopefully the last hurdle. Also wouldn't mind if it failed so I didn't
have to find the explanation...
---
 drivers/gpu/drm/i915/i915_request.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index a558f64186fa..1b8e6827461a 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -269,12 +269,12 @@ bool i915_request_retire(struct i915_request *rq)
 	GEM_BUG_ON(!list_empty(&rq->execute_cb));
 	spin_unlock_irq(&rq->lock);
 
-	remove_from_client(rq);
-	list_del(&rq->link);
-
 	intel_context_exit(rq->hw_context);
 	intel_context_unpin(rq->hw_context);
 
+	remove_from_client(rq);
+	list_del(&rq->link);
+
 	free_capture_list(rq);
 	i915_sched_node_fini(&rq->sched);
 	i915_request_put(rq);
-- 
2.24.0



More information about the Intel-gfx mailing list