Commit Graph

3316 Commits

Author SHA1 Message Date
Henry Lin
b527781f64 platform: tegra: add tegra-hv-xhci-debug driver
This commit adds a new driver called tegra-hv-xhci-debug which
provides Tegra XHCI debug information (currently, only firmware
log is available) when Hypervisior is enabled.

Bug 200416215
Bug 3840188

Change-Id: I4cf471fad7079d20d1cd2d8a4e6e275d4fc9180b
Reviewed-on: https://git-master.nvidia.com/r/1534461
Reviewed-on: https://git-master.nvidia.com/r/1741129
Signed-off-by: Henry Lin <henryl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3096315
Reviewed-by: Jim Lin <jilin@nvidia.com>
Reviewed-by: WK Tsai <wtsai@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: EJ Hsu <ejh@nvidia.com>
2024-04-11 12:08:25 -07:00
Yash Bhatt
1eb5fc3ad7 video: tegra: nvmap: Remove VPR resize code
Remove VPR resize code from nvmap as VPR resize support is deprecated
from K5.10+.

Bug 4479027

Change-Id: I93daecaa86ebffb2aee09836cd3faa5211e574a0
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3112223
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2024-04-10 21:37:34 -07:00
Yash Bhatt
6200c05e7d video: tegra: nvmap: Deprecate nvmap_ioctl_get_heap_size
Remove function nvmap_ioctl_get_heap_size from nvmap, as the ioctl NVMAP_IOC_GET_HEAP_SIZE is being deprecated and its functionality is being replaced with NVMAP_IOC_QUERY_HEAP_PARAMS.

Bug 4479027

Change-Id: I8a60810ff8b474f32413c9afe2ba3a0d7336a4d0
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110262
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-08 20:59:42 -07:00
Tonny Liang
c934b1b477 nvidia-oot: tegra-hv-oops-storage: support UFS virtual partition
Bug 4585217

Change-Id: Ieef4dac5b28a9851fdad17993f2b6b87498546e1
Signed-off-by: Tonny Liang <tonnyl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3111182
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2024-04-08 15:34:03 -07:00
Yash Bhatt
b451ef3baf video: tegra: nvmap: Deprecate dma_dev_from_handle
Deprecate dma_dev_from_handle from nvmap as it has no caller.

Bug 4479027

Change-Id: Id3b3e400a686e61366929d63ce6a2ef76c251edb
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3109957
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2024-04-08 07:27:05 -07:00
Omar Nemri
cf7b5803a0 drivers: pva: use kvzalloc instead of kcalloc
for task pool, kmem buffers, use kvzalloc instead of kcalloc
to better handle memory pressure situations.

Bug 4562933

