[Intel-gfx] [PATCH 1/8] drm/i915/gtt: Don't pass ppgtt to ppgtt_cleanup_4lvl
Michał Winiarski
michal.winiarski at intel.com
Mon Dec 12 11:44:10 UTC 2016
It's not operating on ppgtt, and it also makes things consistent with
analogous ppgtt_cleanup_3lvl function.
Cc: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Cc: Michel Thierry <michel.thierry at intel.com>
Cc: Mika Kuoppala <mika.kuoppala at intel.com>
Signed-off-by: Michał Winiarski <michal.winiarski at intel.com>
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index ef00d36..11ec68c 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -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);
}
--
2.7.4
More information about the Intel-gfx
mailing list