Skip to content

Commit

Permalink
cpufreq: arm_scmi: Set fast_switch_possible conditionally
Browse files Browse the repository at this point in the history
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 <lukasz.luba@arm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Nicola Mazzucato <nicola.mazzucato@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
  • Loading branch information
Nicola Mazzucato authored and Sudeep Holla committed Jun 30, 2020
1 parent 1909872 commit fb35712
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/cpufreq/scmi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit fb35712

Please sign in to comment.