]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Pin the rings before marking active
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 6 Jul 2020 17:01:38 +0000 (18:01 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 8 Jul 2020 01:00:15 +0000 (18:00 -0700)
commit4977a6a145a6cdee56391dd588f2bbe84b750f9f
treefed8ee32effc5945a2eafff72c4f52f8d3690f4b
parent3e53d3c4f5a62a7c1bc1127f8bd1d2c416c3ac08
drm/i915/gt: Pin the rings before marking active

On eviction, we acquire the vm->mutex and then wait on the vma->active.
Therefore when binding and pinning the vma, we must follow the same
sequence, lock/pin the vma then mark it active. Otherwise, we mark the
vma as active, then wait for the vm->mutex, and meanwhile the evictor
holding the mutex waits upon us to complete our activity.

Fixes: 1bfafdffdba1 ("drm/i915/gt: Mark ring->vma as active while pinned")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: <stable@vger.kernel.org> # v5.6+
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200706170138.8993-1-chris@chris-wilson.co.uk
(cherry picked from commit 8567774e87e23a57155e5102f81208729b992ae6)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/gt/intel_context.c