diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-12-05 09:22:35 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-07-05 12:58:54 -0400 |
commit | f3c01ef1b2b1abb1ef667675e83d1a43efc173db (patch) | |
tree | cb9f94267f6cda53d5640a0fe6a0c7444bcc82e4 | |
parent | 9a955a07091f114d4b7767cf0e1eecc434e985e8 (diff) |
devfreq: don't set last_scale for same freq
In nvhost_pod_estimate_freq(), we have *freq = 0
in case we decide to keep same frequency
In that case we set *freq as current frequency and
then set last_scale timestamp
This can result in keeping same frequency for
long duration due to less delta from last_scale
To fix this, return immediately in case *freq
is zero and do not set last_scale timestamp
Bug 200255163
Change-Id: Ie13bf54e2415c4016a101b9ea12a9abda83240fd
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1265185
Reviewed-on: http://git-master/r/1506359
(cherry picked from linux-4.9 commit be5331c94ebe9044cb67e3f622db517bfb7e28d4)
Reviewed-on: https://git-master.nvidia.com/r/1770149
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/devfreq/governor_pod_scaling.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/devfreq/governor_pod_scaling.c b/drivers/devfreq/governor_pod_scaling.c index 1849a85f9..d7250a176 100644 --- a/drivers/devfreq/governor_pod_scaling.c +++ b/drivers/devfreq/governor_pod_scaling.c | |||
@@ -669,8 +669,10 @@ static int nvhost_pod_estimate_freq(struct devfreq *df, | |||
669 | msecs_to_jiffies(podgov->p_slowdown_delay)); | 669 | msecs_to_jiffies(podgov->p_slowdown_delay)); |
670 | } | 670 | } |
671 | 671 | ||
672 | if (!(*freq)) | 672 | if (!(*freq)) { |
673 | *freq = dev_stat.current_frequency; | 673 | *freq = dev_stat.current_frequency; |
674 | return 0; | ||
675 | } | ||
674 | 676 | ||
675 | if (freqlist_up(podgov, *freq, 0) == dev_stat.current_frequency) | 677 | if (freqlist_up(podgov, *freq, 0) == dev_stat.current_frequency) |
676 | return 0; | 678 | return 0; |