Skip to content

Commit 3effd10

Browse files
author
Maarten Lankhorst
committed
drm/xe: Move xe_ttm_sys_mgr_init() downwards.
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. Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://lore.kernel.org/r/20250619104858.418440-21-dev@lankhorst.se Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
1 parent 11bf0f0 commit 3effd10

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

drivers/gpu/drm/xe/xe_device.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -784,10 +784,6 @@ int xe_device_probe(struct xe_device *xe)
784784
if (err)
785785
return err;
786786

787-
err = xe_ttm_sys_mgr_init(xe);
788-
if (err)
789-
return err;
790-
791787
for_each_gt(gt, xe, id) {
792788
err = xe_gt_init_early(gt);
793789
if (err)
@@ -825,6 +821,14 @@ int xe_device_probe(struct xe_device *xe)
825821
return err;
826822
}
827823

824+
/*
825+
* Allow allocations only now to ensure xe_display_init_early()
826+
* is the first to allocate, always.
827+
*/
828+
err = xe_ttm_sys_mgr_init(xe);
829+
if (err)
830+
return err;
831+
828832
/* Allocate and map stolen after potential VRAM resize */
829833
err = xe_ttm_stolen_mgr_init(xe);
830834
if (err)

0 commit comments

Comments
 (0)