Commit Graph

428 Commits

Author SHA1 Message Date
Jon Hunter
9b40e459a1 nvdla: kmd: Fix compilation error
When building the DLA KMD driver with GCC 13 the following error is
observed ...

 drivers/video/tegra/host/nvdla/nvdla.c: In function ‘nvdla_remove’:
 drivers/video/tegra/host/nvdla/nvdla.c:1229:13:
   error: the comparison will always evaluate as ‘true’ for the address of
   ‘clk_cap_kobj’ will never be NULL [-Werror=address]
 1229 |         if (&pdata->clk_cap_kobj) {
      |             ^

The 'clk_cap_kobj' member of 'nvhost_device_data' structure is not a
pointer to a structure but a structure and so the address of the
structure is always true. Fix this by testing if the address of the
'clk_cap_attrs' member which is a pointer to memory that is allocated.

Bug 4190030

Change-Id: I8200155b4c0becab51924bcb4357c30163f62666
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934411
Tested-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-12 19:09:03 -07:00
Jon Hunter
deffbf24ab virt: tegra: Ensure functions stubs are defined
When building the out-of-tree drivers with virtualization support
disabled, symbols for some of the virtualization functions are not found
...

 nvgpu: Unknown symbol tegra_hv_mempool_unreserve (err -2)
 nvgpu: Unknown symbol is_tegra_hypervisor_mode (err -2)
 nvgpu: Unknown symbol tegra_hv_mempool_reserve (err -2)
 nvhost_pva: Unknown symbol is_tegra_hypervisor_mode (err -2)
 mc_utils: Unknown symbol is_tegra_hypervisor_mode (err -2)
 mc_utils: Unknown symbol is_tegra_hypervisor_mode (err -2)

Update the hv-ivc.h header to ensure that these function stubs are
defined when virtualization support is disabled and only build the
hv-ivc driver if virtualization is enabled.

Finally, move populating the ccflags to the top-level Makefile and use
the subdir-ccflags directive to ensure the ccflags are passed to all
sub-directories.

Bug 4159372
Bug 4170085

Change-Id: I35edb91007524c3143dff7564f9ad545bd34e969
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921199
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-07-05 14:34:15 -07:00
Ashish Mhetre
9207ceb10a video: tegra: nvmap: Add support for sgt caching
Deferred dmabuf unmapping is being removed from kernel.
So, add similar support to cache sgt in NvMap.
During map_dma_buf() call, NvMap will create a mapping and an sgt
corresponding to it. It will also cache this sgt.
When unmap_dma_buf() is called for same sgt, NvMap will not unmap
the mappings. It will simply return from there.
Next time when the mapping request comes for same dmabuf, it will
look for existing sgt in cache and return it. This significantly
reduces mapping overhead for same buffer when it's mapped and unmapped
multiple times.
Free the sgt and unmap only when corresponding buffer is freed. When
all references from a buffer are removed, dmabuf_release() will be
called where sgt will be freed.

Bug 4064339

Change-Id: I7ed767ecaaac7aa44e6576e701b28537b84986ec
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2925224
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-03 21:14:42 -07:00
Jon Hunter
ad2857ccaa soc/tegra: Clean-up fuse-helper
The option CONFIG_TEGRA_FUSE_UPSTREAM is not needed any longer because
we always want to enable this for Linux v5.15. Therefore, remove this
option completely.

The function tegra_fuse_control_read() is not used anywhere and so we
can also remove this too.

Bug 3777983

Change-Id: I37888bc1f615f72b245c027e5c1a9251aca08af4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2925233
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-03 15:08:36 -07:00
Akshata
25b08cb82d dla: kmd: Update fuse register read for K5.15
+ Enabled the logic to read the DLA Fuse registers
directly for K5.15
+ Required for setting up the correct DLA instance on
fused boards like TA983

Bug 4156086

Change-Id: I23addb28c54466979fd88a1b3c65960b10f946ca
Signed-off-by: Akshata Bhat <akshatab@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2929422
Reviewed-by: Maxim Grigoriev (SW-GPU) <maximg@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-01 13:42:26 -07:00
omar
fbcd05f070 drivers: pva: fix desc check with bl and hwseq
when hw sequencer is in use, BL format is supported and
block height log2 needs to be retrieved form channel.

*retrieve block height information while walking descriptor list.

Bug 4166395

Change-Id: Ie6f71c107b74eb01a547baf24ff621ac3446d522
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2929277
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Lachlan Dowling <ldowling@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-30 18:02:05 -07:00
omar
2e1f1dca9e drivers: pva: fix coding style violations
fix various coding style errors and warnings

Bug 4096967

Change-Id: If31fb063a19df8a3329710899b349019508dcd15
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2929265
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-30 18:02:00 -07:00
omar
3de8696710 drivers: pva: HW seq security checks
Add HW Sequencer security checks and fix block linear
addressing checks.

Bug 4124717
Bug 4096967

Change-Id: I5bf359eda678f1267127748353941606c527f691
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2923245
Reviewed-by: Lachlan Dowling <ldowling@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-24 14:16:48 -07:00
Laxman Dewangan
44ece33f27 drivers: Remove Kconfigs
There is no need of the CONFIG_* for oot modules
and hence remove the Kconfig from modules
directory.

Bug 4078035

Change-Id: I78ca8b7f123fb92c410e8443c4056a67dcf280b5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2923232
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-22 23:39:27 -07:00
Keyur Sheth
4c53e849c3 drivers: pva: specific error for VPU app auth
In case of VPU app authentication failure,
return a specific error code EACCES to
userspace.

Bug 4132218

Change-Id: I14fd39858c4d2aae5afe1246961a39c3a1df4bff
Signed-off-by: Keyur Sheth <ksheth@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2923768
Reviewed-by: Vivek Bangera <vbangera@nvidia.com>
Reviewed-by: Yogesh Solanke <ysolanke@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-22 11:24:05 -07:00
brucex
bf7d14249c nvidia-oot: enable hypervisor support for nvmap
hypervisor macro CONFIG_TEGRA_VIRTUALIZATION is not enabled
for OOT nvmap build.

Bug 4121631

Change-Id: I8a1fc94335da8ca7a22d549b0e1850dd308722b8
Signed-off-by: brucex <brucex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921005
Reviewed-by: Tuomas Kulve <tkulve@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-20 02:20:49 -07:00
omar
94b8c1c354 drivers: pva: add power management
add power management support for pva module.
* return busy if queues are not empty
* call nvhost PM APIs where no deviation is needed

Bug 4154352

Change-Id: Iab8b1653f4e0713f94129cd58f917927f1a50127
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2920784
(cherry picked from commit 29b820b6c2eac9485aee281a64713e54db35d9bf)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2922565
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-19 17:39:04 -07:00
Matti Ryttylainen
f19d5372b4 camera: Switch VI/ISP events to ftrace
* Switch VI frame_begin and frame_end events to produce ftrace traces
instead of eventlib events.
* Switch ISP task_begin and task_end events to produce ftrace traces
instead of eventlib events.
* Add class IDs for VI/ISP
* Switch VI/ISP task_submit events to ftrace

Bug 4080214

Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Change-Id: I7776005bb89eaed168c65c62d8aa19c553559fdb
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2911804
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-by: Oleg Sikorskiy <osikorskiy@nvidia.com>
Reviewed-by: Ajith Kumar <ajithk@nvidia.com>
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-19 12:28:58 -07:00
Jon Hunter
c59b9a9a26 video: tegra: camera: Removed unused source file
The source file tegra_camera_dev_mfi.c is not used and so remove it from
the camera driver source tree.

Change-Id: I61c00d0d1debb76aad83e268fde43203ad87c1fb
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2913271
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-15 12:16:33 -07:00
Vedashree Vidwans
3ee67f0ee5 host1x: do not use CONFIG_TEGRA_SOC_HWPM
OOT kerel builds do not use Kconfig files to define required
config flags. Thus, CONFIG_TEGRA_SOC_HWPM is not defined for OOT
configs. Remove use of CONFIG_TEGRA_SOC_HWPM flag from PVA, DLA
and FLCN drivers.

For OOT builds, HWPM driver is always compiled independent of
CONFIG_TEGRA_SOC_HWPM flag. For safety builds where HWPM
functionality is not allowed, mock HWPM functions will be used.

Bug 4061775

Change-Id: I49d8df6d3293e9bde9e233561363872fc41742f4
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2920819
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Adeel Raza <araza@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-15 12:16:28 -07:00
Ankita Garg
ce92834cc3 pva: Disable pva in android
Disable pva module to avoid build error when using clang
to build Android Common Kernel (ACK).

Bug 3974840

Change-Id: Ia0b5cee850355e7bbe9b7175a32b5aaddfd2be38
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2915981
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jian-Min Liu <jianminl@nvidia.com>
2023-06-13 00:24:36 -07:00
Ketan Patil
01db38f08e video: tegra: nvmap: Add support for Serial Id feature
Add support for Serial Id feature which will be used by Nsight for
buffer tracking purpose. This feature expects a unique serial id per
buffer even if it is shared across multiple client processes.
Add following code:
- Create a new global counter field for serial id in nvmap device.
Initialize it to 0 when nvmap device is initialized.
- Introduce a new field for serial_id in nvmap_handle struct.
- When nvmap_handle is created, assign it's serial_id field with global
counter's value, and increment global counter.
- During NvRmMemQueryHandleParameters return this serial_id associated
with the handle.
- Do not decrement counter for serial_id even after freeing the handle.

Bug 4138373

Change-Id: Ic1fe22b082eefb352986f8fa44d4c38d186a366f
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2918510
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-06-10 19:46:37 -07:00
Jian-Min Liu
1fead62f11 nvmap: Explicitly import fs symbol for ACK
Android Common Kernel (ACK) places restrictions on the use of symbols
like close_fd, kernel_write, filp_open, etc, exported by the fs
subsystem. These symbols have to be explicitly imported using
MODULE_IMPORT_NS to avoid build errors. Eventually, synbol usage needs
to be deprecated.

Bug 3974840

Change-Id: Iea8518162c97062b205e80bf4b81c35c873b7729
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2915728
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2023-06-09 05:35:16 -07:00
omar nemri
4cff480dc1 drivers: pva: combine trace definitions
Currently there is an ftrace definition for pva
that is called nvhost_pva.  combine into tegra_pva
ftrace dfinition with include file nvpva_ftrace.h.

Bug 3829397

Change-Id: I0bffdfedad9d5010ef47ffe3f2639c1e162286b1
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2914938
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-06 02:09:29 -07:00
Akshay Tigga
506ac0dcea Remove nvhost-vi5.o from ACK build
Including nvhost-vi5.o in ACK build gives
the following errors :
ERROR: modpost: "vi_channel_drv_fops_register" undefined!
ERROR: modpost: "tegra_vi_media_controller_cleanup" undefined!
ERROR: modpost: "vi_channel_drv_unregister" undefined!

Bug 3974840

Change-Id: I85050b229eab88e60a02d244c95b9dad0a5b6851
Signed-off-by: Bruce Xu <brucex@nvidia.com>
(cherry picked from commit eea31fd3f7b941c124f210278d878b42f6edf469)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910056
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Ankita Garg <ankitag@nvidia.com>
2023-06-03 19:17:01 -07:00
Akshay Tigga
327bc17760 Remove nvhost-nvcsi-t194.o from ACK build
Including nvhost-nvcsi-t194.o in ACK build gives
the following errors :
ERROR: modpost: "tegra_csi_media_controller_remove" undefined!
ERROR: modpost: "tegra_csi_media_controller_init" undefined!
ERROR: modpost: "csi5_fops" undefined!

Bug 3974840

Change-Id: Iad263a8aa0cef443dd4629d52417e5d104baf9fa
Signed-off-by: Bruce Xu <brucex@nvidia.com>
(cherry picked from commit ef3dfca356c6d41ca6a9a590d0bec861aeb50b41)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910055
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Ankita Garg <ankitag@nvidia.com>
2023-06-03 19:16:57 -07:00
Akshay Tigga
e965326be0 Remove nvhost-isp5.o in ACK build
Including nvhost-isp5.o in ACK build gives
these errors :
ERROR: modpost: "isp_channel_drv_register" undefined!
ERROR: modpost: "isp_channel_drv_init" undefined!
ERROR: modpost: "isp_channel_drv_exit" undefined!
ERROR: modpost: "isp_channel_drv_unregister" undefined!

Bug 3974840

Change-Id: Iadf8042e857e5083e19773ff1cc071382db75c9c
Signed-off-by: Bruce Xu <brucex@nvidia.com>
(cherry picked from commit d8dc0c2b04c86720e0de0db7c469cc19bce6a9c3)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910054
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Ankita Garg <ankitag@nvidia.com>
2023-06-03 19:16:52 -07:00
omar
3fda4da5d8 drivers: pva: use ftrace instead of eventlib
deprecate use of eventlib and use ftrace instead
for reporting task statistics.

pass prog and stream ID to ftrace events.

Bug 4080222

Change-Id: Id304baba109cde5392f3f297a745c8084b07613a
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2911268
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Nikita Chumakov <nchumakov@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-30 12:18:45 -07:00
Matti Ryttylainen
c9146a4fd9 camera: Enable deferred unmapping for vi/isp
Enable deferred dma buffer unmapping for vi/isp devices

Bug 4067905

Change-Id: I193f762d580d1e0477137f57195b2cb81d4b9d91
Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910545
Tested-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
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: Kalle Jokiniemi <kjokiniemi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-29 04:03:27 -07:00
omar
8a8d6ba182 drivers: pva: boot parameters to FW in mailboxes
Change FW boot to not program segment registers directly.
Instead the values are passed in mailboxes at boot time and
FW will progbram the registers.

In virtualized environments, KMD will not have access to these
registers.

Bug 3971973

Change-Id: Iea935cbb9fb7898d229935da7b6495a325f24356
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2899228
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2908814
2023-05-24 08:49:31 -07:00
Jon Hunter
9a3174280f platform: tegra: Remove CVNAS driver
The CVNAS driver is not needed for Tegra234 and future devices. Remove
the CVNAS driver and support for CVNAS from DLA, NVMAP and PVA dirvers.

Bug 4037930

Change-Id: I5d1ae3c195485cb094f9b9b480f91d81fd04687c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903848
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-23 20:56:08 -07:00
Ashish Mhetre
db78501061 video: tegra: nvmap: Adding NvMap config for deferred unmap
Add NvMap config for enabling/disabling deferred dma-buf unmapping.
Keep it disabled by default and enable it based on
CONFIG_DMABUF_DEFERRED_UNMAPPING.

Bug 4067905
Bug 4115589

Change-Id: Ib1ee63cdd61a346f2f9894bb3caf406ae5f159c5
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2905251
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-22 06:37:37 -07:00
Akshata
2e59846460 nvdla: kmd: Add ftrace support
+ Replace eventlib with ftrace for Linux-OOT kernel
+ Added event logging for:
 * job_submit
 * job_prefence
 * job_postfence
 * job_timestamps

JIRA DLA-6820

Change-Id: I4d1ad1b535b2422257e9e1dce8d94ee317c65feb
Signed-off-by: Akshata Bhat <akshatab@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2906273
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-20 07:31:01 -07:00
Laxman Dewangan
6496e807ed nvpva: Enable TEGRA_FUSE_UPSTREAM
For OOT module build, enable TEGRA_FUSE_UPSTREAM
default.

Bug 4116692

Change-Id: Ib0a8cd983983b0581050634265bf0771f578a2c3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2904019
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-15 06:11:01 -07:00
Laxman Dewangan
83c26ab1fc nvdla: Enable TEGRA_FUSE_UPSTREAM
For OOT module build, enable TEGRA_FUSE_UPSTREAM
default.

Bug 4116692

Change-Id: Ia9a63519c240d874fbbeb126945ef28f79452421
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2904018
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
2023-05-15 06:10:52 -07:00
Laxman Dewangan
67d0b7dd96 pva: Drop license paragraphs
The pva files are having the SPDX license forma. Hence,
it is not required to have the license paragraphs.

Remove the non-required license paragraphs details.

Bug 4038415

Change-Id: I4d039b7d8d9ef6eea5ba53ead8c5d1e3bda223b9
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903864
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-15 01:19:53 -07:00
Laxman Dewangan
9ae82f62c3 pva: Replace srctree.nvidia with srctree.nvidia-oot
Replace srctree.nvidia with srctree.nvidia-oot for
PVA makefile as the build system pass only srctree.nvidia-oot.

Bug 4087103

Change-Id: I6b17c2d80957e2c82ebe33ef74f9cad9e6ebb50e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903852
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-15 01:19:49 -07:00
Ketan Patil
30ebc1a639 video: tegra: nvmap: Add support for querying granule size
Add support for querying the granule size using NvRmMemQueryHeapParams.
In case of compression carveout it returns granule size in which memory
is allocated while in case of IOVMM heap, it returns PAGE_SIZE.

Bug 3956637

Change-Id: I3ec4f5388caecbca0a728e1878007f6b3d4320ef
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2899867
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-15 01:18:06 -07:00
Ketan Patil
faa6040875 video: tegra: nvmap: Switch to configurable granule size
In compression carveout, granule size should be configurable via device
tree. Earlier code was written by considering granule size of 2MB,
update the code to use configurable granule size read from DT.

Bug 3956637

Change-Id: Ib1e966117b2bd9511cbcde37a6011c17f38f22e2
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2899865
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-15 01:18:01 -07:00
Jon Hunter
408704d52a pva: Remove dependency on CVNAS
Tegra234 does not support CVSRAM and therefore does not need the CVNAS
driver. When building the PVA driver as an out-of-tree module, we only
need to support Tegra234 and so we can compile out support for CVNAS and
remove the dependency on CVNAS. Note that CONFIG_TEGRA_CVNAS is not set
when building out-of-tree modules.

Bug 4037930

Change-Id: I2f4a524d50229c4a3b42c4b62df67b8a40daeca6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903055
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: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Omar Nemri <onemri@nvidia.com>
2023-05-13 02:04:16 -07:00
omar
76961fd57b drivers: add pva driver to nvidia-oot
- copy nvpva driver and headers to nvidia-oot directory.
- remove the file copy operation as part of the build process.

Bug 4097111

Change-Id: If040773833405f3941505cb8a2ec3440e0a84c92
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903052
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Omar Nemri <onemri@nvidia.com>
2023-05-13 02:04:09 -07:00
Ashish Mhetre
1106619f9c video: tegra: nvmap: Enable deferred unmapping for knext kernel
Deferred unmapping is getting used by K5.15 upstream kernel as well.
So, enable deferred unmapping flags for K5.15 kernel.

Bug 4067905

Change-Id: I1601f92c1a7475ff5ae11b26d4a31d8b79868031
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2900409
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-10 13:53:48 -07:00
Ninad Malwade
14bdf751cb nvhost: nvdla: add support for dla clock capping
For K5.15 the nvhost_acm driver is not used and thus the central
mechanism for clock capping for the nvhost cliets like DLA is not
available.

The clock capping functionality should be part of the individual
nvhost drivers from K5.15 onwards and thus adding the related
support in nvhost-nvdla drivers.

Bug 4029003

Change-Id: I966187c97ba4ab6b90fabc96be19c76aa32ac905
Signed-off-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2899031
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>
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-10 06:22:02 -07:00
Mayuresh Kulkarni
d3bc17ca8b tsec: add debugfs support
add a debugfs file to read-out firmware log messages

Change-Id: I3501b117884a822bd835beecd8e3956481c37386
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2884815
(cherry picked from commit 590640045e9ba26914cad055000f7ce3618640b9)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2895857
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-03 21:02:32 -07:00
Laxman Dewangan
71462faf01 nvmap: Get rid of usage of CONFIG_TEGRA_OOT_MODULE
The nvidia-oot source are always compile as module
and hence it is no more required to check for the
condition.

Bug 4074863

Change-Id: I77b9adef6abcfeaa3e6c8944dd690b575278dca5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2896573
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-01 09:33:30 -07:00
Richard Zhao
054f2a1a22 video: tegra: virt: separate dev and dt for init
The dt node that includes ivc properties and the dev does not have to be
same node. GPU could be PCIE endpoint device which does not have
corresponding dt node, so GPU driver uses PCIE controller node to store
ivc properties.

Jira GVSCI-15779

Change-Id: Ibf9c8f17eac1accceee5fe8d5eca3521cda934b9
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2884313
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: Austin Tajiri <atajiri@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-01 00:25:01 -07:00
Ketan Patil
8fd904b84e video: tegra: nvmap: Remove identical code
The code from the if-then branch is identical to the code after the if
statement. Hence remove that identical code.

Bug 3952896
CID 10171716

Change-Id: I41eefccb9e37cddd983479db39ba7afb8fa0a3a9
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894606
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-28 03:33:51 -07:00
Laxman Dewangan
4d16df36e4 nvmap: Get rid of explicit header inclusion
The required headers for nvmap driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.

Bug 4087103

Change-Id: Ie8b7aca22abac5f45e020c6170e05bdd276d182e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894629
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-28 02:20:22 -07:00
Laxman Dewangan
027a3ab6d3 vi: Get rid of explicit header inclusion
The required headers for vi driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.

Bug 4087103

Change-Id: Ia7942599cb6d3973fd4c76f34137c1f0095e6828
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894628
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-27 08:15:24 -07:00
Laxman Dewangan
f9f44ed22f video:isp: Get rid of explicit header inclusion
The required headers for video/isp driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.

Bug 4087103

Change-Id: I2467f5476294b8707e59d63a69e58b86c8a0fb8b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894625
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-27 08:15:19 -07:00
Laxman Dewangan
43a4603e99 video: host: capture: Get rid of explicit header inclusion
The required headers for video/host/capture driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.

Bug 4087103

Change-Id: Ibfbbe2a68d76ffc9e41ec03b48c0b562170d3aa5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894624
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-27 08:15:15 -07:00
Laxman Dewangan
deec76e8ee nvdla: Get rid of explicit header inclusion
The required headers for nvdla driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.

Bug 4087103

Change-Id: Ie55e3a6707b640862e63ef070a491b68ad31f708
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894627
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-27 02:55:59 -07:00
Laxman Dewangan
f13bfe1283 video: nvcsi: Get rid of explicit header inclusion
The required headers for video/nvcsi driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.

Bug 4087103

Change-Id: I6f9463aea97a6d7d39d92c4bb1a27c289eb6eeaa
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894626
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-27 02:55:54 -07:00
Laxman Dewangan
28db50c620 video: camera: Get rid of explicit header inclusion
The required headers for video/camera driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.

Bug 4087103

Change-Id: Iecaca6b96fbc577709ec4ae35dcea1de0651ef09
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894623
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-27 02:55:50 -07:00
Laxman Dewangan
10e45ac4c8 video: gr_comm: Get rid of CONFIG_TEGRA_GR_VIRTUALIZATION
The config option CONFIG_TEGRA_GR_VIRTUALIZATION is passed
the driver s debug option to support the driver to build
as built-in or module.

As nvidia-oot drivers are only build as module, remove the
explicitly pass of the option of CONFIG_TEGRA_GR_VIRTUALIZATION
and related code.

Bug 4074863

Change-Id: I6f7dbe0c97c95f98bd010813d211fd196c88d585
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889983
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-26 20:06:29 -07:00