]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/i915: Split detaching and removing the vma
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 30 Oct 2019 19:21:49 +0000 (19:21 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 31 Oct 2019 14:52:19 +0000 (14:52 +0000)
commitdde01d943559f6b853d97a2744433d9ad1b12ace
treeb53cf9a9a2b375bac31ca3a186b2ff5f7a281bc3
parent164a4128869ffcef33dfed82b641471b14e48b5d
drm/i915: Split detaching and removing the vma

In order to keep the assert_bind_count() valid, we need to hold the vma
page reference until after we drop the bind count. However, we must also
keep the drm_mm_remove_node() as the last action of i915_vma_unbind() so
that it serialises with the unlocked check inside i915_vma_destroy(). So
we need to split up i915_vma_remove() so that we order the detach, drop
pages and remove as required during unbind.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112067
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191030192159.18404-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_vma.c