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_step_platform_get(xe, &xe->info.step);
err = xe_tile_init_early(xe_device_get_root_tile(xe), xe, 0);
if (err)
if (desc->pre_gmdid_graphics_ip) {
graphics_ip = desc->pre_gmdid_graphics_ip;
media_ip = desc->pre_gmdid_media_ip;
- xe_step_pre_gmdid_get(xe);
+ xe_step_pre_gmdid_get(xe, &xe->info.step);
} else {
xe_assert(xe, !desc->pre_gmdid_media_ip);
ret = handle_gmdid(xe, &graphics_ip, &media_ip,
if (ret)
return ret;
- xe_step_gmdid_get(xe, graphics_gmdid_revid, media_gmdid_revid);
+ xe_step_gmdid_get(xe, graphics_gmdid_revid, media_gmdid_revid, &xe->info.step);
}
/*
/**
* xe_step_platform_get - Determine platform-level stepping from PCI revid
* @xe: Xe device
+ * @step: Pointer to the step struct to update
*
* Convert the PCI revid into a platform-level stepping value and store that
- * in the device info.
+ * in @step->platform.
*/
-void xe_step_platform_get(struct xe_device *xe)
+void xe_step_platform_get(struct xe_device *xe, struct xe_step_info *step)
{
/*
* Not all platforms map PCI revid directly into our symbolic stepping
*/
if (xe->info.platform == XE_NOVALAKE_P)
- xe->info.step.platform = STEP_A0 + xe->info.revid;
+ step->platform = STEP_A0 + xe->info.revid;
}
/**
* xe_step_pre_gmdid_get - Determine IP steppings from PCI revid
* @xe: Xe device
+ * @step: Pointer to the step struct to update
*
- * Convert the PCI revid into proper IP steppings. This should only be
- * used on platforms that do not have GMD_ID support.
+ * Convert the PCI revid into proper IP steppings and update @step->basedie,
+ * @step->graphics and @step->media accordingly.
+ *
+ * This should only be used on platforms that do not have GMD_ID support.
*/
-void xe_step_pre_gmdid_get(struct xe_device *xe)
+void xe_step_pre_gmdid_get(struct xe_device *xe, struct xe_step_info *step)
{
const struct xe_step_info *revids = NULL;
u16 revid = xe->info.revid;
}
done:
- xe->info.step.graphics = graphics;
- xe->info.step.media = media;
- xe->info.step.basedie = basedie;
+ step->graphics = graphics;
+ step->media = media;
+ step->basedie = basedie;
}
/**
* @xe: Xe device
* @graphics_gmdid_revid: value of graphics GMD_ID register's revid field
* @media_gmdid_revid: value of media GMD_ID register's revid field
+ * @step: Poninter to the step struct to update.
*
- * Convert the revid fields of the GMD_ID registers into proper IP steppings.
+ * Convert the revid fields of the GMD_ID registers into proper IP steppings
+ * and update @step->graphics and @step->media accordingly.
*
* GMD_ID revid values are currently expected to have consistent meanings on
* all platforms: major steppings (A0, B0, etc.) are 4 apart, with minor
*/
void xe_step_gmdid_get(struct xe_device *xe,
u32 graphics_gmdid_revid,
- u32 media_gmdid_revid)
+ u32 media_gmdid_revid,
+ struct xe_step_info *step)
{
u8 graphics = STEP_A0 + graphics_gmdid_revid;
u8 media = STEP_A0 + media_gmdid_revid;
media_gmdid_revid);
}
- xe->info.step.graphics = graphics;
- xe->info.step.media = media;
+ step->graphics = graphics;
+ step->media = media;
}
#define STEP_NAME_CASE(name) \
struct xe_device;
-void xe_step_platform_get(struct xe_device *xe);
+void xe_step_platform_get(struct xe_device *xe, struct xe_step_info *step);
-void xe_step_pre_gmdid_get(struct xe_device *xe);
+void xe_step_pre_gmdid_get(struct xe_device *xe, struct xe_step_info *step);
void xe_step_gmdid_get(struct xe_device *xe,
u32 graphics_gmdid_revid,
- u32 media_gmdid_revid);
+ u32 media_gmdid_revid,
+ struct xe_step_info *step);
static inline u32 xe_step_to_gmdid(enum intel_step step) { return step - STEP_A0; }
const char *xe_step_name(enum intel_step step);