[PATCH v2 15/15] drm/xe: Initialise GGTT later

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Mon Sep 30 19:57:49 UTC 2024


Now that we know that nobody is using GGTT any more, postpone
initialisation to prevent any new allocations.

This prevents any new users from popping up.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 drivers/gpu/drm/xe/xe_device.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 31d668ab60f04..5919da7b23361 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -676,9 +676,6 @@ int xe_device_probe(struct xe_device *xe)
 			if (err)
 				return err;
 		}
-		err = xe_ggtt_init_early(tile->mem.ggtt);
-		if (err)
-			return err;
 	}
 
 	for_each_gt(gt, xe, id) {
@@ -710,6 +707,11 @@ int xe_device_probe(struct xe_device *xe)
 		err = xe_tile_init_noalloc(tile);
 		if (err)
 			goto err;
+
+		/* Initialise GGTT, before this point no allocations are allowed */
+		err = xe_ggtt_init_early(tile->mem.ggtt);
+		if (err)
+			return err;
 	}
 
 	/* Allocate and map stolen after potential VRAM resize */
-- 
2.45.2



More information about the Intel-xe mailing list