]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Unpin vma->obj on early error
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 16 Dec 2019 16:17:16 +0000 (16:17 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 18 Dec 2019 10:13:03 +0000 (10:13 +0000)
commitaba74a148a2c7791b6b5bfdfd52511e8175eafd5
tree8f75bb41b6d0d2a5066b9a925d290d8e772c22f8
parent14ed5bd9e35939fe970c7b4ce1d2ade45cd9592a
drm/i915: Unpin vma->obj on early error

If we inherit an error along the fence chain, we skip the main work
callback and go straight to the error. In the case of the vma bind
worker, we only dropped the pinned pages from the worker.

In the process, make sure we call the release earlier rather than wait
until the final reference to the fence is dropped (as a reference is
kept while being listened upon).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191216161717.2688274-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_clflush.c
drivers/gpu/drm/i915/i915_sw_fence_work.c
drivers/gpu/drm/i915/i915_vma.c