diff options
author | Bharat Nihalani <bnihalani@nvidia.com> | 2011-05-19 20:09:14 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:52:06 -0800 |
commit | 50e7bec9a160237686686a4b7cf4635c139ecebe (patch) | |
tree | 36433e5c8a4a1ad037ed2b0ebc24e49052e31b9d /arch/arm/mach-tegra/common.c | |
parent | fd9bfdeda6a77297a85156fbf11c9fbbd80da495 (diff) |
ARM: tegra: common: dynamic cpufreq governor
To improve the power consumption situation for MP3 playback
the scaling governor is set to conservative when display
is turned off and the default governor is saved. The governor
is restored when display is turned on.
Bug 817727
Original work done by "Wen Yi <wyi@nvidia.com>"
Original-Change-Id: I43ffb0d508cc6d0a80eeeffcbab77526b644c437
Reviewed-on: http://git-master/r/32194
Reviewed-by: Niket Sirsi <nsirsi@nvidia.com>
Tested-by: Niket Sirsi <nsirsi@nvidia.com>
Rebase-Id: R53c225edaf58a449053f192f03b3c095e54cbfd9
Diffstat (limited to 'arch/arm/mach-tegra/common.c')
-rw-r--r-- | arch/arm/mach-tegra/common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index c1f731c96e99..f7e29a8bb3a8 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c @@ -772,7 +772,7 @@ void __init tegra_release_bootloader_fb(void) pr_err("Failed to free bootloader fb.\n"); } -#if defined CONFIG_HAS_EARLYSUSPEND && defined CONFIG_CPU_FREQ +#ifdef CONFIG_TEGRA_CONVSERVATIVE_GOV_ON_EARLYSUPSEND static char cpufreq_gov_default[32]; static char *cpufreq_gov_conservative = "conservative"; static char *cpufreq_sysfs_place_holder="/sys/devices/system/cpu/cpu%i/cpufreq/scaling_governor"; @@ -787,7 +787,7 @@ static void cpufreq_set_governor(char *governor) if (governor == NULL) return; - for_each_cpu(i, cpu_present_mask) { + for_each_online_cpu(i) { sprintf(buf, cpufreq_sysfs_place_holder, i); scaling_gov = filp_open(buf, O_RDWR, 0); if (scaling_gov != NULL) { @@ -841,4 +841,4 @@ void cpufreq_set_conservative_governor(void) { cpufreq_set_governor(cpufreq_gov_conservative); } -#endif +#endif /* CONFIG_TEGRA_CONVSERVATIVE_GOV_ON_EARLYSUPSEND */ |