From: "Belgaumkar, Vinay" <vinay.belgaumkar@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>, <intel-xe@lists.freedesktop.org>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [PATCH] drm/xe: Fix PVC RPe and RPa information
Date: Thu, 6 Feb 2025 09:06:52 -0800 [thread overview]
Message-ID: <e951a82b-a01f-4984-84da-ee16d0a71e93@intel.com> (raw)
In-Reply-To: <20250109195219.658557-1-rodrigo.vivi@intel.com>
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@intel.com>
> Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
LGTM,
Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@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)
prev parent reply other threads:[~2025-02-06 17:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 19:52 [PATCH] drm/xe: Fix PVC RPe and RPa information Rodrigo Vivi
2025-01-09 21:08 ` ✓ CI.Patch_applied: success for " Patchwork
2025-01-09 21:08 ` ✓ CI.checkpatch: " Patchwork
2025-01-09 21:09 ` ✓ CI.KUnit: " Patchwork
2025-01-09 21:29 ` ✓ CI.Build: " Patchwork
2025-01-09 21:33 ` ✓ CI.Hooks: " Patchwork
2025-01-09 21:36 ` ✓ CI.checksparse: " Patchwork
2025-01-09 22:03 ` ✓ Xe.CI.BAT: " Patchwork
2025-01-12 9:44 ` ✗ Xe.CI.Full: failure " Patchwork
2025-02-06 17:06 ` Belgaumkar, Vinay [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e951a82b-a01f-4984-84da-ee16d0a71e93@intel.com \
--to=vinay.belgaumkar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox