aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorMaarten Lankhorst <dev@lankhorst.se>2025-06-19 12:49:07 +0200
committerMaarten Lankhorst <dev@lankhorst.se>2025-06-26 22:11:35 +0200
commit3effd109c6ef1dfc66ef1f09092251bd8c2b35e9 (patch)
tree4c435f3ee85d25602f10c94363446ac51fd7803a /drivers/gpu
parentdrm/xe: Split init of xe_gt_init_hwconfig to xe_gt_init and *_early (diff)
downloadlinux-3effd109c6ef1dfc66ef1f09092251bd8c2b35e9.tar.gz
linux-3effd109c6ef1dfc66ef1f09092251bd8c2b35e9.zip
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/xe/xe_device.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index c3dd4778b8a2..0b73cb72bad1 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -784,10 +784,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)
@@ -825,6 +821,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)