diff mbox series

[V4,1/2] firmware: arm_scmi: Add support for marking certain frequencies as turbo

Message ID 20240312094726.3438322-2-quic_sibis@quicinc.com
State Accepted
Commit a897575e79d7a2ec79abe942b50ecd1d1cdd821b
Headers show
Series cpufreq: scmi: Add boost frequency support | expand

Commit Message

Sibi Sankar March 12, 2024, 9:47 a.m. UTC
All opps above the sustained frequency are treated as turbo, so mark them
accordingly.

Suggested-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
---

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

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

Comments

Dhruva Gole March 12, 2024, 12:09 p.m. UTC | #1
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 <sudeep.holla@arm.com>
> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
> Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
> ---
> 
> 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 <d-gole@ti.com>

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

Patch

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;