[PATCH] drm/xe: Fix PVC RPe and RPa information
Belgaumkar, Vinay
vinay.belgaumkar at intel.com
Thu Feb 6 17:06:52 UTC 2025
On 1/9/2025 11:52 AM, Rodrigo Vivi wrote:
> A simple lazy buggy copy and paste of the PVC comment has brought
> the attention to the incorrect masks of the PVC register for RPa
> and RPe. So, let's fix them all.
>
> Cc: Lucas De Marchi <lucas.demarchi at intel.com>
> Cc: Vinay Belgaumkar <vinay.belgaumkar at intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
LGTM,
Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar at intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc_pc.c | 22 ++++++++++++----------
> 1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c
> index df7f130fb663..e06f8584608c 100644
> --- a/drivers/gpu/drm/xe/xe_guc_pc.c
> +++ b/drivers/gpu/drm/xe/xe_guc_pc.c
> @@ -362,16 +362,17 @@ static void tgl_update_rpa_value(struct xe_guc_pc *pc)
> u32 reg;
>
> /*
> - * For PVC we still need to use fused RP1 as the approximation for RPe
> - * For other platforms than PVC we get the resolved RPe directly from
> + * For PVC we still need to use fused RP0 as the approximation for RPa
> + * For other platforms than PVC we get the resolved RPa directly from
> * PCODE at a different register
> */
> - if (xe->info.platform == XE_PVC)
> + if (xe->info.platform == XE_PVC) {
> reg = xe_mmio_read32(>->mmio, PVC_RP_STATE_CAP);
> - else
> + pc->rpa_freq = REG_FIELD_GET(RP0_MASK, reg) * GT_FREQUENCY_MULTIPLIER;
> + } else {
> reg = xe_mmio_read32(>->mmio, FREQ_INFO_REC);
> -
> - pc->rpa_freq = REG_FIELD_GET(RPA_MASK, reg) * GT_FREQUENCY_MULTIPLIER;
> + pc->rpa_freq = REG_FIELD_GET(RPA_MASK, reg) * GT_FREQUENCY_MULTIPLIER;
> + }
> }
>
> static void tgl_update_rpe_value(struct xe_guc_pc *pc)
> @@ -385,12 +386,13 @@ static void tgl_update_rpe_value(struct xe_guc_pc *pc)
> * For other platforms than PVC we get the resolved RPe directly from
> * PCODE at a different register
> */
> - if (xe->info.platform == XE_PVC)
> + if (xe->info.platform == XE_PVC) {
> reg = xe_mmio_read32(>->mmio, PVC_RP_STATE_CAP);
> - else
> + pc->rpe_freq = REG_FIELD_GET(RP1_MASK, reg) * GT_FREQUENCY_MULTIPLIER;
> + } else {
> reg = xe_mmio_read32(>->mmio, FREQ_INFO_REC);
> -
> - pc->rpe_freq = REG_FIELD_GET(RPE_MASK, reg) * GT_FREQUENCY_MULTIPLIER;
> + pc->rpe_freq = REG_FIELD_GET(RPE_MASK, reg) * GT_FREQUENCY_MULTIPLIER;
> + }
> }
>
> static void pc_update_rp_values(struct xe_guc_pc *pc)
More information about the Intel-xe
mailing list