In Linux v6.13, commit cdd30ebb1b9f ("module: Convert symbol namespace
to string literal") updated the MODULE_IMPORT_NS macro to take a string
literal as an argument in Linux v6.13. Update the mods_dmabuf driver as
necessary to fix this.
Bug 4991705
Change-Id: I9326e360fe8daae4c43941812301818d8b35c825
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263799
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update the MODS drivers as
necessary to fix this. Note that we can simply remove the mods_dmabuf
'remove' function because it does nothing.
Bug 4749580
Change-Id: I8ac05a7b713916b9aca1694ca828682808df3287
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3235514
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: Carl Dong <carld@nvidia.com>
- Enable MODS kernel driver ADSP APIs
- Updated CONFIG_TEGRA_NVADSP to MODS_HAS_TEGRA
- get_handle call is invoked for each API
- To avoid regression on parallel WAT testing
- Fork nvidia-oot from nvidia-kernel
- Firmware APIs do not support 5.1 version.
- Updating the same IOCTLs as its being used by AON and ADSP tests.
Bug 4149877
Change-Id: I0063f6610c078395ce9ce3f348bbab360e7dc676
Signed-off-by: sitalluri <sitalluri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3057290
Reviewed-by: Kuan Luo <kluo@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: John Lu <johlu@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: John Lu <johlu@nvidia.com>
For Linux v6.8, commit ef175b29a242 ("of: Stop circularly including
of_device.h and of_platform.h") updated the OF headers included by these
header files. This breaks the build for various drivers and so fix this
by including the headers that are actually needed for each driver.
Bug 4448428
Change-Id: Ifb484189524a3ec86aa252e71b4489f4dba5aacd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059458
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
If the Linux kernel driver OPTEE is built as a module (CONFIG_OPTEE=m)
then building the MODS driver for Tegra fails with the following error
...
drivers/misc/mods/mods_optee.c:22:5:
error: no previous prototype for 'esc_mods_invoke_optee_ta'
[-Werror=missing-prototypes]
22 | int esc_mods_invoke_optee_ta(struct mods_client *client,
| ^~~~~~~~~~~~~~~~~~~~~~~~
The problem is in the mods_internal.h file that wraps the prototype for
the above function with '#ifdef CONFIG_OPTEE'. This works fine for when
CONFIG_OPTEE=y but not if CONFIG_OPTEE=m. To ensure that this prototype
is present when the OPTEE driver is built into the kernel or a module,
we need to use '#if IS_ENABLED(CONFIG_OPTEE)'. Update the MODS driver
accordingly to fix this.
Bug 4429280
Change-Id: I48054f60cf26c04d2cacff8d8affc46254020aff
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3038965
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Only Tegra234+ devices are currently supported and for these devices the
only DMA drivers that are supported for Linux are the Tegra210 ADMA and
Tegra186 GPCDMA drivers. Neither of these drivers ever supported the
'slave_id' parameter for configuring the DMA request ID for a given
channel. These drivers have always used device-tree to retrieve this
information. Only the Tegra20 APBDMA controller supported the 'slave_id'
field and this was dropped in Linux v5.17. The Tegra20 APBDMA driver was
supported in Tegra devices up until Tegra210, but starting with Tegra186
it is no longer supported.
Given that this is a legacy feature only supported for legacy Tegra
devices and drivers, drop the 'slave_id' support completely.
Bug 4425688
Change-Id: Id9bb6440805826dfb0cf0d862d6b15fd856e61ff
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3038964
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
The MODULE_IMPORT_NS macro adds a namespace tag to the module
information. The DMA_BUF namespace is required for Linux v5.16+ kernels
for drivers that use DMA BUF, there is no reason not to populate this
for earlier kernels. Furthermore, some 3rd party kernels prior to v5.16
may require this too and so drop the version check around the DMA BUF
namespace.
Bug 4119327
Change-Id: If8a5e90340f7a0582247cb91611d275ec1f4990e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2979260
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
If makefile environment srctree.nvidia is not set
then use the srctree.nvidia-oot for nvidia driver
source path.
This will help to get rid of passing the srctree.nvidia for
building the nvidia-oot. It will pass only srctree.nvidia-oot.
Bug 4087103
Change-Id: I3bca0da88f5980c7f08c4c20d5a742316cc588d1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894614
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Upstream Linux commit 4c1e0a97351a ("firmware: tegra: bpmp: Use
iosys-map helpers") updated the Tegra IVC driver to use the
iosys-map helpers for Linux v6.2. This causes the MODS BPMPIPC driver
build to fail.
Upstream Linux commit 55bf84fd0a76 ("firmware: arm_ffa: Remove
ffa_dev_ops_get()") removes the function ffa_dev_ops_get() and this
causes the MODS FFA driver build to fail.
Temporarily disable the building of these drivers while these build
issues are fixed.
Bug 3936429
Bug 3974855
Change-Id: I1b40bbb4b89fe0c8d4af7fc642664d29d6954ed2
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2861317
Tested-by: Rohit Khanna <rokhanna@nvidia.com>
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@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>
Fix MODS_VIRTUAL_TO_PHYSICAL for allocations exceeding 4GB
It's unlikely for us to support such large allocations,
but if we ever did, integer overflow would truncate the
allocation offset, resulting in the incorrect PA being
returned.
This change also brings the driver up to date with
the Perforce copy and fixes the version.
CID 421846
Change-Id: Ia9328dd91743631f39a16dfc3077261656384f2c
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2810261
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>