Skip to content

Commit 11847a5

Browse files
committed
cpufreq: scmi: Set .set_boost directly
The boost feature can be controlled at two levels currently, driver level (applies to all policies) and per-policy. Currently the driver enables driver level boost support from the per-policy ->init() callback, which isn't really efficient as that gets called for each policy and then there is online/offline path too where this gets done unnecessarily. Instead set the .set_boost field directly and always enable the boost support. If a policy doesn't support boost feature, the core will not enable it for that policy. Keep the initial state of driver level boost to disabled and let the user enable it if required as ideally the boost frequencies must be used only when really required. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Sudeep Holla <sudeep.holla@arm.com>
1 parent 3fd9203 commit 11847a5

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

drivers/cpufreq/scmi-cpufreq.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -297,16 +297,6 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
297297
policy->transition_delay_us =
298298
scmi_get_rate_limit(domain, policy->fast_switch_possible);
299299

300-
if (policy_has_boost_freq(policy)) {
301-
ret = cpufreq_enable_boost_support();
302-
if (ret) {
303-
dev_warn(cpu_dev, "failed to enable boost: %d\n", ret);
304-
goto out_free_table;
305-
} else {
306-
scmi_cpufreq_driver.boost_enabled = true;
307-
}
308-
}
309-
310300
ret = freq_qos_add_request(&policy->constraints, &priv->limits_freq_req, FREQ_QOS_MAX,
311301
FREQ_QOS_MAX_DEFAULT_VALUE);
312302
if (ret < 0) {
@@ -394,6 +384,7 @@ static struct cpufreq_driver scmi_cpufreq_driver = {
394384
.init = scmi_cpufreq_init,
395385
.exit = scmi_cpufreq_exit,
396386
.register_em = scmi_cpufreq_register_em,
387+
.set_boost = cpufreq_boost_set_sw,
397388
};
398389

399390
static int scmi_cpufreq_probe(struct scmi_device *sdev)

0 commit comments

Comments
 (0)