From b53155bd0e789647ba179f86ff29edf84ce7880d Mon Sep 17 00:00:00 2001 From: Gustavo Sousa Date: Tue, 9 Jun 2026 17:17:37 -0300 Subject: [PATCH] drm/xe: Add platform-level step info to xe_probed_info The platform-level step information depends on the PCI revid and, as such, should be probed in xe_probe_info_early() instead of xe_info_init_early(). Move the code accordingly. Note that we currently only update probed_info->step.platform as part of this change. We will deal with the other fields of probed_info->step as a follow-up change, which will be tied to the probing of graphics and media IPs. Reviewed-by: Dnyaneshwar Bhadane Reviewed-by: Violet Monti Link: https://patch.msgid.link/20260609-xe-probe-info-v1-5-21e83e188e60@intel.com Signed-off-by: Gustavo Sousa --- drivers/gpu/drm/xe/xe_pci.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index 5d97a9ed044c..fa43853eb591 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -732,12 +732,14 @@ static int handle_gmdid(struct xe_device *xe, struct xe_probed_info { u16 devid; u8 revid; + struct xe_step_info step; }; /* * Probe from the hardware the info required by xe_info_init_early(). */ static int xe_probe_info_early(struct xe_device *xe, + const struct xe_device_desc *desc, struct xe_probed_info *probed_info) { struct pci_dev *pdev = to_pci_dev(xe->drm.dev); @@ -745,6 +747,8 @@ static int xe_probe_info_early(struct xe_device *xe, probed_info->devid = pdev->device; probed_info->revid = pdev->revision; + xe_step_platform_get(desc->platform, probed_info->revid, &probed_info->step); + return 0; } @@ -761,6 +765,7 @@ static int xe_info_init_early(struct xe_device *xe, xe->info.devid = probed_info->devid; xe->info.revid = probed_info->revid; + xe->info.step.platform = probed_info->step.platform; xe->info.platform_name = desc->platform_name; xe->info.platform = desc->platform; @@ -810,8 +815,6 @@ static int xe_info_init_early(struct xe_device *xe, xe->info.max_gt_per_tile = desc->max_gt_per_tile; xe->info.tile_count = 1 + desc->max_remote_tiles; - xe_step_platform_get(xe->info.platform, xe->info.revid, &xe->info.step); - err = xe_tile_init_early(xe_device_get_root_tile(xe), xe, 0); if (err) return err; @@ -1149,7 +1152,7 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) pci_set_master(pdev); - err = xe_probe_info_early(xe, &probed_info); + err = xe_probe_info_early(xe, desc, &probed_info); if (err) return err;