drm/i915: Report back whether the irq was armed when adding the waiter
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 8 Jun 2017 11:14:03 +0000 (12:14 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 8 Jun 2017 11:33:08 +0000 (12:33 +0100)
commitbac2ef4b470b08e3748784eb8e84e00d3b121c20
treed6e2005a1d36f9bf2dc9f03fc7759a1bc6cd6da3
parent9f90ff392877581e2c9b54a2d5ecfd1f50d1f170
drm/i915: Report back whether the irq was armed when adding the waiter

The important condition that we need to check after enabling the
interrupt for signaling is whether the request completed in the process
(and so we missed that interrupt). A large cost in enabling the
signaling (rather than waiters) is in waking up the auxiliary signaling
thread, but we only need to do so to catch that missed interrupt. If we
know we didn't miss any interrupts (because we didn't arm the interrupt)
then we can skip waking the auxiliary thread.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170608111405.16466-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_breadcrumbs.c