[PATCH 12/42] drm/i915: Only trigger missed-seqno checking next to boundary

Chris Wilson chris at chris-wilson.co.uk
Thu Jun 28 14:37:56 UTC 2018

If we have more interrupts pending (because we know there are more
breadcrumb signals before the completion), then we do not need to
trigger an irq_seqno_barrier or even wakeup the task on this interrupt
as there will be another. To allow some margin of error (we are trying
to work around incoherent seqno after all), we wakeup the breadcrumb
before the target as well as on the target.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
 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 dfa917cb61fd..3ac60de61ff6 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1191,7 +1191,8 @@ static void notify_ring(struct intel_engine_cs *engine)
 			tsk = wait->tsk;
 		} else {
-			if (engine->irq_seqno_barrier) {
+			if (engine->irq_seqno_barrier &&
+			    i915_seqno_passed(seqno, wait->seqno - 1)) {
 				tsk = wait->tsk;

More information about the Intel-gfx-trybot mailing list