]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Reduce locking around i915_active_acquire_preallocate_barrier()
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 31 Jul 2020 08:50:14 +0000 (09:50 +0100)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Mon, 7 Sep 2020 10:19:11 +0000 (13:19 +0300)
commitd43cbacdf9c8b16c3d859b10720732c2df9fc6ba
tree7ba089e2c6e79c3af47e083811cf6ceae4dec2ad
parent952b6794044113a98c686680be8fcfbe4393c7e9
drm/i915: Reduce locking around i915_active_acquire_preallocate_barrier()

As the conversion between idle-barrier and full i915_active_fence is
already serialised by explicit memory barriers, we can reduce the
spinlock in i915_active_acquire_preallocate_barrier() for finding an
idle-barrier to reuse to an RCU read lock to ensure the fence remains
valid, only taking the spinlock for the update of the rbtree itself.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Thomas Hellström <thomas.hellstrom@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200731085015.32368-6-chris@chris-wilson.co.uk
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_active.c