From: Pierre Gondois <pierre.gondois@arm.com>
To: Sibi Sankar <quic_sibis@quicinc.com>, cristian.marussi@arm.com
Cc: linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com,
sboyd@kernel.org, lukasz.luba@arm.com, dietmar.eggemann@arm.com,
morten.rasmussen@arm.com, viresh.kumar@linaro.org,
rafael@kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, quic_mdtipton@quicinc.com,
linux-arm-msm@vger.kernel.org, nm@ti.com
Subject: Re: [PATCH 2/3] firmware: arm_scmi: Add support for marking certain frequencies as boost
Date: Wed, 31 Jan 2024 15:29:43 +0100 [thread overview]
Message-ID: <e3abe1ab-064f-4a6a-a91d-fe8c91574600@arm.com> (raw)
In-Reply-To: <20240117110443.2060704-3-quic_sibis@quicinc.com>
Hello Sibi,
On 1/17/24 12:04, Sibi Sankar wrote:
> All opps above the sustained level/frequency are treated as boost, so mark
> them accordingly.
>
> Suggested-by: Sudeep Holla <sudeep.holla@arm.com>
> Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
> ---
> drivers/firmware/arm_scmi/perf.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c
> index e286f04ee6e3..d3fb8c804b3d 100644
> --- a/drivers/firmware/arm_scmi/perf.c
> +++ b/drivers/firmware/arm_scmi/perf.c
> @@ -811,7 +811,7 @@ static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph,
> struct device *dev, u32 domain)
> {
> int idx, ret;
> - unsigned long freq;
> + unsigned long freq, sustained_freq;
> struct dev_pm_opp_data data = {};
> struct perf_dom_info *dom;
>
> @@ -819,12 +819,21 @@ static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph,
> if (IS_ERR(dom))
> return PTR_ERR(dom);
>
> + if (!dom->level_indexing_mode)
> + sustained_freq = dom->sustained_perf_level * dom->mult_factor;
> + else
> + sustained_freq = dom->sustained_freq_khz * dom->mult_factor;
> +
> for (idx = 0; idx < dom->opp_count; idx++) {
> if (!dom->level_indexing_mode)
> freq = dom->opp[idx].perf * dom->mult_factor;
> else
> freq = dom->opp[idx].indicative_freq * dom->mult_factor;
>
> + /* All opps above the sustained level/frequency are treated as boost */
> + if (sustained_freq && freq > sustained_freq)
It seems the sustained_freq is not optional since SCMI v1.0,
is it necessary to check that (sustained_freq != 0) ?
> + data.turbo = true;
> +
> data.level = dom->opp[idx].perf;
> data.freq = freq;
>
next prev parent reply other threads:[~2024-01-31 14:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 11:04 [PATCH 0/3] cpufreq: scmi: Add boost frequency support Sibi Sankar
2024-01-17 11:04 ` [PATCH 1/3] OPP: Extend dev_pm_opp_data with turbo support Sibi Sankar
2024-02-26 16:29 ` Lukasz Luba
2024-01-17 11:04 ` [PATCH 2/3] firmware: arm_scmi: Add support for marking certain frequencies as boost Sibi Sankar
2024-01-31 11:25 ` Sudeep Holla
2024-02-13 8:30 ` Sibi Sankar
2024-01-31 14:29 ` Pierre Gondois [this message]
2024-01-31 16:08 ` Sudeep Holla
2024-02-13 8:03 ` Sibi Sankar
2024-01-17 11:04 ` [PATCH 3/3] cpufreq: scmi: Enable boost support Sibi Sankar
2024-01-23 6:08 ` [PATCH 0/3] cpufreq: scmi: Add boost frequency support Viresh Kumar
2024-01-23 8:49 ` Cristian Marussi
2024-01-23 10:15 ` Sudeep Holla
2024-01-31 15:07 ` Dietmar Eggemann
2024-01-31 16:12 ` Sudeep Holla
2024-02-13 8:35 ` Sibi Sankar
2024-02-15 14:57 ` Dietmar Eggemann
2024-02-27 18:44 ` Sibi Sankar
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=e3abe1ab-064f-4a6a-a91d-fe8c91574600@arm.com \
--to=pierre.gondois@arm.com \
--cc=cristian.marussi@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=morten.rasmussen@arm.com \
--cc=nm@ti.com \
--cc=quic_mdtipton@quicinc.com \
--cc=quic_sibis@quicinc.com \
--cc=rafael@kernel.org \
--cc=sboyd@kernel.org \
--cc=sudeep.holla@arm.com \
--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®