[PATCH 15/40] drm/i915/breadcrumbs: Flush fence signals on removing the breadcrumb

Chris Wilson chris at chris-wilson.co.uk
Thu Jan 4 14:35:15 UTC 2018


When the wait->seqno has passed and we have an attached fence, signal
the fence on removing the waiter.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_breadcrumbs.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
index f3d70539d391..f59f666edf09 100644
--- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
@@ -358,7 +358,11 @@ static inline void __intel_breadcrumbs_finish(struct intel_breadcrumbs *b,
 	lockdep_assert_held(&b->rb_lock);
 	GEM_BUG_ON(b->irq_wait == wait);
 
-	/* This request is completed, so remove it from the tree, mark it as
+	if (wait->request && intel_wait_check_request(wait, wait->request))
+		dma_fence_signal(&wait->request->fence);
+
+	/*
+	 * This request is completed, so remove it from the tree, mark it as
 	 * complete, and *then* wake up the associated task. N.B. when the
 	 * task wakes up, it will find the empty rb_node, discern that it
 	 * has already been removed from the tree and skip the serialisation
-- 
2.15.1



More information about the Intel-gfx-trybot mailing list