Load maps stolen pages at gtt.gatt_start, but unload removes them from
mmu_gatt_start (0xe0000000). Unless these happen to match, unload visits
an unrelated range. Use the same GATT start as load. The independent
removal-hole fix also prevents allocating tables for absent mappings.

Fixes: ae012bdc5799 ("drm/gma500: Hook up the MMU")
Signed-off-by: Gabriel Gama <[email protected]>
---
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 
d17cb5b4a4bf2d80e8fa0e83dd09cabff5b20fe1..4102b6de69a2c5b15e74a67676190a8f13c6031d
 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -189,7 +189,7 @@
                psb_mmu_remove_pfn_sequence(
                        psb_mmu_get_default_pd
                        (dev_priv->mmu),
-                       pg->mmu_gatt_start,
+                       pg->gatt_start,
                        dev_priv->vram_stolen_size >> PAGE_SHIFT);
                psb_mmu_driver_takedown(dev_priv->mmu);
                dev_priv->mmu = NULL;

Reply via email to