Re: [PATCH 2/2] drm/i915: Remove the timeline as the last step of retiring

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 20/11/2019 15:21, Chris Wilson wrote:
Before we remove from the timeline, finish flushing the context state.
As the timeline may be peeked upon by another CPU, we don't want to
remove request from the timeline until we have finished working on it.

I have to ask why I'm afraid.

Regards,

Tvrtko

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
---
  drivers/gpu/drm/i915/i915_request.c | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index 00011f9533b6..2445a0693287 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -269,12 +269,13 @@ 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);
+ /* And finally after flushing the state, remove from prying eyes. */
+	remove_from_client(rq);
+	list_del(&rq->link);
+
  	free_capture_list(rq);
  	i915_sched_node_fini(&rq->sched);
  	i915_request_put(rq);

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux