Skip to content

Commit

Permalink
drm/i915: Kill the tasklet then disable
Browse files Browse the repository at this point in the history
Disabling the tasklet leaves it if scheduled on the ready to run list
until it is re-enabled. This will leave the ksoftird thread spinning
until satisfied. To prevent this situation on starting the GPU reset, we
want to kill the tasklet first and then disable. The same problem will
arise when a tasklet is scheduled from another device, so a better
solution is required for the general case.

Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: 1f7b847 ("drm/i915: Disable engine->irq_tasklet around resets")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170212172002.23072-3-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
  • Loading branch information
ickle committed Feb 13, 2017
1 parent 8d613c5 commit 1d30963
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2651,8 +2651,8 @@ int i915_gem_reset_prepare(struct drm_i915_private *dev_priv)
* Turning off the engine->irq_tasklet until the reset is over
* prevents the race.
*/
tasklet_disable(&engine->irq_tasklet);
tasklet_kill(&engine->irq_tasklet);
tasklet_disable(&engine->irq_tasklet);

if (engine->irq_seqno_barrier)
engine->irq_seqno_barrier(engine);
Expand Down

0 comments on commit 1d30963

Please sign in to comment.