cpufreq: Use transition_delay_us for legacy governors as well
The policy->transition_delay_us field is used only by the schedutil governor currently, and this field describes how fast the driver wants the cpufreq governor to change CPUs frequency. It should rather be a common thing across all governors, as it doesn't have any schedutil dependency here. Create a new helper cpufreq_policy_transition_delay_us() to get the transition delay across all governors. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
2d04503632
commit
aa7519af45
@@ -528,16 +528,7 @@ static int sugov_init(struct cpufreq_policy *policy)
|
||||
goto stop_kthread;
|
||||
}
|
||||
|
||||
if (policy->transition_delay_us) {
|
||||
tunables->rate_limit_us = policy->transition_delay_us;
|
||||
} else {
|
||||
unsigned int lat;
|
||||
|
||||
tunables->rate_limit_us = LATENCY_MULTIPLIER;
|
||||
lat = policy->cpuinfo.transition_latency / NSEC_PER_USEC;
|
||||
if (lat)
|
||||
tunables->rate_limit_us *= lat;
|
||||
}
|
||||
tunables->rate_limit_us = cpufreq_policy_transition_delay_us(policy);
|
||||
|
||||
policy->governor_data = sg_policy;
|
||||
sg_policy->tunables = tunables;
|
||||
|
Reference in New Issue
Block a user