From: Mario Limonciello <mario.limonciello@amd.com>
To: Mario Limonciello <superm1@kernel.org>, amd-gfx@lists.freedesktop.org
Cc: Vicki Pfau <vi@endrift.com>
Subject: Re: [PATCH 2/2] drm/amd: Allow printing Renoir OD SCLK levels without setting dpm to manual
Date: Thu, 3 Apr 2025 13:32:17 -0500 [thread overview]
Message-ID: <6c6528e8-a40a-416f-9418-6adfe0865e89@amd.com> (raw)
In-Reply-To: <20250323145316.859797-2-superm1@kernel.org>
On 3/23/2025 9:53 AM, Mario Limonciello wrote:
> From: Mario Limonciello <mario.limonciello@amd.com>
>
> Several other ASICs allow printing OD SCLK levels without setting DPM
> control to manual. When OD is disabled it will show the range the
> hardware supports. When OD is enabled it will show what values have been
> programmed. Adjust Renoir to work the same.
>
> Reported-by: Vicki Pfau <vi@endrift.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Ping on this series.
> ---
> .../gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 36 +++++++++----------
> 1 file changed, 16 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c
> index 37d82a71a2d7c..93275ff2ca692 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c
> @@ -510,28 +510,24 @@ static int renoir_print_clk_levels(struct smu_context *smu,
>
> switch (clk_type) {
> case SMU_OD_RANGE:
> - if (smu_dpm_ctx->dpm_level == AMD_DPM_FORCED_LEVEL_MANUAL) {
> - ret = smu_cmn_send_smc_msg_with_param(smu,
> - SMU_MSG_GetMinGfxclkFrequency,
> - 0, &min);
> - if (ret)
> - return ret;
> - ret = smu_cmn_send_smc_msg_with_param(smu,
> - SMU_MSG_GetMaxGfxclkFrequency,
> - 0, &max);
> - if (ret)
> - return ret;
> - size += sysfs_emit_at(buf, size, "OD_RANGE\nSCLK: %10uMhz %10uMhz\n", min, max);
> - }
> + ret = smu_cmn_send_smc_msg_with_param(smu,
> + SMU_MSG_GetMinGfxclkFrequency,
> + 0, &min);
> + if (ret)
> + return ret;
> + ret = smu_cmn_send_smc_msg_with_param(smu,
> + SMU_MSG_GetMaxGfxclkFrequency,
> + 0, &max);
> + if (ret)
> + return ret;
> + size += sysfs_emit_at(buf, size, "OD_RANGE\nSCLK: %10uMhz %10uMhz\n", min, max);
> break;
> case SMU_OD_SCLK:
> - if (smu_dpm_ctx->dpm_level == AMD_DPM_FORCED_LEVEL_MANUAL) {
> - min = (smu->gfx_actual_hard_min_freq > 0) ? smu->gfx_actual_hard_min_freq : smu->gfx_default_hard_min_freq;
> - max = (smu->gfx_actual_soft_max_freq > 0) ? smu->gfx_actual_soft_max_freq : smu->gfx_default_soft_max_freq;
> - size += sysfs_emit_at(buf, size, "OD_SCLK\n");
> - size += sysfs_emit_at(buf, size, "0:%10uMhz\n", min);
> - size += sysfs_emit_at(buf, size, "1:%10uMhz\n", max);
> - }
> + min = (smu->gfx_actual_hard_min_freq > 0) ? smu->gfx_actual_hard_min_freq : smu->gfx_default_hard_min_freq;
> + max = (smu->gfx_actual_soft_max_freq > 0) ? smu->gfx_actual_soft_max_freq : smu->gfx_default_soft_max_freq;
> + size += sysfs_emit_at(buf, size, "OD_SCLK\n");
> + size += sysfs_emit_at(buf, size, "0:%10uMhz\n", min);
> + size += sysfs_emit_at(buf, size, "1:%10uMhz\n", max);
> break;
> case SMU_GFXCLK:
> case SMU_SCLK:
prev parent reply other threads:[~2025-04-03 18:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-23 14:53 [PATCH 1/2] drm/amd: Allow printing VanGogh OD SCLK levels without setting dpm to manual Mario Limonciello
2025-03-23 14:53 ` [PATCH 2/2] drm/amd: Allow printing Renoir " Mario Limonciello
2025-04-03 18:32 ` Mario Limonciello [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=6c6528e8-a40a-416f-9418-6adfe0865e89@amd.com \
--to=mario.limonciello@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=superm1@kernel.org \
--cc=vi@endrift.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