Johnny Liu
cbde6ba274
gpu: host1x: NULL check before get_rate
...
Avoid calling get_rate function pointer when it is not supported by
the client driver.
Bug 4338396
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Iee7f26865d82235de7a5b41347546c1195a7ea48
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3000315
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-10-20 01:33:26 -07:00
Jon Hunter
07dbfa8de1
gpu: host1x: Make host1x_actmon_unregister() return void
...
The function host1x_actmon_unregister() never fails and so never returns
an error. Make this function return void to simplify the code.
Bug 4303860
Change-Id: I9e1cd403bd6db8e2d4ac6831ed26e1436638456f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2986789
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-09-28 22:00:51 -07:00
Jon Hunter
620319b7c8
gpu: host1x: Remove unused variable
...
Building the host1x driver generates the following warning ...
drivers/gpu/host1x/actmon.c:334:16:
warning: unused variable ‘err’ [-Wunused-variable]
334 | int i, err;
| ^~~
Fix this by removing the unused variable.
Bug 4190030
Change-Id: I1c026253793a850bc2ac0d7778029407cc79f162
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934694
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Johnny Liu <johnliu@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-07-12 19:11:43 -07:00
Johnny Liu
af2ced3322
gpu: host1x: Disable actmon by default
...
Disable actmon by default and export the controllability of enabling and
disabling the actmon.
DRM clients should enable the actmon in the runtime resume cycle, and
disable the actmon in the runtime suspend cycle.
Bug 4168788
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: I72bcd6d92383595a41c2de5cad708610a205ba25
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931874
Reviewed-by: Santosh BS <santoshb@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-07-07 07:00:47 -07:00
brucex
2782ba9e41
gpu: host1x: Fix for const correctness in actmon code
...
Building the Android Common Kernel (ACK) with clang exposes build
errors due to const correctness issues in actmon code.
Remove actmon name when it is not necessary.
Set host1x_info var as const.
Set host1x_actmon_entry var as const.
Bug 3974840
Change-Id: I50c1437199ad549f397944aefa535103ed2fa05c
Signed-off-by: Bruce Xu <brucex@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921160
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
Reviewed-by: Johnny Liu <johnliu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-19 22:03:18 -07:00
Johnny Liu
18b0b032d4
gpu: host1x: Support updating actmon watermark
...
Add support for updating actmon watermark thresholds so that
actmon DFS can work properly.
Add support for enabling or disabling watermark interrupts.
Bug 3788919
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Id1d0b744bc8a0a19fccbb3044d4267ae35cd5feb
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2897816
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-09 22:27:19 -07:00
Johnny Liu
3b42f92d4d
gpu: host1x: Export normalized actmon active time
...
The exported interface will be used by devfreq framework to get the
load information of the monitored device.
Bug 3788919
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Id95c8398f44e2c94bd83c1f83d7a7d93d1f2609d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2892879
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-28 03:33:02 -07:00
Johnny Liu
03fd3f1188
gpu: host1x: Enable general interrupts for actmon
...
Host1x general interrupts include actmon-related interrupts, axi
timeout interrupts, and illegal access interrupts. This change enables
actmon-related interrupts only.
Bug 3788919
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Iea1f1622a11afa72f70f8d10efebd857a51cc4e2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889825
Reviewed-by: Mikko Perttunen <mperttunen@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 <buildbot_gerritrpt@nvidia.com >
2023-04-28 03:32:38 -07:00
Johnny Liu
fa8cf02e87
gpu: host1x: Add actmon registration interface
...
Provide the actmon registration interface for host1x clients. The
registration process will create the debugfs for the actmon associated
with the host1x client, and initialize the actmon registers.
Bug 3788919
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: I313bf52a5eda1663e26c2579788a873ca4081459
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2886696
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-19 10:49:34 -07:00
Mikko Perttunen
41a9f72f78
gpu: host1x: Add API for reading actmon count
...
Add API for reading the activity monitor average count for VIC,
NVENC, and NVDEC. There is currently no support for initializing
actmon, so this relies on someone else on a virtualized system
having initialized it (and mapped the actmon region read-only).
Bug 3973633
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com >
Change-Id: Ia1bfec6a090d4effb288b17cbac4d42bf5d0b4e5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2864719
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-03 12:36:26 +00:00