[PATCH 13/35] drm/i915: Only wake the waiter from the interrupt if passed

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 15 17:39:59 UTC 2017


As we now check if the seqno is complete in order to signal the fence,
we can also decide not to wake up the first_waiter until it is ready
(since it is waiting on the same seqno). The only caveat is that if we
need the engine->irq_seqno_barrier to enforce some coherency between an
interrupt and the seqno read, we have to always wake the waiter into to
perform that heavyweight barrier.

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

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index d9e688f5f4ef..ceb46464f869 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1061,7 +1061,8 @@ static void notify_ring(struct intel_engine_cs *engine)
 			      &wait->request->fence.flags))
 			rq = i915_gem_request_get(wait->request);
 
-		wake_up_process(wait->tsk);
+		if (rq || engine->irq_seqno_barrier)
+			wake_up_process(wait->tsk);
 	} else {
 		__intel_engine_disarm_breadcrumbs(engine);
 	}
-- 
2.11.0



More information about the Intel-gfx-trybot mailing list