diff mbox series

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

Message ID 20191122112152.660743-3-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [1/5] drm/i915/selftests: Force bonded submission to overlap | expand

Commit Message

Chris Wilson Nov. 22, 2019, 11:21 a.m. UTC
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 mbox series

Patch

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);