1. The nvhost interface like syncpoint offset/aperture were
taking "pdev" of Host1x device, but emulated syncpoint driver
implementd the interface with "pdev" of clinet device. This was
done to align all other interface input parameter.
This patch revert the above alignment of intput parameter change.
2. This patch modify SyncpointWait IOCTL handler to return timestamp
of signal observed by KMD to UMD
Bug 4895937
Change-Id: I61ba02992963ba272e5c2514ffe8c24fff510c3a
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226744
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
- Update Makefile to build the legacy chip related
files only when any of the below configs are set.
CONFIG_ARCH_TEGRA_2x_SOC
CONFIG_ARCH_TEGRA_3x_SOC
CONFIG_ARCH_TEGRA_114_SOC
CONFIG_ARCH_TEGRA_124_SOC
CONFIG_ARCH_TEGRA_132_SOC
CONFIG_ARCH_TEGRA_210_SOC
CONFIG_ARCH_TEGRA_186_SOC
CONFIG_ARCH_TEGRA_194_SOC
- Update drm.c/.h to build legacy chip specific
code portions for the respective configs accordingly.
Jira HOSTX-5727
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Change-Id: I3d2235923011073d82dcfe6b1fd6618ae70d37bb
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3253132
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
- Update Makefile to build the legacy chip specific
files according to the below configs.
CONFIG_ARCH_TEGRA_2x_SOC
CONFIG_ARCH_TEGRA_3x_SOC
CONFIG_ARCH_TEGRA_114_SOC
CONFIG_ARCH_TEGRA_124_SOC
CONFIG_ARCH_TEGRA_132_SOC
CONFIG_ARCH_TEGRA_210_SOC
CONFIG_ARCH_TEGRA_186_SOC
CONFIG_ARCH_TEGRA_194_SOC
- Update dev.c/.h to build legacy chip specific
code portions for the respective configs.
Jira HOSTX-5727
Change-Id: I7dbd23ab1c91c859941c4965123bb60e518063fc
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263215
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
add dump of FW logs on error to pva_abort() and
task completion/task errors.
pva_abort handles most error cases since it is
invoked to recover. task completion and error
are handled by scheduling work to dump out
the buffers.
Jira PVAAS-17237
Change-Id: Ib5f07d81b16357310ab19b11a087003b455daa66
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3264720
Reviewed-by: Reshma Prabhu <rprabhu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
NvMap page pool expose some sysfs nodes to enable/disable page pool,
change the size of page pool, shrink the page pool. There is no
need/usecase of dynamic changes in page pool size for DriveOS. Hence
disable resizing code for embedded builds. If we want to keep the sysfs
nodes then we need to have proper uid/gid support to satisfy security
analysis for DriveOS, as there are no usecases of these nodes, disable
them only for embedded builds.
JIRA TMM-5864
Change-Id: Ia7fec558402ed3aa64ee1e0d49acdc844a66c82a
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3265223
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
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>
When Link up fails during driver probe, controller is kept powered
on, even when controller is not configured as hot plug capable.
This results in more power consumption. Turn off controller when
no link detected during driver probe, only when controller does not
have hot-plug capability.
Ignore resume and remove AI's when no link during probe for no
hot-pluggable controllers.
Ignore Link state check for VDK, on which it cannot be detected.
Bug 4688706
Change-Id: I80a2b5845d48b07f25f65dc7cf5509aeb5778399
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3246221
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Add call to check_add_overflow to fix CERT INT 30-C and INT 8-C defects.
Add boundary check for offset value to fix default coverity
TAINTED_SCALAR and MISRA 4.14 defects. Offset value is being passed on
and eventually used as a loop boundary. So, a check at the beginning is
required.
Total Defects Fixed: 4 Defects
Bug 4479044
Change-Id: Ie687c5d7d84cd3f7897d5e6e04ab90d0ed2e1619
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263923
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Decrement hrange->offs_start with hs[i]->size instead of tot_sz. tot_sz
holds the cumulitive sum of hs[0...i]->size and decrementing this from
hrange->offs_start will decrement values from 0..(i-1) multiple times,
which is incorrect and can cause a wrap around.
Bug 4479044
Change-Id: If6afe9f05fc0d246d42a95fa6d9708361efcc9f8
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263927
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
In Linux v6.13, commit 94a20fb9af16 ("sysfs: treewide: constify
attribute callback of bin_attribute::mmap()") changed the type of the
'struct bin_attribute' argument of the bin_attribute:mmap function
pointer to const. Use conftest to detect if this argument is const or
not in the kernel the driver is being compiled against to fix the build.
Bug 4991705
Change-Id: I791d6c9dde50f1444d0339ebd8a18434045f9026
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261699
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Commit 0809a9ccac4a ("spi: remove {devm_}spi_alloc_master/slave()")
removed devm_spi_alloc_master() and this breaks building the Tegra124
and Tegra210 SPI drivers for Linux v6.13. Commit b8d3b056a78d ("spi:
introduce new helpers with using modern naming") previously added new
helpers in Linux v6.2 which should be instead. Add a test for conftest
to detect if the kernel supports the function devm_spi_alloc_host()
and if so use this function.
Bug 4991705
Change-Id: I1d639297ef7adfdcde50927360607639b45a4a60
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261698
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
In Linux v6.13, commit 689274a56c0c ("drm: Remove DRM aperture helpers")
removed the DRM aperture helper functions and drivers should simply use
the existing video helpers. Update the Tegra DRM driver to use
aperture_remove_all_conflicting_devices() if available to align with
upstream.
Bug 4991705
Change-Id: Ie4b78a4ea519ffcaaf972417ec2cbe7c436eb808
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261694
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
When struct dma_coherent_mem* is typecasted to struct
dma_coherent_mem_replica* coverity complains with CERT EXP 39-C defect.
This defect says that we can not access a variable through a pointer of
an incompatible type.
Coverity is not able to detect that both the types essentially contain
the same members and also, we can not use struct dma_coherent_mem*
directly.
Add an union datatype to have both struct dma_coherent_mem* and struct
dma_coherent_mem_replica*. Union makes the coverity tool accept the
usage of both the types together.
Fix 4 CERT EXP39-C defects.
Bug 4479044
Change-Id: Ia29ede9b47b3e1e110450f365e125cc2b77d2ee7
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262832
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
This reverts commit ee72e995da1ee31177a06053b4c89f3ba6a1060a.
Reason for revert: This breaks building the OOT modules standalone without the GPU sources which are not public. Futhermore, this header
appears to be internal and so should not be included in sources that
are distributed publicly.
Jira: NVIPC-2817
Change-Id: I9a98056b004b7b6454473957f488020718eabfd4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263605
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
The current makefile path is identified by the lastword of
MAKEFILE_LIST. This works fine till none of the makefile is
included before using the MAKEFILE_LIST, else the value of
the MAKEFILE_LIST get changed with new included makefile path
as last word.
Fix this by getting the path of current makefile at beginning
before including any new makefile path.
JIRA TMM-5842
Change-Id: I9d59e0b2f589dfa036d1f43850a05bc71f84aa48
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262527
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@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>
- Adds syncpt emulator wrapper class for axi-nvdla.ko module
- Fixes minor bugs
- The behavior of SHIM write differs between the nvhost
syncpoint and nvhost-emu. The DLA KMD accommodates the
same.
- For the simulator, there is no proper management for loading
and unloading the firmware. This will lead to a undefined
behavior. This commit fixes the issue through use of refcnt.
- The RISCV will be in halted state and will continue from where
it left off. Due to a security configuration, the DLA cannot
reload the firmware again and again after booting the system.
As a WAR, the simulator avoids reloading the IMEM and DMEM.
Raised a Bug 4960393 to provide a proper fix and work around
is protected using macro BUG_4960393=1
- The FPGA is always considered on. Raised a Bug 4972382 to
enable power management and work around to skip the power
operation through macro BUG_4972382=1
Bug 4942853
Change-Id: I0bf0262d6fde3b3da47f040c493d915ae6a1f98a
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248734
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>