[PATCH v3 9/9] drm/xe: Move xe_ttm_sys_mgr_init() downwards.

Lucas De Marchi lucas.demarchi at intel.com
Wed Jun 18 19:45:46 UTC 2025


On Tue, Jun 17, 2025 at 08:01:42PM +0200, Maarten Lankhorst wrote:
>Now that all previous allocations are gone, ensure no new allocations
>will ever be done before xe_display_init_early(), by moving the call
>that allows allocations downwards.
>
>Signed-off-by: Maarten Lankhorst <dev at lankhorst.se>


Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>


Lucas De Marchi

>---
> drivers/gpu/drm/xe/xe_device.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
>index c8595cc0300fb..c0952f692fb66 100644
>--- a/drivers/gpu/drm/xe/xe_device.c
>+++ b/drivers/gpu/drm/xe/xe_device.c
>@@ -782,10 +782,6 @@ int xe_device_probe(struct xe_device *xe)
> 	if (err)
> 		return err;
>
>-	err = xe_ttm_sys_mgr_init(xe);
>-	if (err)
>-		return err;
>-
> 	for_each_gt(gt, xe, id) {
> 		err = xe_gt_init_early(gt);
> 		if (err)
>@@ -823,6 +819,14 @@ int xe_device_probe(struct xe_device *xe)
> 			return err;
> 	}
>
>+	/*
>+	 * Allow allocations only now to ensure xe_display_init_early()
>+	 * is the first to allocate, always.
>+	 */
>+	err = xe_ttm_sys_mgr_init(xe);
>+	if (err)
>+		return err;
>+
> 	/* Allocate and map stolen after potential VRAM resize */
> 	err = xe_ttm_stolen_mgr_init(xe);
> 	if (err)
>-- 
>2.45.2
>


More information about the Intel-xe mailing list