cpufreq: Use CONFIG_CPU_FREQ_DEFAULT_* to set initial policy for setpolicy drivers
authorJason Baron <jbaron@akamai.com>
Thu, 19 Dec 2013 22:50:50 +0000 (22:50 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 21 Dec 2013 23:51:52 +0000 (00:51 +0100)
commita27a9ab706c8f5bb8bbd320d2e9c5d089e380c6a
tree24c84d839ca15a57ff4aa80c4ff836c8827b5670
parent42f921a6f10c6c2079b093a115eb7e3c3508357f
cpufreq: Use CONFIG_CPU_FREQ_DEFAULT_* to set initial policy for setpolicy drivers

When configuring a default governor (via CONFIG_CPU_FREQ_DEFAULT_*) with the
intel_pstate driver, the desired default policy is not properly set. For
example, setting 'CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE' ends up with the
'powersave' policy being set.

Fix by configuring the correct default policy, if either 'powersave' or
'performance' are requested. Otherwise, fallback to what the driver originally
set via its 'init' routine.

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