drm/i915/gem: Optimistically prune dma-resv from the shrinker.
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 23 Dec 2020 12:20:51 +0000 (12:20 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 23 Dec 2020 21:58:00 +0000 (21:58 +0000)
commit6d393ef5ff5cac48b44781b1c1c22aabd65eba27
tree892196f43e904123aa4b400dafb3d5df2929d5a4
parentd7d82f5d5c04ed9cb68d3663ffde10898a2969be
drm/i915/gem: Optimistically prune dma-resv from the shrinker.

As we shrink an object, also see if we can prune the dma-resv of idle
fences it is maintaining a reference to.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201223122051.4624-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/dma_resv_utils.c [new file with mode: 0644]
drivers/gpu/drm/i915/dma_resv_utils.h [new file with mode: 0644]
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
drivers/gpu/drm/i915/gem/i915_gem_wait.c