From: Nicola Mazzucato Date: Wed, 17 Jun 2020 09:43:32 +0000 (+0100) Subject: cpufreq: arm_scmi: Set fast_switch_possible conditionally X-Git-Tag: block-5.9-2020-08-14~51^2~15^2~17 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=fb3571276b970cbe7b45ecdc762e92f3f305ad6d;p=linux-block.git cpufreq: arm_scmi: Set fast_switch_possible conditionally Currently the fast_switch_possible flag is set unconditionally to true. Based on this, schedutil does not create a thread for frequency switching and would always use the fast switch path. However, if the platform does not support SCMI fast channel, we use polling mode for SCMI message transfer. This may be possible only if there is dedicated channel for DVFS and all operations are in polling mode. Update this by retrieving the fast_switch capability based on the presence of fast channels in SCMI platform firmware. Link: https://lore.kernel.org/r/20200617094332.8391-2-nicola.mazzucato@arm.com Suggested-by: Lukasz Luba Acked-by: Viresh Kumar Signed-off-by: Nicola Mazzucato Signed-off-by: Sudeep Holla --- diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c index 61623e2ff149..1cf688fcb56b 100644 --- a/drivers/cpufreq/scmi-cpufreq.c +++ b/drivers/cpufreq/scmi-cpufreq.c @@ -198,7 +198,8 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = latency; - policy->fast_switch_possible = true; + policy->fast_switch_possible = + handle->perf_ops->fast_switch_possible(handle, cpu_dev); em_register_perf_domain(policy->cpus, nr_opp, &em_cb);