There will be a NVL-P workaround for which we will need to know the
platform-level stepping information in order to decide whether to apply
it or not.
While NVL-P has a nice mapping between the PCI revid and our symbolic
stepping enumeration, not all platforms are like that: (i) Some
platforms will have a single PCI revid used for a set platform level
steppings (ii) and some might even require specific mappings.
To make things simpler, let's include stepping information in the device
info only on demand, for those platforms where it is needed for
workaround checks.
v2:
- Call xe_step_platform_get() very early, to allow device workarounds
to use it in early stages of device initialization. (Matt)
Bspec: 74201
Reviewed-by: Matt Roper <matthew.d.roper@intel.com> # v1
Link: https://patch.msgid.link/20260309-extra-nvl-p-enabling-patches-v5-3-be9c902ee34e@intel.com
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
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);
+
err = xe_tile_init_early(xe_device_get_root_tile(xe), xe, 0);
if (err)
return err;
__diag_pop();
+/**
+ * xe_step_platform_get - Determine platform-level stepping from PCI revid
+ * @xe: Xe device
+ *
+ * Convert the PCI revid into a platform-level stepping value and store that
+ * in the device info.
+ */
+void xe_step_platform_get(struct xe_device *xe)
+{
+ /*
+ * Not all platforms map PCI revid directly into our symbolic stepping
+ * enumeration. Some platforms will have a single PCI revid used for a
+ * range platform level steppings and some might even require specific
+ * mappings. So prefer to err on the side of caution and include only
+ * the platforms from which we need the stepping info for workaround
+ * checks.
+ */
+
+ if (xe->info.platform == XE_NOVALAKE_P)
+ xe->info.step.platform = STEP_A0 + xe->info.revid;
+}
+
/**
* xe_step_pre_gmdid_get - Determine IP steppings from PCI revid
* @xe: Xe device
struct xe_device;
+void xe_step_platform_get(struct xe_device *xe);
+
void xe_step_pre_gmdid_get(struct xe_device *xe);
void xe_step_gmdid_get(struct xe_device *xe,
u32 graphics_gmdid_revid,
#include <linux/types.h>
struct xe_step_info {
+ u8 platform;
u8 graphics;
u8 media;
u8 basedie;