diff options
| author | Gustavo Sousa <gustavo.sousa@intel.com> | 2026-06-09 17:17:36 -0300 |
|---|---|---|
| committer | Gustavo Sousa <gustavo.sousa@intel.com> | 2026-07-02 18:41:52 -0300 |
| commit | 15f280a7bac9c8cdec71af20fbec54a775466825 (patch) | |
| tree | 252d2e924552532506cb99483346f63de100cf51 /drivers/gpu | |
| parent | 70b85cb2b590da3325310f0bb50bbe3312f18687 (diff) | |
| download | linux-next-15f280a7bac9c8cdec71af20fbec54a775466825.tar.gz linux-next-15f280a7bac9c8cdec71af20fbec54a775466825.zip | |
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>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/xe/xe_pci.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/xe/xe_step.c | 9 | ||||
| -rw-r--r-- | drivers/gpu/drm/xe/xe_step.h | 3 |
3 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index c767cf00607d..5d97a9ed044c 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -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) diff --git a/drivers/gpu/drm/xe/xe_step.c b/drivers/gpu/drm/xe/xe_step.c index 49dc64f2b363..55c1996f689e 100644 --- a/drivers/gpu/drm/xe/xe_step.c +++ b/drivers/gpu/drm/xe/xe_step.c @@ -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; } /** diff --git a/drivers/gpu/drm/xe/xe_step.h b/drivers/gpu/drm/xe/xe_step.h index c6cea95a3727..5a5845335740 100644 --- a/drivers/gpu/drm/xe/xe_step.h +++ b/drivers/gpu/drm/xe/xe_step.h @@ -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, |
