Some distros might use old kernel source but with some latest upstream
kernel patches backported to their kernel source tree. To deal with this
scenario and avoid kernel compilation failure, use conftest to check the
existence of features against the kernel source tree which the OOT
modules are built upon and do the conditional build based on the test
result generated with the conftest tool.
Use NV_DEVFREQ_HAS_FREQ_TABLE to determine whether freq_table field is
there in struct devfreq data strcuture, and choose the correct path for
building the module.
Use tegra_wmark-specific devfreq_get_freq_range always to avoid kernel
version check and conftest check. Since devfreq_get_freq_range exists in
the devfreq-specific governor.h (e.g. drivers/devfreq/governor.h) file
instead of globabl linux kernel include header files
(e.g. include/linux/devfreq.h), conftest cannot be used to the existence
of devfreq_get_freq_range kernel function.
Bug 4884092
Change-Id: I5bde4c712f59f38de74c1d8d95135c9b25d621b1
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220896
(cherry picked from commit c580fd0d06)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220970
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Since K519, devfreq takes the priority of devfreq_dev_profile to save
the frequency table information and the number of frequency steps.
Therefore, change the implementation of tegra_wmark devfreq governor to
use devfreq to access the frequency table information and the nubmer of
frequency steps instead of devfreq_dev_profile.
Bug 4288411
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ib0affdcc8913642167cd82d45d014c46b51a8c38
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2980425
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
When devfreq_suspend_device get called, tegra_wmark will disable the
upper and lower watermark thresholds so that no DFS logic get triggered
after the suspension.
When devfreq_resume_device get called, tegra_wmark will enable back the
upper and lower watermark thresholds so that interrupt-driven DFS logic
can work properly.
Bug 4168788
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I98fa1487db26fdfe95f5c958dbe15bf0f49035d5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2927019
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
The tegra_wmark governor can be used e.g. with DRM clients, such as VIC,
NVDEC, NVENC, and NVJPG. This governor tightly collaborates with the
actmon hardware used for monitoring the active time of the underlying
DRM clients.
Bug 3788919
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ie4d4c2b173615aa239436fbb1545118435629d38
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894529
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>