]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/breadcrumbs: Disable interrupt bottom-half first on idling
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 15 Mar 2017 21:07:24 +0000 (21:07 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 15 Mar 2017 21:45:39 +0000 (21:45 +0000)
commitafc0b44f688467aeaefb60a58b1dec90f791a7d4
tree4daffd2336e19a936cc25c248dc446d2458b8f7f
parent1b51af0ef85fc8877b4d3cc85514507abe207a51
drm/i915/breadcrumbs: Disable interrupt bottom-half first on idling

Before walking the rbtree of waiters (marking them as complete and waking
them), decouple the interrupt handler. This prevents a race between the
missed waiter waking up and removing its intel_wait (which skips
checking the lock) and the interrupt handler dereferencing the
intel_wait. (Though we do not expect to encounter waiters during idle!)

Fixes: e630270843a0 ("drm/i915: Wake up all waiters before idling")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170315210726.12095-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_breadcrumbs.c