diff options
author | Puneet Saxena <puneets@nvidia.com> | 2013-07-15 14:57:12 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:38:18 -0700 |
commit | 595697e54a8b09594955a1459c893246b0c849e1 (patch) | |
tree | 44962f0eff74169258fb20f5a1f2a7a02f3048f6 /drivers/cpufreq | |
parent | 9c0f9ab8deba730966c856403c624616cdd82a19 (diff) |
Cpufreq: interactive: Check actual freq before setting new freq
In case Actual freq is not updated till next timer interrupt
and new target freq comes same as actual freq.
Don't go for setting same frequency again.
Bug 1316765
Reviewed-on: http://git-master/r/249103
(cherry picked from commit d5a4d9622c27db40334ba2df3503c2d2e7457bcb)
Change-Id: If81786911fd85adb8469b49c59f2ab70ae12f96a
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Signed-off-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-on: http://git-master/r/254352
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq_interactive.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c index f7b468f2fd3f..0f76594f98ab 100644 --- a/drivers/cpufreq/cpufreq_interactive.c +++ b/drivers/cpufreq/cpufreq_interactive.c @@ -456,7 +456,12 @@ static void cpufreq_interactive_timer(unsigned long data) pcpu->floor_validate_time = now; } - if (pcpu->target_freq == new_freq) { + /* In case actual freq set in target(policy->cur) is not updated + * till next timer interrupt arrives, new_freq remains same as + * actual freq. Don't go for setting same frequency again. + */ + if (pcpu->target_freq == new_freq + && pcpu->policy->cur == new_freq) { trace_cpufreq_interactive_already( data, cpu_load, pcpu->target_freq, pcpu->policy->cur, new_freq); |