OSDN Git Service

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)
commit54d7195f8c64c83a13bd343e349b1bbf158c8aad
tree8f75bb41b6d0d2a5066b9a925d290d8e772c22f8
parentf20c6b278d1a0cedc691c3b0ebcf9154ad9d8a1a
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