drm/i915: Introduce a vma.kref
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 22 Dec 2019 21:02:55 +0000 (21:02 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 23 Dec 2019 12:31:54 +0000 (12:31 +0000)
commit76f9764cc3d538435262dea885bf69fac2415402
tree480bf43fb3319a28f171f9fbbb23499235814ea3
parentf5af1659d809e264d619e5f483fd8f47bced3b6a
drm/i915: Introduce a vma.kref

Start introducing a kref on i915_vma in order to protect the vma unbind
(i915_gem_object_unbind) from a parallel destruction (i915_vma_parked).
Later, we will use the refcount to manage all access and turn i915_vma
into a first class container.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Acked-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191222210256.2066451-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_object.c
drivers/gpu/drm/i915/gem/selftests/huge_pages.c
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_vma.c
drivers/gpu/drm/i915/i915_vma.h