All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Cancel pending execlists irq handler upon idling
@ 2017-06-27 15:25 Chris Wilson
  2017-06-27 15:45 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-06-28  8:59 ` [PATCH] " Tvrtko Ursulin
  0 siblings, 2 replies; 6+ messages in thread
From: Chris Wilson @ 2017-06-27 15:25 UTC (permalink / raw)
  To: intel-gfx

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>
---
 drivers/gpu/drm/i915/intel_engine_cs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index 3b46c1f7b88b..49e875c46c96 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -1328,6 +1328,7 @@ void intel_engines_mark_idle(struct drm_i915_private *i915)
 	for_each_engine(engine, i915, id) {
 		intel_engine_disarm_breadcrumbs(engine);
 		i915_gem_batch_pool_fini(&engine->batch_pool);
+		tasklet_kill(&engine->irq_tasklet);
 		engine->no_priolist = false;
 	}
 }
-- 
2.13.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-06-28 10:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-27 15:25 [PATCH] drm/i915: Cancel pending execlists irq handler upon idling Chris Wilson
2017-06-27 15:45 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-06-28  8:59 ` [PATCH] " Tvrtko Ursulin
2017-06-28 10:01   ` Chris Wilson
2017-06-28 10:15     ` Tvrtko Ursulin
2017-06-28 10:29       ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.