]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Stop holding a ref to the ppgtt from each vma
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 16 Aug 2018 07:34:46 +0000 (08:34 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 29 Aug 2018 21:11:53 +0000 (14:11 -0700)
commite097be2cd4bd155fd4080127e2f0d98edc3d4d23
tree3ed0c7d2949a67a02bb3ee93d7dce4b9b8a16f65
parent3511e73d925a98691b47726dc655c5c724353bb7
drm/i915: Stop holding a ref to the ppgtt from each vma

The context owns both the ppgtt and the vma within it, and our activity
tracking on the context ensures that we do not release active ppgtt. As
the context fulfils our obligations for active memory tracking, we can
relinquish the reference from the vma.

This fixes a silly transient refleak from closed vma being kept alive
until the entire system was idle, keeping all vm alive as well.

Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Testcase: igt/gem_ctx_create/files
Fixes: 4b7c59833947 ("drm/i915: Lazily unbind vma on close")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Tested-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180816073448.19396-1-chris@chris-wilson.co.uk
(cherry picked from commit a4417b7b419a68540ad7945ac4efbb39d19afa63)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/i915_vma.c