diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-11-29 03:33:25 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-07-05 12:58:43 -0400 |
commit | 80dca368b8741a216ba904ca12fd3f3adbe63678 (patch) | |
tree | 6d7060a0cc8694438f34429809451f47f3a5f421 | |
parent | 985df87858f9ad4de4dcb7c1cb2c1c0dffe40ad2 (diff) |
devfreq: set current freq in case no change required
API scaling_state_check() returns 0 in case no change
in frequency is required
In nvhost_pod_estimate_freq(), we set *freq to 0
in case scaling_state_check() returns 0
And as a result of this, update_devfreq() will just
keep setting minimum frequency instead of keeping
same frequency - and this results in huge
performance degradation
To fix this, set *freq to current frequency in case
scaling_state_check() returns 0 as estimated
frequency
Bug 200255163
Change-Id: Ia8fe54dfd48b0898cc1dd53d821b1c95865b1f57
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1261281
(cherry picked from linux-4.9 commit 624718566201ce9c0b9780be6f29dc2ae9082b09)
Reviewed-on: https://git-master.nvidia.com/r/1770146
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 | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/devfreq/governor_pod_scaling.c b/drivers/devfreq/governor_pod_scaling.c index 3ffaeb78d..cca369997 100644 --- a/drivers/devfreq/governor_pod_scaling.c +++ b/drivers/devfreq/governor_pod_scaling.c | |||
@@ -799,8 +799,10 @@ static int nvhost_pod_estimate_freq(struct devfreq *df, | |||
799 | msecs_to_jiffies(podgov->p_slowdown_delay)); | 799 | msecs_to_jiffies(podgov->p_slowdown_delay)); |
800 | } | 800 | } |
801 | 801 | ||
802 | if (!(*freq) || | 802 | if (!(*freq)) |
803 | (freqlist_up(podgov, *freq, 0) == dev_stat.current_frequency)) | 803 | *freq = dev_stat.current_frequency; |
804 | |||
805 | if (freqlist_up(podgov, *freq, 0) == dev_stat.current_frequency) | ||
804 | return 0; | 806 | return 0; |
805 | 807 | ||
806 | podgov->last_scale = now; | 808 | podgov->last_scale = now; |