]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Reduce nested prepare_remote_context() to a trylock
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 26 Nov 2019 06:55:21 +0000 (06:55 +0000)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Wed, 27 Nov 2019 08:12:19 +0000 (10:12 +0200)
commit0c54e12bc59031606be446969834bfbd6fe4002d
treec99cc8acadf48994107b7c90034eecb2c3ae39c8
parent2e8597f06c71d1ed626ec81a37c8673c456670ae
drm/i915: Reduce nested prepare_remote_context() to a trylock

On context retiring, we may invoke the kernel_context to unpin this
context. Elsewhere, we may use the kernel_context to modify this
context. This currently leads to an AB-BA lock inversion, so we need to
back-off from the contended lock, and repeat.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111732
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: f02fec1f7de1 ("drm/i915/oa: Reconfigure contexts on the fly")
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191126065521.2331017-1-chris@chris-wilson.co.uk
(cherry picked from commit 58b4c1a07ada7fb91ea757bdb9bd47df02207357)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/gt/intel_context.c