drm/i915/gtt: Recursive cleanup for gen8
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 12 Jul 2019 11:27:22 +0000 (12:27 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 12 Jul 2019 17:54:40 +0000 (18:54 +0100)
commit1eda701eace2ddac0f2e2e7176ff6b504e815453
treee5ad6611af616143eaf8d4470ffe23d4ec02b099
parent801404632c4ba08adce04cb9e81a1d34bfb14b17
drm/i915/gtt: Recursive cleanup for gen8

With an explicit level, we can refactor the separate cleanup functions
as a simple recursive function. We take the opportunity to pass down the
size of each level so that we can deal with the different sizes of
top-level and avoid over allocating for 32/36-bit vm.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190712112725.2892-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_gtt.c