[PATCH 14/14] drm/xe: Initialise GGTT later

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Fri Sep 27 14:14:04 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 eda34e284b16..330358ecb9c4 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -675,9 +675,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) {
@@ -709,6 +706,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