]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Split i915_active.mutex into an irq-safe spinlock for the rbtree
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 14 Nov 2019 17:25:35 +0000 (17:25 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 14 Nov 2019 17:43:41 +0000 (17:43 +0000)
commit95f1a207a4f1ebde8e1679de667a2fab7b5d068a
tree25cf2b065137db0c44880e00833acda19307760a
parent34be2fa9480ad3061b132886cc7a8165f5fdbcc1
drm/i915: Split i915_active.mutex into an irq-safe spinlock for the rbtree

As we want to be able to run inside atomic context for retiring the
i915_active, and we are no longer allowed to abuse mutex_trylock, split
the tree management portion of i915_active.mutex into an irq-safe
spinlock.

References: ffa070fa9b938 ("locking/mutex: Complain upon mutex API misuse in IRQ contexts")
References: https://bugs.freedesktop.org/show_bug.cgi?id=111626
Fixes: fd6853792ac5 ("drm/i915: Push the i915_active.retire into a worker")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191114172535.1116-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_active.c
drivers/gpu/drm/i915/i915_active_types.h
drivers/gpu/drm/i915/selftests/i915_active.c