[Intel-gfx] [PATCH] drm/i915: Break i915_spin_request() if we see an interrupt
Chris Wilson
chris at chris-wilson.co.uk
Thu Feb 16 13:26:35 UTC 2017
On Thu, Feb 16, 2017 at 03:17:30PM +0200, Mika Kuoppala wrote:
> Chris Wilson <chris at chris-wilson.co.uk> writes:
>
> > If an interrupt has been posted, and we were spinning on the active
> > seqno waiting for it to advance but it did not, then we can expect that
> > it will not see its advance in the immediate future
>
> Why we can expect this?
The seqno is meant to arrive *before* the interrupt. The check is lazy,
but assume it is
irq_posted = test_bit(ENGINE_IRQ_BREADCRUMB, &req->engine->irq_posted);
if (seqno_passed())
return true;
if (irq_posted)
return false;
with the strong read ordering imposed. The reason why I think we can be
lax is that we expect the caller to check after spin_request reports
false (just it may do some other work in the meantime).
Note that the interrupt will only be detected if there is already a
waiter (or equivalent).
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list