Johnny Liu
d6a45460a5
drm/tegra: Set nvenc actmon count weight once
...
Change the implementation to set count weight values for both actmon and
the engine once in runtime resume cycle to align the implementation as
nvdec for kernel upstream.
Bug 4251915
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Ie2df685e990a4ebcd5a83db23db3c3bc8ab2af37
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2965502
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-08-23 02:34:04 -07:00
Johnny Liu
f279ce0dfc
drm/tegra: Set vic actmon count weight once
...
Change the implementation to set count weight values for both actmon and
the engine once in runtime resume cycle to align the implementation as
nvdec for kernel upstream.
Bug 4251915
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: I63f625a2f64eb8c626c21389b5a3680001495fd5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2965500
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-08-23 02:33:58 -07:00
Mainak Sen
420b84b69d
drm/tegra: Stop channel DMA during suspend
...
When channels are kept open over a suspend cycle, we need to
re-initialize CDMA after resume.
Bug 4133027
Change-Id: I9a2737b377a9ffb37e5f98703b7928bfceab58e3
Signed-off-by: Mainak Sen <msen@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2963164
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-08-17 20:43:47 -07:00
Bruce Xu
db10888783
nvidia-oot: set/clear vm_flags via function
...
In new kernel, need to update vm_flags via kernel
provided function. Otherwise below error is met:
./include/linux/mm_types.h:476:20: note: non-static data member
'vm_flags' declared const here
const vm_flags_t vm_flags;
~~~~~~~~~~~~~~~~~^~~~~~~~
1 error generated.
Bug 4196760
Change-Id: I03455af7ce3623d0d8a0f0cd56d569ef3c7af9ea
Signed-off-by: Bruce Xu <brucex@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938942
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-08-11 05:19:43 -07:00
Johnny Liu
d412dc39e1
drm/tegra: Set actmon count weight for nvdec once
...
Method invocation for updating count weight for nvdec may conflict
with a job being submitted through host1x.
Change the implementation to set count weight values for both actmon and
the engine once in runtime resume cycle to prevent possible conflicts.
Bug 3962196
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: I19d160abd90373721df78cdb107ca396a206a6e8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2952692
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-08-09 10:50:55 -07:00
Johnny Liu
69d9f479a4
drm/tegra: Unify logic for suspend and resume
...
Two main changes for the suspend and resume:
1. Set clock to Fmin/Fmax in suspend/resume cycles
2. Reorder the code in suspend and resume functions and add recovering
logic when error happens in between
Bug 4224081
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Iadb0b1f960ca8b9c80094d1769a2d90496263124
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2948452
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-08-09 10:40:23 -07:00
Johnny Liu
d171c817ec
drm/tegra: Correct icc cleanup logic
...
Since devm_of_icc_get is used, no need to call icc_put when device probe
fails or device driver is removed.
Bug 4222919
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Ide313c6f56e1bef83ffe3718cd434abbdaeec869
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2947933
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-08-04 14:09:18 -07:00
Mikko Perttunen
89cd5927c9
drm/tegra: Enable timestamping for virtual engines
...
Enable timestamping for virtual engines except for NVJPG, as it
doesn't support timestamping currently.
Bug 4174916
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com >
Change-Id: I36d426f3d6d83c056a7cf10555460966fc820e6c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2942199
Reviewed-by: Santosh BS <santoshb@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-08-02 14:05:28 -07:00
Jon Hunter
9f2ed528c8
drm/tegra: Fix interconnect support for Linux v6.2+
...
Interconnect support for multimedia engines is disable for Linux v6.2
kernels. Rather than always disabling interconnect support for these
kernels, we just need to ensure the necessary upstream kernel patches
are in place for Linux v6.2 kernels. Therefore, enable interconnect
support for all kernels.
Bug 4097374
Change-Id: Ibceb866ba239454a131543cdff90e68007b28942
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2937758
Reviewed-by: Johnny Liu <johnliu@nvidia.com >
Reviewed-by: Sumit Gupta <sumitg@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-07-20 01:16:09 -07:00
Santosh BS
32221411a4
gpu: host1x: add .signaled op for host1x_syncpt_fence_ops
...
Add a callback function host1x_syncpt_fence_signaled() to
.signaled op under host1x_syncpt_fence_ops.
.signaled is a optional operation. The change here is a performance
improvement and acts as temporary workaround for sync_file code not
calling enable_signaling.
Bug 4085239
Change-Id: Ief19c2d9af3f504bb1a067bfc9a31b9ef2ecd8fc
Signed-off-by: Santosh BS <santoshb@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2935867
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-07-20 01:10:50 -07:00
Johnny Liu
10474851f5
gpu: host1x: Correct allocated size for contexts
...
Oirginal implementation over allocates the memory size for the
contexts list. The size of memory for the contexts list is based
on the number of iommu groups specified in the device tree.
Bug 4183400
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: I0ccfd7c67b995b0b335d05e1fb93c236c335b75d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931800
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-07-18 12:12:38 -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
ff572997a3
drm/tegra: Wrap register init code in function
...
Put the actmon-related register initialization code in the function for
readability.
Bug 4183393
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Id68d128ae330105da0d3f76270fe38d57c12c740
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931793
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-07-10 10:05:47 -07:00
Johnny Liu
3264c9dfca
drm/tegra: Skip non-clock update in suspend mode
...
When the device is in suspend mode, There is no point to update
actmon count weight and send ICC request for the device.
If ICC request is sent for the device in suspend mode, in osidle state,
the default EMC frequency will be affected due to the accumulated ICC
bandwidth QoS constraint, and affect the overall osidle power.
Bug 4168788
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: I8700b131b5f914d93feed9f8a9d792c2fdaa9b53
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931905
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-07-07 07:01:02 -07:00
Johnny Liu
da7cd1c546
drm/tegra: Enable disable actmon in RPM callbacks
...
Actmon should be enabled only when engines are active.
Bug 4168788
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Ifb4bfe67357402266080331ea18ae2a9af2d85ee
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931890
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:52 -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
Johnny Liu
4241a7c976
drm/tegra: Export active signal to actmon
...
As long as the subcomponents in the engine are active, we consider the
engine as active and the engine should export active signal to the
actmon.
Bug 4179140
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Ic4cccf29e8ac87da24f6fe3bf1f1e93a11511762
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2930445
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-07-05 14:55:49 -07:00
brucex
c64e2ce3d1
nvidia-oot: gpu: host1x: Fix bit check when allocating chanls
...
Fix to allow non-zero channel bases, to allocate
channels.
Bug 4121631
Change-Id: Ib9f59ae8224f7e4aa6a2a5a4a02c2a608db44a32
Signed-off-by: brucex <brucex@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2920942
Reviewed-by: Vamsee Vardhan Thummala <vthummala@nvidia.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-20 02:20:44 -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
Ankita Garg
1360c38cf4
drm/tegra: Fix compile errors with clang
...
Fix build errors encountered when building the modules with android
common kernel(ACK) using clang.
Bug 3974840
Change-Id: Ie12d5143c3c13a66dcd5f0ee06035593d5bec6a6
Signed-off-by: Bruce Xu <brucex@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921068
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
Tested-by: Jian-Min Liu <jianminl@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-19 06:55:39 -07:00
Johnny Liu
5c4d5e62a0
drm/tegra: Enabling ICC for NVJPG
...
In order to avoid the NVJPG performance bottleneck from EMC,
NVJPG needs to ask for the required memory bandwidth for itself
according to its current frequency and load.
Bug 4097374
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Ia4835bca4fcf7a3e085fa528d0b2c781b100636b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2914633
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-10 19:35:38 -07:00
Johnny Liu
97c41a6222
drm/tegra: Enabling ICC for NVENC
...
In order to avoid the NVENC performance bottleneck from EMC,
NVENC needs to ask for the required memory bandwidth for itself
according to its current frequency and load.
Bug 4097374
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: I504a741126d52c3ae847918b4c4ab6e6a27823e7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2914622
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-10 19:35:33 -07:00
Johnny Liu
6fc7c1ad7c
drm/tegra: Enabling ICC for NVDEC
...
In order to avoid the NVDEC performance bottleneck from EMC,
NVDEC needs to ask for the required memory bandwidth for itself
according to its current frequency and load.
Bug 4097374
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: I2daff5d3616db03d7576e8e9433aebbf3d566e86
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2914610
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-10 19:35:27 -07:00
Johnny Liu
856af79422
drm/tegra: Enabling ICC for VIC
...
In order to avoid the VIC performance bottleneck from EMC,
VIC needs to ask for the required memory bandwidth for itself
according to its current frequency.
Bug 4097374
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Ieeeace34a935f96f949e5c8429f2f2b4edaa556c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2897536
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-10 19:35:18 -07:00
Mikko Perttunen
fe8568a159
gpu: host1x: Optimization for very short syncpoint waits
...
For tasks that execute very quickly, but not quickly enough to be
already complete by the time execution reaches host1x_syncpt_wait,
the proportion of time spent in allocating a fence and invoking
dma_fence_wait_timeout becomes dominating in comparison to the
time it actually takes to execute the task.
To improve wait latency in these cases, replace the current
"is threshold already reached" check with a short spin loop
to catch these situations before going to the heavy machinery.
For longer waits, since this function blocks anyway, the only
negative effect is slightly increased CPU consumption due to
the loop.
Bug 4001325
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com >
Change-Id: I44e99cda88b4bcb33f190884d1a2e5f7588cb775
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2881716
Reviewed-by: Santosh BS <santoshb@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2916412
2023-06-10 04:05:28 -07:00
Mikko Perttunen
c8025c218b
gpu: host1x: Wait prefences outside MLOCK
...
The current submission opcode sequence first takes the engine MLOCK,
and then switches to HOST1X class to wait prefences. This is fine
while we only use a single channel per engine and there is no
virtualization, since jobs are serialized on that one channel anyway.
However, when that assumption doesn't hold, we are keeping the
engine locked while not running anything on it while waiting for
prefences to complete.
To resolve this, execute wait commands in the beginning of the job
outside the engine MLOCK. We still take the HOST1X MLOCK because
recent hardware requires register opcodes to be executed within some
MLOCK, but the hardware also allows unlimited channels to take the
HOST1X MLOCK at the same time.
Jira HOSTX-4687
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com >
Change-Id: I783cbc7f1bbd7415fbf0e61163935186b2ba0a44
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2911124
Reviewed-by: Santosh BS <santoshb@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-29 15:08:46 -07:00
Johnny Liu
57ec58a831
drm/tegra: Add module dependency with tegra_wmark
...
Add module dependency between drm and tegra_wmark. The drm clients are
the users of tegra_wmark governor exploiting the actmon hardware to
perform DFS.
Bug 200493763
Bug 4077910
Bug 4074193
Bug 3788919
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: I2e790d6a5969635c18cb3023c72e8a1fcd5f8e63
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2900081
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-09 22:27:41 -07:00
Johnny Liu
4d3c70f632
drm/tegra: Bridge tegra_wmark devfreq with host1x
...
To support actmon DFS for nvjpg with tegra_wmark govenor, the nvjpg
driver needs to provide interrupt handling callback function for host1x,
and watermark update callback for tegra_wmark govenor.
Bug 4074193
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Ib651d5c6519bcf455416185220a18b52cef6b6f0
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2900058
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-09 22:27:37 -07:00
Johnny Liu
bd6fc54120
drm/tegra: Bridge tegra_wmark devfreq with host1x
...
To support actmon DFS for nvenc with tegra_wmark govenor, the nvenc
driver needs to provide interrupt handling callback function for host1x,
and watermark update callback for tegra_wmark govenor.
Bug 4077910
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Ibe1e2aa220e534f095261b609adca851a075fc09
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2900048
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-09 22:27:32 -07:00
Johnny Liu
fa6b38eb2a
drm/tegra: Bridge tegra_wmark devfreq with host1x
...
To support actmon DFS for nvdec with tegra_wmark govenor, the nvdec
driver needs to provide interrupt handling callback function for host1x,
and watermark update callback for tegra_wmark govenor.
Bug 200493763
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: I0cbf882da1ccb3243c48fc65dce6eec5f68f6abe
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2900038
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-09 22:27:28 -07:00
Johnny Liu
e4fcb41e8a
drm/tegra: Bridge tegra_wmark devfreq with host1x
...
To support actmon DFS for vic with tegra_wmark govenor, the vic driver
needs to provide interrupt handling callback function for host1x, and
watermark update callback for tegra_wmark govenor.
Bug 3788919
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Id1e623e1d64dc0c571d24a65163c0fccc5bdbc0a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2898326
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@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:23 -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
Mikko Perttunen
1b89a8395f
gpu: host1x: Syncpoint interrupt sharding
...
Support sharded syncpoint interrupts on Tegra234+. This feature
allows specifying one of eight interrupt lines for each syncpoint
to lower processing latency of syncpoint threshold
interrupts.
Jira HOSTX-4710
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com >
Change-Id: Idfcb04e97c944b8e1c26a8f62e8393180692eb30
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2898521
Reviewed-by: Santosh BS <santoshb@nvidia.com >
Reviewed-by: Johnny Liu <johnliu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-05 07:36:31 -07:00
Johnny Liu
df86f78c76
drm/tegra: Enable devfreq for the nvjpg client
...
Enable devfreq for the nvjpg client with userspace governor by default.
Bug 4074193
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Ic70651b5af4648808b188560e4c09da00c5dde55
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2895739
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-02 09:20:01 -07:00
Johnny Liu
a61d58efd6
drm/tegra: Enable devfreq for the nvenc client
...
Enable devfreq for the nvenc client with userspace governor by default.
Bug 4077910
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: I2a7f3c047f3d7a6ba8d9219fcd0af85eeeaf7e99
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2895731
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-02 09:19:56 -07:00
Johnny Liu
4ed6734269
drm/tegra: Enable devfreq for the nvdec client
...
Enable devfreq for the nvdec client with userspace governor by default.
Bug 200493763
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Iee5da899b499da2c89c0e3fee5e2d616b1869d2b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2895716
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-02 09:19:51 -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
0544985a0f
drm/tegra: Enable devfreq for the vic client
...
Enable devfreq for the vic client with userspace governor by default.
Bug 3788919
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Idb0a0a2fb432590309acea9c4a161017d5291dca
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2892875
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-28 03:32:52 -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
Laxman Dewangan
cc389c145d
gpu: host1x: Get rid of explicit header inclusion
...
The required headers for gpu/host1x driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.
Bug 4087103
Change-Id: Ib359e1e19b8837d41c0129d478dc4848d51ce7ee
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894612
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-28 02:19:45 -07:00
Johnny Liu
d5eff2f344
drm/tegra: Register actmon for the nvdec client
...
Register nvdec actmon to export the engine utilization information in
the debugfs.
Bug 200493763
Bug 3923137
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: I6e445a4e4ce729f2a1af63ed95f4110916b1adb0
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2892036
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-27 08:12:42 -07:00
Johnny Liu
9db84e035b
drm/tegra: Register actmon for the nvjpg client
...
Register nvjpg actmon to export the engine utilization information in
the debugfs.
Bug 4074193
Bug 3923137
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: If061703e23d9de8b270e93694a295f7e1153ceb5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891935
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-27 08:12:37 -07:00
Johnny Liu
16620428cd
drm/tegra: Register actmon for the nvenc client
...
Register nvenc actmon to export the engine utilization information in
the debugfs.
Bug 4077910
Bug 3923137
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: I70800bbc2ad37d69e9697a47a161e64c60dcb383
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891911
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-27 08:12:32 -07:00
Laxman Dewangan
f53fa88eae
drm: Get rid of explicit header inclusion
...
The required headers for drm driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.
Bug 4087103
Change-Id: If3cf11e333fb07498329c935072904dae652bf9f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894611
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-27 02:55:36 -07:00
Mikko Perttunen
5395e466bf
drm/tegra: Job hardware timestamping support
...
Add support for emitting ftrace events for job submissions with
hardware timestamps, including configuring engines to capture
timestamps when execution starts and ends.
Bug 3829397
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com >
Change-Id: I3a3f6fcf931d7f8fb337f029af7729ffc2cbb972
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891349
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-26 20:08:33 -07:00
Mikko Perttunen
a9aeb2991d
gpu: host1x: Add reg_write job command
...
Add a job command to allow inserting engine register writes into
the job opcode sequence. This allows TegraDRM to insert a method
to enable gathering of engine execution timestamps.
Bug 3829397
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com >
Change-Id: I80f3c4c4f7ecc7dee0444eca06564cafd8442f75
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891348
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-26 20:08:13 -07:00
Jon Hunter
0f857d6cff
gpu: host1x-nvhost: Remove unused argument
...
The integer argument returned by the NVHOST interrupt notifier has never
been supported by the host1x-nvhost driver. The DLA driver's
nvdla_queue_update() function that is called by this notifier has been
update so that it no longer uses this argument. Given that there are no
other users of this notifier for the host1x-nvhost driver, let's remove
this unused variable.
Bug 4059530
Change-Id: I04dda2ea7338f0c7ee55e6e968b46f063eecae90
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2892312
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com >
Reviewed-by: Mitch Harwell <mharwell@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-24 15:38:02 -07:00
Johnny Liu
f826f7efc3
drm/tegra: Register actmon for the vic client
...
Register vic actmon to export the engine utilization information in the
debugfs.
Bug 3788919
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: I3bde644a7708d0b59f6e3a24fc40f4b95b6a6789
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2887424
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-19 10:49: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
Johnny Liu
d99906cfaa
gpu: host1x: Retrieve actmon clock
...
The common actmon clock is used for load calculation for the soc engines
under host1x.
Bug 3583603
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: I8e6e119d32d15e29b10d1131b8ec21fb3a5834ff
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2886695
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-19 10:49:23 -07:00