提交 1d309634 编写于 作者: C Chris Wilson

drm/i915: Kill the tasklet then disable

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: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: 1f7b847d ("drm/i915: Disable engine->irq_tasklet around resets")
Signed-off-by: NChris 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.ukReviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
上级 8d613c53
...@@ -2651,8 +2651,8 @@ int i915_gem_reset_prepare(struct drm_i915_private *dev_priv) ...@@ -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 * Turning off the engine->irq_tasklet until the reset is over
* prevents the race. * prevents the race.
*/ */
tasklet_disable(&engine->irq_tasklet);
tasklet_kill(&engine->irq_tasklet); tasklet_kill(&engine->irq_tasklet);
tasklet_disable(&engine->irq_tasklet);
if (engine->irq_seqno_barrier) if (engine->irq_seqno_barrier)
engine->irq_seqno_barrier(engine); engine->irq_seqno_barrier(engine);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册