[Intel-xe] [PATCH] drm/xe: Extend rpX values extraction for future platforms
Gupta, Anshuman
anshuman.gupta at intel.com
Thu Oct 26 09:35:30 UTC 2023
> -----Original Message-----
> From: Nilawar, Badal <badal.nilawar at intel.com>
> Sent: Wednesday, October 25, 2023 9:42 PM
> To: intel-xe at lists.freedesktop.org
> Cc: Gupta, Anshuman <anshuman.gupta at intel.com>; Tauro, Riana
> <riana.tauro at intel.com>; Roper, Matthew D <matthew.d.roper at intel.com>
> Subject: [PATCH] drm/xe: Extend rpX values extraction for future platforms
>
> In existing code flow for future platforms i.e. >1270, the rpX (rp0,rpn and rpe)
> fused values are read from gen 6 registers.
> Which is not correct. Unless specified gen 1270 regs should be valid for gen
> 1270+ platforms as well.
>
> Signed-off-by: Badal Nilawar <badal.nilawar at intel.com>
Reviewed-by: Anshuman Gupta <anshuman.gupta at intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc_pc.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c
> b/drivers/gpu/drm/xe/xe_guc_pc.c index d9375d1d582f..74247e0d3674
> 100644
> --- a/drivers/gpu/drm/xe/xe_guc_pc.c
> +++ b/drivers/gpu/drm/xe/xe_guc_pc.c
> @@ -340,7 +340,7 @@ static void pc_update_rp_values(struct xe_guc_pc
> *pc)
> struct xe_gt *gt = pc_to_gt(pc);
> struct xe_device *xe = gt_to_xe(gt);
>
> - if (xe->info.platform == XE_METEORLAKE)
> + if (GRAPHICS_VERx100(xe) >= 1270)
> mtl_update_rpe_value(pc);
> else
> tgl_update_rpe_value(pc);
> @@ -365,7 +365,7 @@ static ssize_t freq_act_show(struct device *dev,
> xe_device_mem_access_get(gt_to_xe(gt));
>
> /* When in RC6, actual frequency reported will be 0. */
> - if (xe->info.platform == XE_METEORLAKE) {
> + if (GRAPHICS_VERx100(xe) >= 1270) {
> freq = xe_mmio_read32(gt, MTL_MIRROR_TARGET_WP1);
> freq = REG_FIELD_GET(MTL_CAGF_MASK, freq);
> } else {
> @@ -680,7 +680,7 @@ static void pc_init_fused_rp_values(struct xe_guc_pc
> *pc)
> struct xe_gt *gt = pc_to_gt(pc);
> struct xe_device *xe = gt_to_xe(gt);
>
> - if (xe->info.platform == XE_METEORLAKE)
> + if (GRAPHICS_VERx100(xe) >= 1270)
> mtl_init_fused_rp_values(pc);
> else
> tgl_init_fused_rp_values(pc);
> --
> 2.25.1
More information about the Intel-xe
mailing list