cpufreq: Allow dynamic switching with CPUFREQ_ETERNAL latency
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 19 Jul 2017 10:12:49 +0000 (15:42 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 25 Jul 2017 22:15:47 +0000 (00:15 +0200)
With the recent updates, CPUFREQ_ETERNAL is only used by the drivers
which don't know their transition latency but want to use dynamic
switching.

Anyway, the routine cpufreq_policy_transition_delay_us() caps the value
of transition latency to 10 ms now and that can be used safely with such
platforms.

Remove the check from cpufreq_init_governor() and allow dynamic
switching for such configurations as well.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c

index 6ec589c048b2ab35849b54883a03528ce20a8e2e..b2cc98551fc3950513e337298c6714871e5bb6a6 100644 (file)
@@ -2005,8 +2005,7 @@ static int cpufreq_init_governor(struct cpufreq_policy *policy)
 
        /* Platform doesn't want dynamic frequency switching ? */
        if (policy->governor->dynamic_switching &&
-           (cpufreq_driver->flags & CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING ||
-           policy->cpuinfo.transition_latency == CPUFREQ_ETERNAL)) {
+           cpufreq_driver->flags & CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING) {
                struct cpufreq_governor *gov = cpufreq_fallback_governor();
 
                if (gov) {