2024-03-12 09:50:04

by Sibi Sankar

[permalink] [raw]
Subject: [PATCH V4 1/2] firmware: arm_scmi: Add support for marking certain frequencies as turbo

All opps above the sustained frequency are treated as turbo, so mark them
accordingly.

Suggested-by: Sudeep Holla <[email protected]>
Reviewed-by: Sudeep Holla <[email protected]>
Signed-off-by: Sibi Sankar <[email protected]>
---

v4:
* Pickup Rbs
* Use turbo and simplify setting turbo. [Dhruva/Viresh]

drivers/firmware/arm_scmi/perf.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c
index 8e832d1ad825..345fff167b52 100644
--- a/drivers/firmware/arm_scmi/perf.c
+++ b/drivers/firmware/arm_scmi/perf.c
@@ -871,6 +871,9 @@ 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 * 1000;
+
data.level = dom->opp[idx].perf;
data.freq = freq;

--
2.34.1



2024-03-12 12:10:25

by Dhruva Gole

[permalink] [raw]
Subject: Re: [PATCH V4 1/2] firmware: arm_scmi: Add support for marking certain frequencies as turbo

On Mar 12, 2024 at 15:17:25 +0530, Sibi Sankar wrote:
> All opps above the sustained frequency are treated as turbo, so mark them
> accordingly.
>
> Suggested-by: Sudeep Holla <[email protected]>
> Reviewed-by: Sudeep Holla <[email protected]>
> Signed-off-by: Sibi Sankar <[email protected]>
> ---
>
> v4:
> * Pickup Rbs
> * Use turbo and simplify setting turbo. [Dhruva/Viresh]
>
> drivers/firmware/arm_scmi/perf.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c
> index 8e832d1ad825..345fff167b52 100644
> --- a/drivers/firmware/arm_scmi/perf.c
> +++ b/drivers/firmware/arm_scmi/perf.c
> @@ -871,6 +871,9 @@ 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 * 1000;
> +

Reviewed-by: Dhruva Gole <[email protected]>

> data.level = dom->opp[idx].perf;
> data.freq = freq;
>
> --
> 2.34.1
>

--
Best regards,
Dhruva Gole <[email protected]>