]> git.hungrycats.org Git - linux/commitdiff
drm/xe/step: Make xe_step_platform_get() independent from xe->info
authorGustavo Sousa <gustavo.sousa@intel.com>
Tue, 9 Jun 2026 20:17:36 +0000 (17:17 -0300)
committerGustavo Sousa <gustavo.sousa@intel.com>
Thu, 2 Jul 2026 21:41:52 +0000 (18:41 -0300)
Currently xe_step_platform_get() uses info fields from xe->info to
define the platform-level stepping value.

Because the platform-level stepping info depends on the PCI revid, it
should be defined as part of xe_probe_info_early() instead of being
directly probed inside xe_info_init_early().

Let's make sure that xe_step_platform_get() receives the necessary
data as parameters and does not depend on xe->info.  That will allow
us to move the call up to xe_probe_info_early() in an upcoming change.

Reviewed-by: Violet Monti <violet.monti@intel.com>
Link: https://patch.msgid.link/20260609-xe-probe-info-v1-4-21e83e188e60@intel.com
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
drivers/gpu/drm/xe/xe_pci.c
drivers/gpu/drm/xe/xe_step.c
drivers/gpu/drm/xe/xe_step.h

index c767cf00607dd6abc93702454318194252e1d7b3..5d97a9ed044cd8446e306488a684cfefa6392140 100644 (file)
@@ -810,7 +810,7 @@ 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, &xe->info.step);
+       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)
index 49dc64f2b363d069d246ea448296499f7c52c7a4..55c1996f689e1e82f20b638bac8648c3ce5949c2 100644 (file)
@@ -110,13 +110,14 @@ __diag_pop();
 
 /**
  * xe_step_platform_get - Determine platform-level stepping from PCI revid
- * @xe: Xe device
+ * @platform: The Xe platform
+ * @revid: The PCI revid
  * @step: Pointer to the step struct to update
  *
  * Convert the PCI revid into a platform-level stepping value and store that
  * in @step->platform.
  */
-void xe_step_platform_get(struct xe_device *xe, struct xe_step_info *step)
+void xe_step_platform_get(enum xe_platform platform, u8 revid, struct xe_step_info *step)
 {
        /*
         * Not all platforms map PCI revid directly into our symbolic stepping
@@ -127,8 +128,8 @@ void xe_step_platform_get(struct xe_device *xe, struct xe_step_info *step)
         * checks.
         */
 
-       if (xe->info.platform == XE_NOVALAKE_P)
-               step->platform = STEP_A0 + xe->info.revid;
+       if (platform == XE_NOVALAKE_P)
+               step->platform = STEP_A0 + revid;
 }
 
 /**
index c6cea95a3727d994f9460d931e364db06d6db9b2..5a5845335740c86d01278b0af06fbf850f2dcd9e 100644 (file)
 
 #include "xe_step_types.h"
 
+enum xe_platform;
 struct xe_device;
 
-void xe_step_platform_get(struct xe_device *xe, struct xe_step_info *step);
+void xe_step_platform_get(enum xe_platform platform, u8 revid, struct xe_step_info *step);
 
 void xe_step_pre_gmdid_get(struct xe_device *xe, struct xe_step_info *step);
 void xe_step_gmdid_get(struct xe_device *xe,