From: "Gautham R. Shenoy" <gautham.shenoy@amd.com>
To: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Cc: mario.limonciello@amd.com, rafael@kernel.org,
viresh.kumar@linaro.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH 05/12] cpufreq/amd-pstate: Pass min/max_limit_perf as min/max_perf to amd_pstate_update
Date: Mon, 10 Feb 2025 15:17:24 +0530 [thread overview]
Message-ID: <Z6nLLOITCy7H5oFg@BLRRASHENOY1.amd.com> (raw)
In-Reply-To: <20250205112523.201101-6-dhananjay.ugwekar@amd.com>
On Wed, Feb 05, 2025 at 11:25:16AM +0000, Dhananjay Ugwekar wrote:
> Currently, amd_pstate_update_freq passes the hardware perf limits as
> min/max_perf to amd_pstate_update, which eventually gets programmed into
> the min/max_perf fields of the CPPC_REQ register.
>
> Instead pass the effective perf limits i.e. min/max_limit_perf values to
> amd_pstate_update as min/max_perf.
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
--
Thanks and Regards
gautham.
>
> Signed-off-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
> ---
> drivers/cpufreq/amd-pstate.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index 2926f292be7b..e179e929b941 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -615,7 +615,7 @@ static int amd_pstate_update_freq(struct cpufreq_policy *policy,
> {
> struct cpufreq_freqs freqs;
> struct amd_cpudata *cpudata = policy->driver_data;
> - unsigned long max_perf, min_perf, des_perf, cap_perf;
> + unsigned long des_perf, cap_perf;
>
> if (!cpudata->max_freq)
> return -ENODEV;
> @@ -624,8 +624,6 @@ static int amd_pstate_update_freq(struct cpufreq_policy *policy,
> amd_pstate_update_min_max_limit(policy);
>
> cap_perf = READ_ONCE(cpudata->highest_perf);
> - min_perf = READ_ONCE(cpudata->lowest_perf);
> - max_perf = cap_perf;
>
> freqs.old = policy->cur;
> freqs.new = target_freq;
> @@ -642,8 +640,9 @@ static int amd_pstate_update_freq(struct cpufreq_policy *policy,
> if (!fast_switch)
> cpufreq_freq_transition_begin(policy, &freqs);
>
> - amd_pstate_update(cpudata, min_perf, des_perf,
> - max_perf, fast_switch, policy->governor->flags);
> + amd_pstate_update(cpudata, cpudata->min_limit_perf, des_perf,
> + cpudata->max_limit_perf, fast_switch,
> + policy->governor->flags);
>
> if (!fast_switch)
> cpufreq_freq_transition_end(policy, &freqs, false);
> --
> 2.34.1
>
next prev parent reply other threads:[~2025-02-10 9:47 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-05 11:25 [PATCH 00/12] cpufreq/amd-pstate: Fixes and optimizations Dhananjay Ugwekar
2025-02-05 11:25 ` [PATCH 01/12] cpufreq/amd-pstate: Remove the goto label in amd_pstate_update_limits Dhananjay Ugwekar
2025-02-05 17:40 ` Mario Limonciello
2025-02-10 5:12 ` Gautham R. Shenoy
2025-02-05 11:25 ` [PATCH 02/12] cpufreq/amd-pstate: Fix max_perf updation with schedutil Dhananjay Ugwekar
2025-02-05 17:40 ` Mario Limonciello
2025-02-10 5:13 ` Gautham R. Shenoy
2025-02-05 11:25 ` [PATCH 03/12] cpufreq/amd-pstate: Modify the min_perf calculation in adjust_perf callback Dhananjay Ugwekar
2025-02-05 17:45 ` Mario Limonciello
2025-02-10 9:45 ` Gautham R. Shenoy
2025-02-05 11:25 ` [PATCH 04/12] cpufreq/amd-pstate: Remove the redundant des_perf clamping in adjust_perf Dhananjay Ugwekar
2025-02-05 17:45 ` Mario Limonciello
2025-02-10 9:46 ` Gautham R. Shenoy
2025-02-05 11:25 ` [PATCH 05/12] cpufreq/amd-pstate: Pass min/max_limit_perf as min/max_perf to amd_pstate_update Dhananjay Ugwekar
2025-02-05 17:45 ` Mario Limonciello
2025-02-10 9:47 ` Gautham R. Shenoy [this message]
2025-02-05 11:25 ` [PATCH 06/12] cpufreq/amd-pstate: Convert all perf values to u8 Dhananjay Ugwekar
2025-02-05 17:46 ` Mario Limonciello
2025-02-10 9:48 ` Gautham R. Shenoy
2025-02-05 11:25 ` [PATCH 07/12] cpufreq/amd-pstate: Modularize perf<->freq conversion Dhananjay Ugwekar
2025-02-05 17:46 ` Mario Limonciello
2025-02-10 9:51 ` Gautham R. Shenoy
2025-02-05 11:25 ` [PATCH 08/12] cpufreq/amd-pstate: Remove the unnecessary cpufreq_update_policy call Dhananjay Ugwekar
2025-02-05 17:46 ` Mario Limonciello
2025-02-10 9:52 ` Gautham R. Shenoy
2025-02-05 11:25 ` [PATCH 09/12] cpufreq/amd-pstate: Fix cpufreq_policy ref counting Dhananjay Ugwekar
2025-02-05 17:48 ` Mario Limonciello
2025-02-10 10:52 ` Gautham R. Shenoy
2025-02-05 11:25 ` [PATCH 10/12] cpufreq/amd-pstate: Add missing NULL ptr check in amd_pstate_update Dhananjay Ugwekar
2025-02-05 17:48 ` Mario Limonciello
2025-02-10 10:58 ` Gautham R. Shenoy
2025-02-05 11:25 ` [PATCH 11/12] cpufreq/amd-pstate: Use scope based cleanup for cpufreq_policy refs Dhananjay Ugwekar
2025-02-05 17:50 ` Mario Limonciello
2025-02-10 11:11 ` Gautham R. Shenoy
2025-02-05 11:25 ` [PATCH 12/12] cpufreq/amd-pstate: Remove the unncecessary driver_lock in amd_pstate_update_limits Dhananjay Ugwekar
2025-02-05 17:50 ` Mario Limonciello
2025-02-10 11:12 ` Gautham R. Shenoy
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=Z6nLLOITCy7H5oFg@BLRRASHENOY1.amd.com \
--to=gautham.shenoy@amd.com \
--cc=dhananjay.ugwekar@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=rafael@kernel.org \
--cc=viresh.kumar@linaro.org \
/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
all inboxes | Powered by JetHome®