Change-Id: I015ffa936fe77ab2c914d53667c0ec2f323a0676
Signed-off-by: Omar Nemri <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108135
(cherry picked from commit 8e77d444fb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110312
Reviewed-by: Colin Tracey <ctracey@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-05 20:49:03 -07:00
Jon Hunter
4432f3b652 spi: Fix build for Linux v6.9
For Linux v6.9 the compatibility layer that existed for transitioning
SPI drivers from using the legacy 'master' based naming to the
'controller' based naming for functions, structures and variables has
been removed. This is causing the various SPI driver build failures.

The compatibility layer was first introduced in Linux v4.13 by commit
8caab75fd2c2 ("spi: Generalize SPI "master" to "controller"") and given
that the newer "controller" based naming works for kernels from v4.13,
update the various SPI drivers to use the new naming for all current
supported kernels.

Bug 4471899

Change-Id: I5d9fcc429ab4262eb2827b61eb5aec729059f4b5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3109504
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: svc-sw-mobile-l4t <svc-sw-mobile-l4t@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-04-05 14:58:00 -07:00
Yash Bhatt
e6610ba08d video: tegra: nvmap: Remove deprecated functions
Remove nvmap_heap_pgalloc, nvmap_heap_pgfree and nvmap_heap_pgalloc_dev
functions from nvmap as they have no caller.

Bug 4479027

Change-Id: I8a64c2ba7b89337961c2a72f03d0b900ba942eed
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108930
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
2024-04-04 16:01:40 -07:00
Yash Bhatt
b9d188d974 video: tegra: nvmap: Deprecate cachelistsync functions
Remove cachelistsync functions from nvmap as they were only relevant for
older chips.

Bug 4479027

Change-Id: I19a1091ed2aafb5c1c74bf85f3f13d92df93bb34
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108894
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
2024-04-04 16:01:35 -07:00
Yash Bhatt
7c166d238c video: tegra: nvmap: Deprecate nvmap_init_t19x.c
Remove file nvmap_init_t19x.c from nvmap as it was only relevant for
older devices.

Bug 4479027

Change-Id: I7b09d25bec299e47efe237720f641328e9f0d6da
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108671
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2024-04-04 16:00:54 -07:00
Jon Hunter
b8b92d5d5f conftest: Fix test for SLAB_MEM_SPREAD
The conftest test for detecting if the definition SLAB_MEM_SPREAD is
present is not working as expected because it is using the 'functions'
type which is intended for only checking if a function is present or
not. Fix this by correcting the type to 'types'.

Bug 4471899

Change-Id: Iba3c9fe70a97793576d9f188d50628acb55f44df
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108683
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-04 06:47:58 -07:00
Jon Hunter
037fa78728 media: camera: Fix build for Linux v6.9
In Linux v6.9 the data argument of the function pointer passed to
gpio_device_find() was updated to be a const type. This breaks building
the CDI and ISC drivers for Linux v6.9. Update the test in conftest that
detects the presence of the gpio_device_find() function to perform a
second test to see if the argument for the function pointer is a const
type. Update the drivers that use the gpio_device_find() function
accordingly to fix the build.

Bug 4471899

Change-Id: I562451a401bcaebcf0acf9a7d563cb0ea1d87807
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104559
Reviewed-by: svc-sw-mobile-l4t <svc-sw-mobile-l4t@nvidia.com>
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-04 06:47:48 -07:00
Jon Hunter
68e7840dd8 media: camera: Update conftest for gpio_device_find
When adding conftest tests for detecting if specific functions are
present, it is always better to check if the newly added function is
present versus the function that has been removed. The reason being that
is the newly added function is modified in the future then the conftest
tests can be extended to check for updates to the function.

Therefore, instead of checking if the function gpiochip_find() is
present, which was removed in Linux v6.7, check if the function
gpio_device_find() is present, which replaced gpiochip_find in Linux
v6.7.

Bug 4346767
Bug 4471899

Change-Id: I32bf1c3da32abbf3c8d3ef9ea350decf1564e0bc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108643
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-04 06:47:43 -07:00
Bharath H S
a3466295e1 mst: Add support to mst_pci, mst_pciconf drivers
- Deploy latest supported MLNX MST drivers version-4.26.1-3
https://www.mellanox.com/downloads/MFT/mft-4.26.1-3-arm64-deb.tgz
- Fixes to enable build: fix path used for gcc -I for nnt_driver header
searching but use default path *.c files.
- Use new supported syntax for all objs required to be linked to build
kernel module for each of mst_pci, mst_pciconf & bf3_livefish which
uses <module>-y to set dependent .o objs and ccflags-y to declare the
local cflags.
- Remove makefile-specific targets so that the default kernel-src's
make modules apply to these modules.
- Add symlinks to nnt_driver to each of mst_pci, mst_pciconf this is
required to individually build the nnt_driver objs and use them in
parallel builds because nnt_driver build is disabled.
- This base support CL also  includes the fixes from CLs at topic
https://git-master.nvidia.com/r/q/topic:mst_fix.

bug 4192483
bug 4312056
bug 4538284
bug 4538284
bug 4539757

Change-Id: I6bd72f11cc7a8bf1dd8abba6385ea1d471befa02
Signed-off-by: Bharath H S <bhs@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3069978
(cherry picked from commit 73bffe884a1127164b3c0e74b0e4a5b8a6cf4d71)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3069973
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-04 06:44:50 -07:00
Yash Bhatt
31c6ad4b01 video: tegra: nvmap: Protect vidmem_carveout code
Function nvmap_register_vidmem_carveout currently has no callers so
protect it under NVMAP_HEAP_CARVEOUT_VIDMEM macro, so that if needed by
an api in future it can be re-used.

Bug 4479027

Change-Id: I0acd67d22f5ea2f1d31926bdd1f0ecffd0dd336e
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104689
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2024-04-03 08:54:48 -07:00
Yash Bhatt
873561ba29 video: tegra: nvmap: Protect flush heap code
Protect nvmap_flush_heap_block function under flag NVMAP_CONFIG_CACHE_FLUSH_AT_ALLOC because for carveouts if cache flush is done at buffer allocation time then there is no need to do it during release time.

Bug 4479027

Change-Id: I78372b5567d20d6e539cbe2b54a9099bea1780f3
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3103835
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-03 08:54:24 -07:00
Bharath H S
bf89e2d98e mft: Initial copy of mft source
Add initial mft source of version-4.26.1-3 from
https://www.mellanox.com/downloads/MFT/mft-4.26.1-3-arm64-deb.tgz

bug 4192483
bug 4312056

Change-Id: I77c0af297c9833c3dcbcdfc89b316042548b9af8
Signed-off-by: Bharath H S <bhs@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3069977
(cherry picked from commit d65df2a986469950aab3f323bbee3a3aee0c0308)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3069972
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-04-02 23:01:51 -07:00
Paritosh Dixit
f451b88fd7 net: nvethernet: Fix build for Linux v6.9
In Linux v6.9-rc1, the typedef of skb_frag_t is updated to a new struct
skb_frag. Struct skb_frag does not include bv_offset and bv_page
members. Hence, use functions skb_frag_off and skb_frag_page to get
offset and page respectively. Use of functions skb_frag_off and
skb_frag_page is backward compatible with older kernel versions that
we use.

Bug 4471899

Signed-off-by: Paritosh Dixit <paritoshd@nvidia.com>
Change-Id: I5d14c750c5b4cd28a2abeda95d7c11bf975ef1b8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104114
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-04-02 13:19:24 -07:00
Hiteshkumar Patel
e4f9759f61 nvidia-oot: nvpps: Replace dev_info with dev_dbg.
nvpps driver is printing debug info when TSC status is not locked.
Replace that status print for dev_info() to dev_dbg().

Bug 4566570

Change-Id: I6537e08204c35698bf11fd9c3ff4951a6167f8e9
Signed-off-by: Hiteshkumar Patel <hiteshkumarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3101099
(cherry picked from e77e6c5aec)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104089
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-02 08:02:22 -07:00
Hiteshkumar Patel
8b7a66b2cb Documentation: update nvpps device tree bindings.
- Add details of register mapping. If we do not pass these details in
  devicetree then it is giving error "TSC memory resource not defined"
  and not able to probe the driver. It is mandatory field for Tegra234.
- Remove hardcoding of ethernet interface name.
- Add to pass DT node for primary and secondary emac node instead of
  interface name.
- Update GPIO details as per refactoring of HTE driver.
- Update example as per update driver and DT node.

Bug 4489344
Bug 3826818

Change-Id: I5edbbe762543289cc2a6225111c5e6250bbabb99
Signed-off-by: Hiteshkumar Patel <hiteshkumarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3076493
(cherry picked from commit 755f4a8456)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3097856
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Gautham Srinivasan <gauthams@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-02 08:02:03 -07:00
Hiteshkumar Patel
f4720eda1d nvpps: Add support for AGX Orin.
Enable nvpps driver so it can be tested.

- Removed passing of ethernet interface name in DT.
- Require to pass Tegra ethernet controller DT phandle, where PTP server
  will run.

Bug 4489344
Bug 3826818

Change-Id: I943ddf4071a55fb409d589473fde0075ac9f7150
Signed-off-by: Hiteshkumar Patel <hiteshkumarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3076494
(cherry pick from commit 90c8229157)
Signed-off-by: Hiteshkumar Patel <hiteshkumarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3097855
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-02 08:01:58 -07:00
Jon Hunter
7acb255112 video: tegra: virt: Fix build for Linux v6.9
The definition SLAB_MEM_SPREAD was removed in Linux v6.9 and this breaks
the compilation of the Tegra Graphics Virtualization Comms driver. Add a
test to conftest to detect if SLAB_MEM_SPREAD is defined and update the
driver accordingly to fix the build.

Bug 4471899

Change-Id: Ibcac2dbc6538bcda92e818b333a9db6b8234f1d7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104558
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-03-28 17:56:28 -07:00
Jon Hunter
9c180ac0c8 soc/tegra: bpmp: Fix build for Linux v6.9
In Linux v6.9-rc1, the typedef genpd_xlate_t was updated to make
'of_phandle_args' argument const. Add a test to the conftest script to
test if this argument is const and update the BPMP powergate driver
accordingly.

Bug 4471899

Change-Id: I85ddb3689ccf5dc769cd208575db69a2cf7b0a11
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3103819
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
2024-03-27 07:08:44 -07:00
Jon Hunter
3b9f5783b2 block: virtual-storage: Fix build for Linux v6.9
In Linux v6.9-rc1, the function blk_mq_init_queue() was renamed
blk_mq_alloc_queue() and the arguments passed to the function were
updated. Add a test to conftest to detect if the function
blk_mq_alloc_queue() is present and update the virtual-storage driver
accordingly.

Bug 4471899

Change-Id: I7dc937eaad27445b1c140c57aafd36f4a4b769ba
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3095926
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
2024-03-27 07:08:40 -07:00
Yash Bhatt
7acc8a556a video: tegra: nvmap: Protect dma memory code
nvmap_dma_mark_declared_memory_occupied/unoccupied functions are only getting called when CONFIG_TEGRA_VIRTUALIZATION is defined. So protect the functions under the respective flag.

Bug 4479027

Change-Id: If4c00084fde5079778f47fc09c91dccde36fe4d4
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3103557
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2024-03-26 00:30:33 -07:00
Mikko Perttunen
4f69d815e6 drm/tegra: ofa: Only enable safety RAM if specified
Fix OFA boot sequence to only enable safety RAM if the configuration
specifies doing so.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: Id427dee5cfcda036b3f71b89e5d11a4a842964f1
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3103404
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
2024-03-26 00:30:19 -07:00
Yash Bhatt
f9c1b6728e video: tegra: nvmap: Remove deprecated functions
Remove page coloring related functions from nvmap as they were only relevant for t194.

Bug 4479027

Change-Id: Ib1ea11eb782308d574e3d62ce885da53debeaed3
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3098540
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2024-03-26 00:21:43 -07:00
Mikko Perttunen
d1fe820393 gpu: host1x: fence: Disable timeout on pre-silicon
Timing can be wonky on pre-silicon platforms, so disable fence timeouts
on pre-silicon platforms.

Bug 4458477

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I16221bbb568fe685cff7b3f7edddc7936325c86f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3098558
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2024-03-22 12:14:28 -07:00
rajangam
9b56ed79c0 t23x: psc: Add support to use other PSC instances
1.Updates the existing way of naming the debugfs nodes.
    2.HPSE and SB does not have SMMU ready would need to write
      all the data into the mailboxes, instead of using buffer

    JIRA: TMT-355

Change-Id: Ica5ad8a5efcc49bcdbe79eb3f3245e67458e507d
Signed-off-by: rajangam <rajangam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3084904
Reviewed-by: Liang Cheng (SW) <licheng@nvidia.com>
Reviewed-by: David Pu <dpu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-20 13:12:42 -07:00
Jian-Min Liu
1dc806cb91 Kleaf: add kernel modules in nvidia-oot
1. Add BUILD.bazel file.
2. Add build target of kernel module and required include folder
   srctree.* in Makefile to fix the build issue
3. The tr (a build tool defined by kleaf in the sandbox) which
   supported by toybox will cause the conversion of header files
   to file_define to fail. Fixed it by separating with two tr
   commands.

Bug 4344670

Change-Id: I56dcc148960f3b7703335943281589f42caa9af7
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3066225
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-19 06:50:10 -07:00
Mikko Perttunen
6025535763 drm/tegra: Enable job timestamping for NVJPG
NVJPG firmware now supports timestamping, so enable use of it.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I5a21f51e29ac19a95d36bb435dc884a440095ac2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3070327
Reviewed-by: Satvik Raj Gupta <satvikrajg@nvidia.com>
Tested-by: Satvik Raj Gupta <satvikrajg@nvidia.com>
2024-03-18 23:36:31 -07:00
Krish Agarwal
01ab1b46c3 drivers: pva: fix last desc not getting mapped bug
Last desc was not getting copied as loop
variable was getting incremented incorrectly.
PVAAS-14766

Signed-off-by: Krish Agarwal <krisha@nvidia.com>
Change-Id: Iabf101d0013197e7a207a500c2a4ae246e847968
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3091374
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
Reviewed-by: Sreehari Mohan <sreeharim@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
2024-03-18 21:31:22 -07:00
Jon Hunter
16df0a48d5 pva: Remove unused legacy nvhost functions
The functions nvhost_debug_dump_device() and
nvhost_module_remove_client() are a no-op and were initially
added to ensure that the PVA driver worked with both the legacy nvhost
driver and upstream host1x driver. Now the legacy nvhost driver is
deprecated remove these functions.

Bug 4475969

Change-Id: I1c1444b7b6578117f42200259174e2f60a464db3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3092468
Reviewed-by: Pekka Jylha Ollila <pjylhaollila@nvidia.com>
Tested-by: Pekka Jylha Ollila <pjylhaollila@nvidia.com>
2024-03-18 04:43:55 -07:00
Aniruddha Paul
615ba15a30 nvethernet: Create pool per Rx DMA channel
Existing implementation uses a single page_pool
for all Rx DMA channels. As by default all irqs
are on CPU 0, this does not cause any issue.
Routing an irq to some other CPU causes race
conditon for page allocation from page_pool which
leads to random memory corruption.

[  158.416637] Call trace:
[  158.416644]  arm_lpae_map_pages+0xb4/0x1e0
[  158.416649]  arm_smmu_map_pages+0x8c/0x160
[  158.416661]  __iommu_map+0xf8/0x2b0
[  158.416677]  iommu_map_atomic+0x58/0xb0
[  158.416683]  __iommu_dma_map+0xac/0x150
[  158.416687]  iommu_dma_map_page+0xf4/0x220
[  158.416690]  dma_map_page_attrs+0x1e8/0x260
[  158.416727]  page_pool_dma_map+0x48/0xd0
[  158.416750]  __page_pool_alloc_pages_slow+0xc4/0x390
[  158.416757]  page_pool_alloc_pages+0x64/0x90
[  158.416762]  ether_padctrl_mii_rx_pins+0x164/0x9d0 [nvethernet]
[  158.416807]  ether_padctrl_mii_rx_pins+0x478/0x9d0 [nvethernet]
[  158.416822]  osi_process_rx_completions+0x284/0x4d0 [nvethernet]
[  158.416832]  0xffffa26218b8f71c
[  158.416855]  __napi_poll+0x48/0x230
[  158.416871]  net_rx_action+0xf4/0x290
[  158.416875]  __do_softirq+0x130/0x3e8
[  158.416889]  __irq_exit_rcu+0xe8/0x110

This change creates a page_pool per Rx DMA channel.
This ensures there is no race conditon for page
alloc/dealloc from each DMA napi context.

Bug 4541158

Change-Id: I12668ee7d824fd30d54a874bbbdf190d02943478
Signed-off-by: Aniruddha Paul <anpaul@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3091494
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2024-03-17 09:33:32 -07:00
Mikko Perttunen
c2d209f066 drm/tegra: gem: Don't attach dma-bufs when not needed
The dma-buf import code currently attaches and maps all imported
dma-bufs to the drm device to get their sgt for mapping to the
directly managed IOMMU domain.

In many cases, like for newer chips (Tegra186+), the directly
managed IOMMU domain is, however, not used. Mapping to the drm
device can also cause issues e.g. with swiotlb since it is not
a real device.

To improve the situation, only attach and map imported dma-bufs
when required.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: If73cc4e9419a2eebf67269eadb34050986f73077
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3090413
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-15 13:05:54 -07:00
Mikko Perttunen
a050b8203b drm/tegra: gem: Open code drm_prime_gem_destroy
Since we aren't using drm_gem_prime_import(_dev), for clarity don't
use the corresponding destroy function either.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I024a78a6378d0fa6f0134958904122b8d201d99c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3090412
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2024-03-15 13:05:49 -07:00
Vishwaroop A
3584ef129e drivers: spi: remove spi_master_put() in probe
Currently the spi_master is allocated by devm_spi_alloc_master()
in the spi slave. so there is no need to call spi_master
put again this fixes the probe failure seen in spi slave
driver

Bug 4537830

Signed-off-by: Vishwaroop A <va@nvidia.com>
Change-Id: Ie0ea17c308caade7c0a1f298c7ac4f3b86a38541
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3095347
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-03-14 11:35:17 -07:00
Jon Hunter
e020b2d931 bmi088: Add build dependency on HTE
The BMI088 driver is dependent upon the HTE driver and so only build the
BMI088 driver if HTE is enabled.

Bug 3961133

Change-Id: I1338d44f4814fb23636206081019ea9cb1390fcc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3093706
(cherry picked from commit 003bd8ed9b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3094428
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Gautham Srinivasan <gauthams@nvidia.com>
2024-03-13 20:54:03 -07:00
omar
637dd81935 drivers: pva: check cb_size against memory size
verify that circular buffer size is within the allocated buffer
when checking address range for bot source and destination.

Bug 4432254

Change-Id: I265f2c4b9f46cf24db8bd86cf5abf3f9b2e67994
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3046464
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-13 05:14:00 -07:00
Jon Hunter
a6d28bc2c8 gpu: host1x-nvhost: Remove unused functions
The functions nvhost_job_put() and nvhost_syncpt_set_minval() are no
longer used so remove these functions.

The flag CONFIG_TEGRA_HOST1X is always true for out-of-tree drivers and
so remove the legacy code for when this flag is not defined.

Bug 4475969

Change-Id: I88c89d30bfc9be4b8628f115ea96835cb5f6f295
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3091653
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-03-12 13:32:13 -07:00
Gautham Srinivasan
45c87920e5 nvidia-oot: remove gte driver
HTE driver will be used instead of GTE. Remove GTE sources.

Bug 3961133

Change-Id: I379198da9c1896aa44043195a8c30b377b08c7c4
Signed-off-by: Gautham Srinivasan <gauthams@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3067352
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3091089
2024-03-11 08:07:11 -07:00
Gautham Srinivasan
fdac8e7016 nvidia-oot: nvpps: Use HTE driver
Refactor NVPPS driver to use HTE APIs instead of GTE

Bug 3961133

Change-Id: I0a38fb6fd42217515410a610d1900cb036086cf5
Signed-off-by: Gautham Srinivasan <gauthams@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3067331
Reviewed-by: Dipen Patel <dipenp@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3091088
2024-03-11 08:07:06 -07:00
Gautham Srinivasan
2f5df7306b nvidia-oot: bmi088: Use HTE driver
Refactor BMI088 driver to use HTE APIs instead of GTE

Bug 3961133

Change-Id: Idc87574399b5e9d2f907e37b2615ea3d540ceba7
Signed-off-by: Gautham Srinivasan <gauthams@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3062386
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Dipen Patel <dipenp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3062322
2024-03-11 08:07:01 -07:00
Sameer Pujar
0332fd555e ASoC: tegra: fix sound card dependency
There is GVS intermittency where few audio tests fail because there is
no APE sound card available. The card registration itself does not
happen because there is kernel data abort and following dump is seen:

 [   36.163223] Unable to handle kernel paging request at virtual address ffffffffffffffc0
 [   36.171180] Mem abort info:
 [   36.171182]   ESR = 0x0000000096000004
 [   36.171183]   EC = 0x25: DABT (current EL), IL = 32 bits
 [   36.171186]   SET = 0, FnV = 0
 [   36.174218]   EA = 0, S1PTW = 0
 [   36.174219]   FSC = 0x04: level 0 translation fault
 [   36.174221] Data abort info:
 [   36.174222]   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
 [   36.174223]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
 [   36.174224]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
 [   36.174226] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000813b67000
 [   36.174228] [ffffffffffffffc0] pgd=0000000000000000, p4d=0000000000000000
 [   36.174234] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP

This seems to happen because mixer control override driver has the
dependency over the sound card and this dependency check is incorrect.
The attempt is made to register override controls before the sound card
is fully ready.

One option is to use 'card->instantiated' flag to add the dependency.
However this flag update is protected by card mutext and client_mutex
which is local to the core. So this flag check does not appear fully
reliable.

As a safer option, the override device is made child of sound device.
This way the probe order is ensured and override probe happens only
after a successful sound probe. This requires a change in machine driver
to allow probe() happen for child devices. This may be a concern during
usage of upstream machine driver which does not have provision for child
device probing. For now unblock the upstream AHUB usage by using this
safe option and investigate the best option to make the override driver
independent.

Bug 4508166
Bug 4451662
TAS-2251

Change-Id: Ib13f0a3a0ac272a0f2325b9d74efbc31128f0991
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3083180
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 21:47:19 -08:00
Sameer Pujar
72ed0ddf9d Revert "Revert "ASoC: tegra: Remove legacy AHUB OOT drivers""
This reverts commit 00c10d965b.
This is done to restore original commit of removing legacy AHUB OOT
drivers as the GVS intermittency issue is now root caused.

Bug 4508166

Change-Id: I0f0f9d34b0c408aa4fec20bc6df25ea23eac1189
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3083108
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 21:47:14 -08:00
Sameer Pujar
b0b6f09a6d Revert "Revert "ASoC: tegra: use upstreamed AHUB drivers""
This reverts commit 1d0f4c4ffc.
This is done to restore original commit of using upstreamed AHUB
drivers as the GVS intermittency issue is now root caused.

Bug 4508166

Change-Id: Iae064f8dae4cf79c639f060c3e24bda43a82b201
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3083109
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 21:47:09 -08:00
Ketan Patil
07a8392942 video: tegra: nvmap: Move check at correct place
Check the return value from nvmap_duplicate_handle and decide code flow
based upon that return value.

Bug 4506926
Bug 4404709

Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Change-Id: I7f4a4d5e768f2c5eae2fd6abdb91a753f12bff39
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3089780
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 16:01:26 -08:00
Akhil R
75ea3b11d0 i2c: tegra-slave: Add I2C Tegra slave driver
Add back the removed i2c-tegra-slave-byte driver and add support
for it in kernel v6.1

Though not enabled in device tree by default, I2C slave driver is
used by customers and developers for various debug and application
use cases.

Bug 4288065
Bug 4061232

Change-Id: Idd012303f51456492a8392e51aee1edc8dcb487c
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3048842
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 15:56:47 -08:00
Sandipan Patra
04406c221a device-tree: generic: Pickup DTB makefile from hardware/nvidia/t264
The path for the t264 DTS repo are hardware/nvidia/t264

Pickup the Makefiles from this new path for building
DTB.

Bug 4459750

Change-Id: I4d799241ab6479c7999a4dd77523d842ac6550f4
Signed-off-by: Sandipan Patra <spatra@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3089965
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 06:14:28 -08:00
Ketan Patil
2841339c6f mc-utils: Add support for t239
t239 was using mc-utils driver from kernel-nvidia folder as it was using
kernel k5.10; t239 is moving to kernel k6.1, hence update the mc-utils
driver from nvidia-oot to support t239.

Bug 4436559

Change-Id: I880a2fce377d65951983dea8876ca2954e9ddbc8
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3083702
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-06 23:29:21 -08:00