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>
In nvhost_pod_estimate_freq(), we return
GET_TARGET_FREQ_DONTSCALE if new frequency is same
as current frequency
And based on this return value, update_devfreq()
will just return without actually calling target()
function
But it is possible that target() function has freq
clipping of its own, and skipping target() itself
will break this
Hence in case we find new frequency same as current
frequency, do not return GET_TARGET_FREQ_DONTSCALE
Instead just return 0
Note that we still return GET_TARGET_FREQ_DONTSCALE
if governor itself is disabled, and this is
required in perf measurement cases
Bug 200245796
Change-Id: I55a3a344982c5b5441ba011cd0dd254947e89e5c
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1251841
(cherry picked from linux-4.9 commit c6417ac88eb43501b8bf6d5351059ac2dadaf2c0)
Reviewed-on: https://git-master.nvidia.com/r/1770145
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>
MODULE_LICENCE was not declared
exit function didnt have an explicit return
linux/module.h wasn't included because of which
module_exit was throwing errors.
Added the statement to do the same.
Bug 200199306
Change-Id: Ib9e3a6f832b75095b9465dbe236a1f1c3606563f
Signed-off-by: Ishan Mittal <imittal@nvidia.com>
(cherry picked from linux-4.9 commit be9e41d39b8f9b6bbd716ea7a26ea7fdec54bad7)
Reviewed-on: https://git-master.nvidia.com/r/1770137
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>
In update_devfreq(), we currently get target frequency,
compare it with previous_freq, and set it only if
new freq is different one
But get_target_freq() (nvhost_pod_estimate_freq())
already takes care of such cases in normal conditions
Hence, remove the check with previous_freq in
update_devfreq()
For case when we disable podgov governor, we might still end
up setting max freq all the time
Hence, add a check on previous_freq, and if previous_freq
is already max, do not set it
Bug 200175874
Bug 200161377
Change-Id: I287d37c07ee6214ed48612482211ce0f45088ca4
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1111437
Reviewed-on: http://git-master/r/1113417
(cherry picked from linux-4.9 commit 9c424ce31bedac5db0c2d93e083f20ea89ed1836)
Reviewed-on: https://git-master.nvidia.com/r/1770136
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>
In nvhost_pod_estimate_freq(), we currently have below
sequence
- profile->get_dev_status()
- check if (!podgov->enable)
- check if (podgov->p_user)
But in case we have podgov disabled, we unnecessarily
call profile->get_dev_status()
Hence, do all such checks before calling get_dev_status()
Bug 200161377
Change-Id: I6128803c21bea6c5efefd517ea1c69e4f1b1597e
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/929508
Reviewed-on: http://git-master/r/933703
(cherry picked from linux-4.9 commit b8d1d439d206887c3cf4ff50119647b02efdae0e)
Reviewed-on: https://git-master.nvidia.com/r/1770135
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>