From: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
To: "Gautham R.Shenoy" <gautham.shenoy@amd.com>,
rafael@kernel.org, viresh.kumar@linaro.org,
mario.limonciello@amd.com, perry.yuan@amd.com,
skhan@linuxfoundation.org, li.meng@amd.com, ray.huang@amd.com
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
darcari@redhat.com
Subject: Re: [PATCH 2/2] cpufreq/amd-pstate: Fix the scaling_min/max_freq setting on shared memory CPPC systems
Date: Wed, 26 Jun 2024 13:27:52 +0530 [thread overview]
Message-ID: <9b4251e1-e250-4b79-8e08-5ca8e44fb101@amd.com> (raw)
In-Reply-To: <8734p02s4t.fsf@BLR-5CG11610CF.amd.com>
Hello Gautham,
On 6/26/2024 10:54 AM, Gautham R.Shenoy wrote:
> Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> writes:
>
>> On shared memory CPPC systems, with amd_pstate=active mode, the change
>> in scaling_min/max_freq doesn't get written to the shared memory
>> region. Due to this, the writes to the scaling_min/max_freq sysfs file
>> don't take effect. Fix this by propagating the scaling_min/max_freq
>> changes to the shared memory region.
>>
>> Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors")
>> Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
>
> Please add the following in your v2:
>
> Reported-by: David Arcari <darcari@redhat.com>
Yup, will add.
Thanks,
Dhananjay
>
>> ---
>> drivers/cpufreq/amd-pstate.c | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
>> index 9ad62dbe8bfb..7c1c96abe5bd 100644
>> --- a/drivers/cpufreq/amd-pstate.c
>> +++ b/drivers/cpufreq/amd-pstate.c
>> @@ -264,6 +264,15 @@ static int amd_pstate_set_epp(struct amd_cpudata *cpudata, u32 epp)
>> cpudata->epp_cached = epp;
>> } else {
>> perf_ctrls.energy_perf = epp;
>> + perf_ctrls.max_perf = cpudata->max_limit_perf;
>> + perf_ctrls.min_perf = cpudata->min_limit_perf;
>> + perf_ctrls.desired_perf = 0U;
>> +
>> + ret = cppc_set_perf(cpudata->cpu, &perf_ctrls);
>> + if (ret) {
>> + pr_debug("failed to set min max limits (%d)\n", ret);
>> + return ret;
>> + }
>> ret = cppc_set_epp_perf(cpudata->cpu, &perf_ctrls, 1);
>> if (ret) {
>> pr_debug("failed to set energy perf value (%d)\n", ret);
>> @@ -1547,6 +1556,7 @@ static void amd_pstate_epp_update_limit(struct cpufreq_policy *policy)
>> }
>>
>> WRITE_ONCE(cpudata->cppc_req_cached, value);
>> +
>> amd_pstate_set_epp(cpudata, epp);
>> }
>>
>> --
>
> --
> Thanks and Regards
> gautham.
prev parent reply other threads:[~2024-06-26 7:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 13:41 [PATCH 0/2] AMD Pstate driver fixes Dhananjay Ugwekar
2024-06-25 13:41 ` [PATCH 1/2] cpufreq/amd-pstate-ut: Handle the inconsistency Dhananjay Ugwekar
2024-06-25 13:51 ` Dhananjay Ugwekar
2024-06-25 15:11 ` Mario Limonciello
2024-06-26 7:56 ` Dhananjay Ugwekar
2024-06-26 1:49 ` Meng, Li (Jassmine)
2024-06-26 5:22 ` Gautham R.Shenoy
2024-06-26 6:45 ` Dhananjay Ugwekar
2024-06-25 15:05 ` Mario Limonciello
2024-06-26 8:02 ` Dhananjay Ugwekar
2024-06-25 13:41 ` [PATCH 2/2] cpufreq/amd-pstate: Fix the scaling_min/max_freq setting on shared memory CPPC systems Dhananjay Ugwekar
2024-06-25 15:09 ` Mario Limonciello
2024-06-26 8:10 ` Dhananjay Ugwekar
2024-06-26 5:24 ` Gautham R.Shenoy
2024-06-26 7:57 ` Dhananjay Ugwekar [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=9b4251e1-e250-4b79-8e08-5ca8e44fb101@amd.com \
--to=dhananjay.ugwekar@amd.com \
--cc=darcari@redhat.com \
--cc=gautham.shenoy@amd.com \
--cc=li.meng@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=perry.yuan@amd.com \
--cc=rafael@kernel.org \
--cc=ray.huang@amd.com \
--cc=skhan@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.