drm/i915: Cancel pending execlists irq handler upon idling
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 27 Jun 2017 15:25:10 +0000 (16:25 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 28 Jun 2017 10:30:33 +0000 (11:30 +0100)
commit9cd90018ebd5b4f484300f2a5af804317d3428a1
tree44bf024a54330ea18c32ba6f5cf91efe6f0b3fe2
parent7c3f5317b8c2828ab10e8cf87c8ab5232d1966d0
drm/i915: Cancel pending execlists irq handler upon idling

Due to the slight asynchronicity in handling the execlists interrupts
(i.e. we defer the work to a handler that may consume more than one
interrupt event), when the engine is idle we may still have an irq
tasklet queued (especially when it has been deferred to a ksoftirqd).
At the beginning of the tasklet, we assert that we do hold a device
wakeref for the access we are about to perform. This assumes that when
we idle and release the GT wakeref, all execlists work has been
completed (since the elsp tracking says the hw is idle). However, there
may still be a tasklet queued, so as we mark the engine idle, also
cancel any pending tasklet.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170627152510.28589-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/intel_engine_cs.c