drm/i915/execlists: Ensure the tasklet is decoupled upon shutdown
diff mbox series

Message ID 20191129171908.1195512-1-chris@chris-wilson.co.uk
State New
Headers show
Series
  • drm/i915/execlists: Ensure the tasklet is decoupled upon shutdown
Related show

Commit Message

Chris Wilson Nov. 29, 2019, 5:19 p.m. UTC
Be safe and make sure the tasklet is flushed before destroying the
engine's memory.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_lrc.c | 1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 4cd0d46b5da6..6ec2f022669e 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -3779,6 +3779,7 @@  void intel_execlists_set_default_submission(struct intel_engine_cs *engine)
 
 static void execlists_destroy(struct intel_engine_cs *engine)
 {
+	tasklet_kill(&engine->execlists.tasklet); /* flush residual softirq */
 	intel_engine_cleanup_common(engine);
 	lrc_destroy_wa_ctx(engine);
 	kfree(engine);