[PATCH 1/8] drm/i915/gtt: Don't pass ppgtt to ppgtt_cleanup_4lvl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's not operating on ppgtt, and it also makes things consistent with
analogous ppgtt_cleanup_3lvl function.

Cc: Arkadiusz Hiler <arkadiusz.hiler@xxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
Cc: Michel Thierry <michel.thierry@xxxxxxxxx>
Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
Signed-off-by: Michał Winiarski <michal.winiarski@xxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux