From: Sudeep Holla <sudeep.holla@kernel.org>
To: Dale Whinham <daleyo@gmail.com>
Cc: Cristian Marussi <cristian.marussi@arm.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Sibi Sankar <sibi.sankar@oss.qualcomm.com>,
Dhruva Gole <d-gole@ti.com>, Haipeng Lin <jimmie.lin@gmail.com>,
Sudeep Holla <sudeep.holla@kernel.org>,
Charlie Garner <charlie@akao.au>,
arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] firmware: arm_scmi: Don't mark OPPs as turbo without a sustained frequency
Date: Mon, 23 Nov 2026 10:26:05 +0000 [thread overview]
Message-ID: <20261123-eccentric-ludicrous-roadrunner-0a7efe@sudeepholla> (raw)
In-Reply-To: <20261121-sp11-noturbo-v1-1-37e1083cec5b@gmail.com>
On Sat, Nov 21, 2026 at 12:56:02AM +0000, Dale Whinham wrote:
> If the firmware reports a sustained frequency of 0, every OPP is marked
> as turbo. With boost disabled, cpufreq then has no usable frequencies and
> fails to create a policy for the domain.
>
> The Surface Pro 11 (X1P64100) CPUCP firmware does this for the two
> clusters that have a core fused off.
>
> Treat 0 as "not provided" and don't mark any OPPs as turbo.
>
Charlie had posted a fix for this a while ago but never got back to my
comments.[1]
> Fixes: a897575e79d7 ("firmware: arm_scmi: Add support for marking certain frequencies as turbo")
> Cc: stable@vger.kernel.org
> Tested-by: Haipeng Lin <jimmie.lin@gmail.com>
> Signed-off-by: Dale Whinham <daleyo@gmail.com>
> ---
> From decompiling the CPUCP firmware: it reports as sustained the first
> LUT entry rated for exactly the cluster's fused core count, or 0 if
> there is none. On X1P64100, clusters 1 and 2 have 3 cores but only
> 4-core LUT entries, so they get 0. X1E80100 reports non-zero values and
> is unaffected.
> ---
> drivers/firmware/arm_scmi/perf.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c
> index 0116ffb2b279..d4394984a0f5 100644
> --- a/drivers/firmware/arm_scmi/perf.c
> +++ b/drivers/firmware/arm_scmi/perf.c
> @@ -879,8 +879,13 @@ static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph,
> else
> freq = dom->opp[idx].indicative_freq * dom->mult_factor;
>
> - /* All OPPs above the sustained frequency are treated as turbo */
> - data.turbo = freq > dom->sustained_freq_khz * 1000UL;
> + /*
> + * All OPPs above the sustained frequency are treated as turbo.
> + * A sustained frequency of 0 means the firmware didn't provide
> + * one, so don't mark anything as turbo in that case.
> + */
> + data.turbo = dom->sustained_freq_khz &&
> + freq > dom->sustained_freq_khz * 1000UL;
I worked out something very similar as a solution. Anyways does it work
if we also add the check for non-zero dom->sustained_perf_level ?
No need to repost if you agree, I will fix it up while applying ?
--
Regards,
Sudeep
[1] https://lore.kernel.org/arm-scmi/20260923152245.44624-1-charlie@akao.au
prev parent reply other threads:[~2026-11-23 10:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 0:56 [PATCH] firmware: arm_scmi: Don't mark OPPs as turbo without a sustained frequency Dale Whinham
2026-11-23 10:26 ` Sudeep Holla [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=20261123-eccentric-ludicrous-roadrunner-0a7efe@sudeepholla \
--to=sudeep.holla@kernel.org \
--cc=arm-scmi@vger.kernel.org \
--cc=charlie@akao.au \
--cc=cristian.marussi@arm.com \
--cc=d-gole@ti.com \
--cc=daleyo@gmail.com \
--cc=jimmie.lin@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sibi.sankar@oss.qualcomm.com \
--cc=stable@vger.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