From: Dale Whinham <daleyo@gmail.com>
To: Sudeep Holla <sudeep.holla@kernel.org>,
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>
Cc: Haipeng Lin <jimmie.lin@gmail.com>,
arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Dale Whinham <daleyo@gmail.com>
Subject: [PATCH] firmware: arm_scmi: Don't mark OPPs as turbo without a sustained frequency
Date: Sat, 21 Nov 2026 00:56:02 +0000 [thread overview]
Message-ID: <20261121-sp11-noturbo-v1-1-37e1083cec5b@gmail.com> (raw)
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.
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;
data.level = dom->opp[idx].perf;
data.freq = freq;
---
base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
change-id: 20261121-sp11-noturbo-becde22ce314
Best regards,
--
Dale Whinham <daleyo@gmail.com>
next reply other threads:[~2026-11-21 0:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 0:56 Dale Whinham [this message]
2026-11-23 10:26 ` Sudeep Holla
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=20261121-sp11-noturbo-v1-1-37e1083cec5b@gmail.com \
--to=daleyo@gmail.com \
--cc=arm-scmi@vger.kernel.org \
--cc=cristian.marussi@arm.com \
--cc=d-gole@ti.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=sudeep.holla@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®