]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Avoid resetting ring->head outside of its timeline mutex
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 11 Feb 2020 12:01:31 +0000 (12:01 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 11 Feb 2020 12:03:22 +0000 (12:03 +0000)
commit42eec8a60e31da7d30376537a17d20279422e46d
tree6d95174187051452b79595f1d26d7fe4229beffc
parentc14eab313075665eb86b4a92635522532aaea920
drm/i915/gt: Avoid resetting ring->head outside of its timeline mutex

We manipulate ring->head while active in i915_request_retire underneath
the timeline manipulation. We cannot rely on a stable ring->head outside
of the timeline->mutex, in particular while setting up the context for
resume and reset.

Closes: https://gitlab.freedesktop.org/drm/intel/issues/1126
Fixes: ce5dbe1e951d ("drm/i915: Introduce intel_context.pin_mutex for pin management")
Fixes: eaac073f8c2e ("drm/i915: Protect request retirement with timeline->mutex")
References: bded6da1dde9 ("drm/i915/execlists: Leave resetting ring to intel_ring")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200211120131.958949-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/gt/intel_ring_types.h
drivers/gpu/drm/i915/gt/selftest_lrc.c