drm/xe/step: Make xe_step_platform_get() independent from xe->info

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>
This commit is contained in:
Gustavo Sousa
2026-06-09 17:17:36 -03:00
parent 70b85cb2b5
commit 15f280a7ba
3 changed files with 8 additions and 6 deletions

View 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)

View 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;
}
/**

View File

@@ -10,9 +10,10 @@
#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,