mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[CPUFREQ] Only check for transition latency on problematic governors (kconfig fix)
Cc: Adrian Bunk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Dave Jones <[email protected]>
This commit is contained in:
parent
1c2562459f
commit
6afde10c3f
2 changed files with 22 additions and 8 deletions
|
|
@ -1484,17 +1484,30 @@ static int __cpufreq_governor(struct cpufreq_policy *policy,
|
|||
unsigned int event)
|
||||
{
|
||||
int ret;
|
||||
struct cpufreq_governor *gov = CPUFREQ_PERFORMANCE_GOVERNOR;
|
||||
|
||||
/* Only must be defined when default governor is known to have latency
|
||||
restrictions, like e.g. conservative or ondemand.
|
||||
That this is the case is already ensured in Kconfig
|
||||
*/
|
||||
#ifdef CONFIG_CPU_FREQ_GOV_PERFORMANCE
|
||||
struct cpufreq_governor *gov = &cpufreq_gov_performance;
|
||||
#else
|
||||
struct cpufreq_governor *gov = NULL;
|
||||
#endif
|
||||
|
||||
if (policy->governor->max_transition_latency &&
|
||||
policy->cpuinfo.transition_latency >
|
||||
policy->governor->max_transition_latency) {
|
||||
printk(KERN_WARNING "%s governor failed, too long"
|
||||
" transition latency of HW, fallback"
|
||||
" to %s governor\n",
|
||||
policy->governor->name,
|
||||
gov->name);
|
||||
policy->governor = gov;
|
||||
if (!gov)
|
||||
return -EINVAL;
|
||||
else {
|
||||
printk(KERN_WARNING "%s governor failed, too long"
|
||||
" transition latency of HW, fallback"
|
||||
" to %s governor\n",
|
||||
policy->governor->name,
|
||||
gov->name);
|
||||
policy->governor = gov;
|
||||
}
|
||||
}
|
||||
|
||||
if (!try_module_get(policy->governor->owner))
|
||||
|
|
|
|||
Loading…
Reference in a new issue