Conditionally disabled the legacy TEGRA_SYNCPT_INCR IOCTL for T264
platforms since it's no longer needed. This IOCTL is superseded by the
newer TEGRA_SYNCPOINT_INCREMENT IOCTL which provides better functionality
and follows the modern API design.
The conditional compilation helps reduce the attack surface on T264
platforms by removing legacy code paths that aren't needed.
Use CONFIG_ARCH_TEGRA_264_SOC as the proper platform-specific flag
to identify T264 platforms, as this is the standard architecture flag
used throughout the codebase.
This change affects:
1. The IOCTL definition in the tegra_drm_ioctls table
2. The IOCTL handler function implementation
This improves code cleanliness by removing unnecessary legacy code
on newer platforms while maintaining backward compatibility for
older platforms that might depend on this IOCTL.
Bug 5060574
Change-Id: Idd21d69ebd992f976770016b5805f7d6af89c88d
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3342657
Reviewed-by: Sourab Gupta <sourabg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Adding the build flag '-Werror=declaration-after-statement' to prevent
mixing variable definitions within the body of code. Ideally, we would
enable this for all kernels, but in the latest upstream Linux kernels
this flag has been removed from the kernel build to allow for scope
based declarations in some contexts. However, even in the upstream
kernel declaring variables at the start of the scope is recommended. Add
this flag for noble kernels to ensure that this recommendation is
followed for OOT drivers.
Link: https://lore.kernel.org/lkml/20230612093537.693926033@infradead.org/
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I29648ec41d5a5afb06a41b209c025c7b3fa77e85
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338231
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
The Tegra264 PCIe drivers don't build for kernels that don't have:
1. The structure mrq_pcie_request_req defined
2. The function pci_epc_deinit_notify() present
This is currently being handling by building a dummy driver for kernels
that don't have these. To simplify this, use conftest to detect if the
above are present and modify the Tegra264 PCIe driver accordingly if
they are not present. By using conftest we can remove the Makefile
variable 'NV_OOT_PCIE_T264_SOC_SKIP_BUILD' and ccflag
'DNV_CONFIG_PCIE_TEGRA_DMA_DISABLE'.
Finally, the PCIe drivers are always built as modules so simplify the
Makefile and remove the usage of 'CONFIG_TEGRA_OOT_MODULE'.
Bug 4911768
Change-Id: Id282497b8607a732b5e6c90e1e7c1436589a0b5f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3245592
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
The following functions are exported from nvmap code and being used by
nvgpu in non-DriveOS code like L4T. Hence we should not include these
functions in embedded builds.
- nvmap_get_vpr_dev
- nvmap_get_vpr1_dev
The following functions get used in DriveOS as well by nvmap, but no
need to export to nvgpu, as they are not supposed to be used on DrivOS
by other modules. Hence do not export this in embedded builds.
- nvmap_dma_alloc_attrs
- nvmap_dma_free_attrs
In order to achieve this, define a new config file for embedded-linux
and define config and ccflag which can be used in any OOT driver to
differentiate between embedded-linux and non embedded-linux builds.
JIRA TMM-5842
Change-Id: Ic52106709723910e03362977472fb3597dc255f0
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258866
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Skip T264 PCIE drivers for the few kernels like jammy-src, rhivos-1 and
stable.
Bug 4911768
Change-Id: I198fb279712594a69950b72d6b8f14a9ef151e5f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
For some of the kernel tegra_bpmp is part of core kernel and
hence it is nto required to use the OOT tegra_bpmp driver.
However, some packaging still expect the tegra_bpmp.ko from
the OOT path. To trick the packaging file, add dummy tegra_bpmp
driver which does not have anything other than module_init/module_exit.
Bug 4551265
Change-Id: Ifae52acb63be009029c820b0ba7b15da6ea7a12e
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3198304
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
For some of the kernel tegra_hv is part of core kernel and
hence it is nto required to use the OOT tegra_hv driver.
However, some packaging still expect the tegra_hv.ko from
the OOT path. To trick the packaging file, add dummy tegra_hv
driver which does not have anything other than module_init/module_exit.
Bug 4551265
Change-Id: I59f6233705e2cfb510470ae3b9c1ce7d39618330
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197802
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
For some of the kernel ivc_ext is part of core kernel and
hence it is nto required to use the OOT ivc_ext driver.
However, some packaging still expect the ivc_ext.ko from
the OOT path. To trick the packaging file, add dummy ivc_ext
driver which does not have anything other than module_init/module_exit.
Bug 4551265
Change-Id: I315c9f302e65b4cdc1376815a7bc23e4b7ca3e00
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3214053
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>