Commit Graph

11 Commits

Author SHA1 Message Date
Ankita Garg
628e74016a nvidia-oot: Disable tegra_wmark in ACK
Temporarily disable these modules in android common kernel(ACK), due to
the build errors encountered when using clang.

Bug 3974840

Change-Id: I3a8d63112ac3ff7c8ac3a7dfe6fd757553cd8c57
Signed-off-by: Bruce Xu <brucex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921067
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-19 12:33:00 -07:00
Johnny Liu
d06443deae devfreq: Add tegra_wmark governor
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>
2023-05-09 22:27:14 -07:00
Johnny Liu
85c4d41d99 devfreq: Get rid of unused CONFIGs
Remove the config variables as there is no Kconfig to define
these configs:
   CONFIG_DEVFREQ_GOV_WMARK_SIMPLE
   CONFIG_DEVFREQ_GOV_WMARK_ACTIVE

Remove the handling of non-module build as devfreq is always
build as module.

Remove the wmark-related devfreq governors as we plan to keep
them under drivers/gpu/drm/tegra. They are tightly bound with
the actmon and drm drivers.

Bug 4074863

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Iba8f5da770d86ddcfb6315f72fd74fc9a781ab39
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2893701
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-28 08:10:27 -07:00
Laxman Dewangan
b866f4df8e devfreq: Get rid of explicit header inclusion
The required headers for devfreq driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.

Bug 4087103

Change-Id: I44793d4584479ba8148da310172749cfb58b8332
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894610
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-27 08:15:01 -07:00
Laxman Dewangan
b34923cfa5 devfreq: Enable module build for OOT
If CONFIG_TEGRA_OOT_MODULE is set as m then build devfreq
governor governor_pod_scaling_v2 as module.

Bug 3674466

Change-Id: Idfcc6178b92f304eadd08cc8c8aba0df46ee1238
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2726202
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-04 05:18:03 +00:00
Peng Liu
8a2d6e1b54 devfreq: pod v2: build as ext module for kstable
governor_pod_scaling_v2 will be provided as a kernel module in future
NVIDIA software deliverables for Linux platforms. As of this moment, the
function that returns the range of the device's scaling frequency hasn't
been exposed from Linux kernel for modules to call. A similar function
is implemented in the governor_pod_scaling_v2, but this function cannot
get the frequency constraints put through the PM QOS interface due to
the same reason, lack of kernel API function. An upstream kernel patch
has been proposed by the power management maintainer to provide the
function needed by governor_pod_scaling_v2, but it's not in any release
kernel yet. For now, PM QOS support is removed from
governor_pod_scaling_v2 and it will be added back when the upstream
kernel patch is available in kernel releases.

drivers_devfreq_governor_5_14.h is a copy of drivers/devfreq/governor.h
of Linux kernel 5.14. Having this copy is to avoid introducing the
dependency on Linux source for building the podgov as external module.

JIRA ID: LS-418

Signed-off-by: Peng Liu <pengliu@nvidia.com>
Change-Id: I0c70acf5679fed53f30bc3ba7c01ea571036cc5e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2638232
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-04 05:18:03 +00:00
Aaron Tian
008fd60935 devfreq: introduce DEVFREQ_GOV_POD_SCALING_V2
Introduce DEVFREQ_GOV_POD_SCALING_V2 for podgov
governor implementation on kernel-5.9 and later
version to address major changes in upstream
devfreq framework.

1. devfreq framework uses devm_pm_qos to store
   "min/max frequency request from user-space",
   which caused 'min_freq' & 'max_freq' field
   in struct devfreq have been removed.
2. DEVFREQ_GOV_INTERVAL renamed as DEVFREQ_GOV_UPDATE_INTERVAL, and
   devfreq_interval_update() renamed as devfreq_update_interval()
3. return type of debugfs_create_u32() changed to void

Bug 200639056

Change-Id: I673ae3ac6b55b26766253ae0f1aeba181e2e0b53
Signed-off-by: Aaron Tian <atian@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2400108
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Timo Alho
7641694f0a devfreq: add core kernel directory to include path
Add include path pointing to core kernel repository in order for the
drivers to include "governor.h" and possibly other local header files
from there.

Bug 2246029

Change-Id: Ic4e31e51c6ef6fa8b2f9ef6ce19e4ae87f90a1f3
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1774215
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2023-04-04 05:18:03 +00:00
Timo Alho
6ab5d16908 devfreq: add Makefile and Kconfig for Nvidia governors
POD_SCALING, WMARK_ACTIVE, and WMARK_SIMPLE devfreq scaling governors
were moved to linux-nvidia repository. Add corresponding Kconfig and
Makefile for them.

Bug 200427621

Change-Id: Ib6e9416c11c5a6938c472ebf2d9480d85ddd473d
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1770155
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Laxman Dewangan
cfaad5bd1c devfreq: remove Makefile to prepare for driver integration
The devfreq drivers are available in kernel/nvidia and it
is required to integrate in kernel/nvidia-oot.

Remove Makefile so avoid makefile conflict.

Bug 4038415

Change-Id: If0e81b66271d65c5a6d613d61be0e95d1af503e1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-04-04 05:15:37 +00:00
Laxman Dewangan
b2a93e8e3b devfreq: Build governor pod scaling as OOT module
Make pod scaling governor as the OOT module.

Bug 3674466

Change-Id: Id99a72f508889d0b9c416ba908f8a2de62c594d1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2726249
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-06-08 21:46:31 -07:00