@@ -1051,19 +1051,19 @@ static void gen8_ppgtt_cleanup_3lvl(struct drm_i915_private *dev_priv,
free_pdp(dev_priv, pdp);
}
-static void gen8_ppgtt_cleanup_4lvl(struct i915_hw_ppgtt *ppgtt)
+static void gen8_ppgtt_cleanup_4lvl(struct drm_i915_private *dev_priv,
+ struct i915_pml4 *pml4)
{
- struct drm_i915_private *dev_priv = ppgtt->base.i915;
int i;
- for_each_set_bit(i, ppgtt->pml4.used_pml4es, GEN8_PML4ES_PER_PML4) {
- if (WARN_ON(!ppgtt->pml4.pdps[i]))
+ for_each_set_bit(i, pml4->used_pml4es, GEN8_PML4ES_PER_PML4) {
+ if (WARN_ON(!pml4->pdps[i]))
continue;
- gen8_ppgtt_cleanup_3lvl(dev_priv, ppgtt->pml4.pdps[i]);
+ gen8_ppgtt_cleanup_3lvl(dev_priv, pml4->pdps[i]);
}
- cleanup_px(dev_priv, &ppgtt->pml4);
+ cleanup_px(dev_priv, pml4);
}
static void gen8_ppgtt_cleanup(struct i915_address_space *vm)
@@ -1077,7 +1077,7 @@ static void gen8_ppgtt_cleanup(struct i915_address_space *vm)
if (!USES_FULL_48BIT_PPGTT(dev_priv))
gen8_ppgtt_cleanup_3lvl(dev_priv, &ppgtt->pdp);
else
- gen8_ppgtt_cleanup_4lvl(ppgtt);
+ gen8_ppgtt_cleanup_4lvl(dev_priv, &ppgtt->pml4);
gen8_free_scratch(vm);
}
It's not operating on ppgtt, and it also makes things consistent with analogous ppgtt_cleanup_3lvl function. Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Michel Thierry <michel.thierry@intel.com> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> --- drivers/gpu/drm/i915/i915_gem_gtt.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)