]> git.hungrycats.org Git - linux/commitdiff
drm/xe: Add platform-level step info to xe_probed_info
authorGustavo Sousa <gustavo.sousa@intel.com>
Tue, 9 Jun 2026 20:17:37 +0000 (17:17 -0300)
committerGustavo Sousa <gustavo.sousa@intel.com>
Thu, 2 Jul 2026 21:41:52 +0000 (18:41 -0300)
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 <dnyaneshwar.bhadane@intel.com>
Reviewed-by: Violet Monti <violet.monti@intel.com>
Link: https://patch.msgid.link/20260609-xe-probe-info-v1-5-21e83e188e60@intel.com
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
drivers/gpu/drm/xe/xe_pci.c

index 5d97a9ed044cd8446e306488a684cfefa6392140..fa43853eb5919b86deac97ef61c681f01ffe90fb 100644 (file)
@@ -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;