[PATCH v1 3/4] cpufreq: Centralize boost freq QoS requests
From: Pierre Gondois
Date: Thu Dec 04 2025 - 05:14:08 EST
policy_set_boost() calls the cpufreq set_boost callback.
Update the newly added boost_freq_req request from there:
- whenever boost is toggled
- to cover all possible paths
Signed-off-by: Pierre Gondois <pierre.gondois@xxxxxxx>
---
drivers/cpufreq/cpufreq.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 23f64346b80f8..9d98b98e7981c 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -603,10 +603,16 @@ static int policy_set_boost(struct cpufreq_policy *policy, bool enable)
policy->boost_enabled = enable;
ret = cpufreq_driver->set_boost(policy, enable);
- if (ret)
+ if (ret) {
policy->boost_enabled = !policy->boost_enabled;
+ return ret;
+ }
- return ret;
+ ret = freq_qos_update_request(policy->boost_freq_req, policy->cpuinfo.max_freq);
+ if (ret < 0)
+ return ret;
+
+ return 0;
}
static ssize_t store_local_boost(struct cpufreq_policy *policy,
--
2.43.0