Commit Graph

3191 Commits

Author SHA1 Message Date
Paritosh Dixit
91e87c9346 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
(cherry picked from commit f451b88fd7)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108315
Tested-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2024-04-18 13:56:15 -07:00
Jon Hunter
e351ba75c7 media: camera: Ensure gpio_device_get_chip is present
In Linux v6.7, both gpio_device_find() and gpio_device_get_chip() were
added. However, don't assume that if one is present then so is the other
and so add a test to check if gpio_device_get_chip() is also present.

Bug 4471899

Change-Id: I0c547a52b0f397aef43884ab76d815573e8ed3f8
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3112133
(cherry picked from commit 9458d6b97f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3119068
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-18 13:56:10 -07:00
Jon Hunter
5ff50fc9ea 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
(cherry picked from commit 037fa78728)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104651
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-18 13:56:00 -07:00
Jon Hunter
94090ac30e 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>
(cherry picked from commit 68e7840dd8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3111544
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-18 13:55:49 -07:00
Jon Hunter
f78df7fa59 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
(cherry picked from commit 7acb255112)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104650
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-18 13:55:38 -07:00
Jon Hunter
1a5be9188a 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
(cherry picked from commit 9c180ac0c8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104378
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-18 13:55:28 -07:00
Jon Hunter
6969153c7c 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
(cherry picked from commit 3b9f5783b2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104377
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-18 13:55:17 -07:00
Shobek Attupurath
4e544f3b3a rtl8822ce: Add Nvidia changes on v5.14.0.4-217
1. Add custom roam parameters
2. Add path for power file
3. Add source tree path for Makefile
4. Add section in Makefile for TEGRA platform
5. Update permissions from 0755 to 0644 for files
6. Move roaming debug prints to RTW_INFO

Bug 4320751
Bug 4556940
Bug 4568390

Change-Id: I842f150781652b3b54949aef8f982903c8d7991e
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108666
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-04-18 09:24:33 -07:00
Revanth Kumar Uppala
ed30eb40ff rtl8822ce: Fix TLP/EAPOL/TXFIFO issues
Issue: Observing the EAPOL packet after a second in 1/10 roams

       Observing TLP Malform packets on SC7

       Observing TXFIFO error when connected to serving AP

       Compilation errors for K6.x

Fix:   Add exact base driver released by realtek with EAPOL/TLP/TXFIFO
       fixes and also resolve some compilation errors.

DRIVERVERSION   v5.14.0.4-217-g7a0377e61.20240410_COEX20240327-2727_beta
BTCOEXVERSION   COEX20240327-2727

Bug 4320751
Bug 4556940
Bug 4568390

Change-Id: Ib02056ea388300dab2364b2bd6ceaf0a2096d3f4
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3115032
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2024-04-18 09:24:27 -07:00
yunzhao
f107cac72e csi5:add error config
add the error configuration for v4l2 path, Make the error config
of v4l2 and Argus consistent on the same port.

bug 4499208

Signed-off-by: yunzhao <yunzhao@nvidia.com>
Change-Id: I3dce5b9a30e3f04d2224252b3aff7ca0c9ef5567
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3097276
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Jackie Chen <jackchen@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-18 07:09:24 -07:00
Mikko Perttunen
83d8dcc34c drm/tegra: nvdec: Enable SLCG/PG
Add register writes to enable second level clock gating /
power gating. For now only for Tegra234.

Bug 4475968

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: Ie2e3b6d375bb6b7772b71999df81d73bea7ad550
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3116212
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-04-15 23:09:24 -07:00
Omar Nemri
318fd1fe91 drivers: pva: change kmalloc for kvmalloc for elf
when loading lf, a local buffer is allocated to process the elf.
switch to using kvmalloc from kmalloc to be able to handle memory
pressure situations better.

Bug 4562933

Change-Id: Ie78d2d2a56f13e09e98bf6888ccc76ffb0ecfb12
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3114106
Reviewed-by: Omar Nemri <onemri@nvidia.com>
Tested-by: Omar Nemri <onemri@nvidia.com>
Reviewed-by: Jonas Toelke <jtoelke@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-10 16:24:55 -07:00
Jon Hunter
fc8c410eb6 ASoC: tegra: Drop 'oot' suffix for upstream drivers
When booting kernels that have both the upstream and out-of-tree audio
drivers for Tegra present the following errors are observed ...

 Error: Driver 'tegra210-ahub' is already registered, aborting...
 Error: Driver 'tegra210-amx' is already registered, aborting...
 Error: Driver 'tegra186-dspk' is already registered, aborting...
 Error: Driver 'tegra210-mvc' is already registered, aborting...
 Error: Driver 'tegra210-adx' is already registered, aborting...
 Error: Driver 'tegra210-ahub' is already registered, aborting...
 Error: Driver 'tegra210_mixer' is already registered, aborting...
 Error: Driver 'tegra186-asrc' is already registered, aborting...
 Error: Driver 'tegra210-dmic' is already registered, aborting...
 Error: Driver 'tegra210-i2s' is already registered, aborting...
 Error: Driver 'tegra210-admaif' is already registered, aborting...

The problem is that the upstream Tegra audio drivers are loaded first
and then the kernel attempts to load the out-of-tree variants because
they have a different name. The out-of-tree are installed under the
'updates' directory in the file-system and by dropping the 'oot' suffix
from the driver name, then depmod will not attempt to load both variants
of the audio drivers and prioritise loading the drivers in the 'updates'
directory.

Bug 4590647

Change-Id: I6c6fe1eb84bc9fdfa4a8f4abf1ce3a75f3bfba8a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110266
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
2024-04-08 13:09:37 -07:00
Omar Nemri
8e77d444fb 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
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Colin Tracey <ctracey@nvidia.com>
rel-36_eng_2024-04-04
2024-04-04 17:54:24 -07:00
Jon Hunter
7e82f57b74 nvpps: Add missing header of.h
Building the NVPPS driver with Linux v6.9-rc1 is failing with the
following error ...

 drivers/nvpps/ptp-notifier.c:125:69:
 error: invalid use of undefined type 'const struct device_node'

Add the header file of.h to fix this build issue.

Bug 3826818
Bug 4471899

Change-Id: I0eb23e3556ec280447e3d2c499afc11daad601a0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104379
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-03-26 07:54:17 -07:00
Hiteshkumar Patel
e77e6c5aec 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
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Dipen Patel <dipenp@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-25 10:54:28 -07:00
Praveen AC
e3f09d3989 nv_hawk_owl:Fix 3rd Hawk streaming fail.
Enable video pipe line for Hawk3 i.e video pipe 4 & 5.

Bug 4564878

Change-Id: Ib39a5afc332722e5e8476f689a243f7dc71a6a2c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3099879
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2024-03-20 04:58:28 -07:00
Shobek Attupurath
9efa10a1d7 rtl8822ce: Move continuous prints to log INFO
Issue: As part of roaming, some debug prints are being continuously
       spewed on kernel logs

Fix: Move roaming debug prints RTW_INFO

Bug 4563642

Change-Id: I7ef8c78241fd6e6c9caf96357a6fb9a6c4b4a555
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3097074
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2024-03-15 11:54:20 -07:00
Hiteshkumar Patel
90c8229157 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
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
rel-36_eng_2024-03-14
2024-03-14 15:39:41 -07:00
Hiteshkumar Patel
755f4a8456 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
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-03-14 15:39:36 -07:00
Jason Mei
888f248ee2 net: Use conftest to determime NAPI interface
Add compile time tests to the conftest.sh script
to determine netif_napi interface check at compile
time for the kernel being used. This is beneficial
for working with 3rd party Linux kernels that may
have back-ported upstream changes into the kernel
and so the kernel version checks do not work.

Bug 4456727
Bug 4451567

Change-Id: I7b00c3b491d778a9bf2f0d1069a5e4546b722e2a
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3096002
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2024-03-14 08:54:11 -07:00
Aniruddha Paul
d01b6a3a2b 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/+/3093534
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
2024-03-14 03:54:09 -07:00
Jon Hunter
003bd8ed9b 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
Reviewed-by: Gautham Srinivasan <gauthams@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-03-11 14:54:22 -07:00
Shobek Attupurath
4a31d7ed61 rtl8822ce: Add Nvidia changes
1. Add custom roam parameters
2. Add path for power file
3. Add source tree path for Makefile
4. Add section in Makefile for TEGRA platform
5. Update permissions from 0755 to 0644 for files

Bug 4213654

Change-Id: Ib160d11285c093efe04fc5cb932b770585ad6bb3
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079869
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-09 03:40:00 -08:00
Shobek Attupurath
e3673f6890 rtl8822ce: Add driver with roaming support
Issue: RTL8822CE driver doesn't have active roaming
       support and has issues with current roaming
       algorithm

Fix: Add driver with active roaming enabled and fixes
     issue with 5GHz and BT coex

DRIVERVERSION -
"v5.14.0.4-203-g4a9c85a0f.20240219_COEX20240125-2727_beta"
BTCOEXVERSION -
"COEX20240125-2727"

Bug 4213654

Change-Id: Icff3ece063518575fbcca3d8ea5be0b6314a567f
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079863
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2024-03-09 03:39:54 -08:00
Gautham Srinivasan
8317f938ec 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>
rel-36_eng_2024-03-06
2024-03-05 19:28:05 -08:00
Gautham Srinivasan
8e5cebeb9e 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>
2024-03-05 19:27:59 -08:00
Gautham Srinivasan
cccf65a229 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>
2024-03-05 19:27:54 -08:00
Shubham Chandra
17e0946ce0 nvidia-oot: imx318: fix probe failure
V4l2 ctrl values are 0 during init time s_ctrl call
from v4l2. Since framerate val parameter is 0, when
set_framerate_ex is called from set_ctrl_ex during
initialization for probing of imx318 sensor, this
results in invalid error and probe failure for imx318.

Assign framerate 'val' to a value from imx318 sensor
device-tree properties within the given range to avoid
probe failure due to this.

Bug 3692128

Change-Id: Ib5f50e64f99c8443bf604066eda315dc96fbde03
Signed-off-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3089350
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-05 07:09:09 -08:00
Jon Hunter
f9ed570c2b net: nvethernet: Prevent VM interrupts being balanced
If the userspace service 'irqbalance' is installed then the nvethernet
driver crashes when there is network activity. To avoid this crash set
the IRQF_NOBALANCING flash for the VM interrupts. No performance
degradation is observed when running iperf3 with a 1Gbps link.

Long-term the nvethernet driver still needs to be fixed to allow IRQ
balancing.

Bug 4293378
Bug 4541158

Change-Id: I0aa4ee28e36c7d273f14ff043544e72d3e988bd3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3087525
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-04 07:24:12 -08:00
Ankur Pawar
4d4e685699 media:i2c: fix imx477 partial frame output
Fix imx477 partial frame issue and wrong frame-length
/exposure time calculations.
Uses hardcoded sensor internal clock frequency
instead of clock values from sensor device tree.

Adding clock frequency to device tree also require
deskew_initial_enable = "true". Setting deskew in
device tree is causing kernel panic in function
nvcsi_deskew_setup(). For unblocking the IMX477
use case, set hardcoded clock in driver for now.

Bug 4384649

Change-Id: Iedb02673c6f4da140aee22adc991805b6aa1eb7e
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3086503
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-04 01:24:48 -08:00
Jason Mei
396db89160 PCI: EPF: tvnet: fixed the fence memory issue
1.Make the allocate_fence() thread-safe
2.Update the fence_do_work according to auto
  fix: https://nvbugs/4539983
3.Shouldn't creat fence in callback
4.There was typo which mixed ctrl with data.

Bug 4456727
Bug 4451567

Change-Id: If7676c8d77dc40bd5f77927efa7616e7970da183
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3087944
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-03 20:54:20 -08:00
Anubhav rai
d495adaddf vi5_fops: fix mem leak
release capture requests and embedded data
buffers before closing and exiting the stream

bug 4336756

Change-Id: Iba856eea9757a8226bc949ae1d72a87adf2d55eb
Signed-off-by: Anubhav rai <arai@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3068424
(cherry picked from commit e5075835ab)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3086577
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-01 12:57:50 -08:00
Ankur Pawar
7096cb09a5 media:i2c: fix ar1335 control command
When ar1335_common.c was ported to K5.15 it was refactored
based on the review comments. During that process index
in mcu_send_ctrl_cmd() was set to 0xFFFF which was causing
issue in setting sensor format. Pass the index from the
caller of mcu_send_ctrl_cmd().

Bug 4389285

Change-Id: Ic84a8de58051fe947f0f4d6597d1a55bc29ef9e6
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3024535
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
rel-36_eng_2024-02-27
2024-02-26 05:24:23 -08:00
Brad Griffis
f877c7e3da nvidia-oot: Update OOT driver path
The installation path for the OOT drivers has been updated from 'extra'
to 'updates'.

Bug 4410785

Change-Id: I54c8ce97cb1b159095b9dc3450ef0af711eb7f9b
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3069039
(cherry picked from commit aaee95a8eb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3082930
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-26 03:10:53 -08:00
Jon Hunter
c8a0c93fc1 drivers: Drop '-next' from driver names
The OOT variants of the host1x and tegra-drm drivers originally had
a '-next' suffix in the name to differentiate these from the upstream
versions. Now that the OOT drivers are installed under the 'updates'
directory, the '-next' suffix can be dropped because 'kmod' will
prioritise loading the variant in 'updates' over those built from the
kernel tree.

Bug 4410785

Change-Id: I29287ddb935b681a5ee8a3326428eba82715da76
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3065465
(cherry picked from commit eee13a1edb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3063836
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-26 03:09:59 -08:00
Jason Mei
bba1f3a464 net: ethernet: sync link status before removing
The tegera_tvnet driver usually built as kernel
module, to avoid rmmod/insmod cause kernel crash
sync link status before rmmod

Bug 4456727
Bug 4451567

Change-Id: I2b7227fef36688777b8a468678be9e63a7638c2c
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079867
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-25 21:40:04 -08:00
Jason Mei
3506076764 PCI: EPF: tvnet: porting the PCIe EP tvnet driver
Port the PCIe EP tvnet to 5.15 kernel
switch to host1x sycpt method and others kernel
interfaces

Bug 4456727
Bug 4451567

Change-Id: I78a1ed5e1f80210a03dc83775937ba90c2839a5b
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3070173
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-25 21:39:59 -08:00
Jason Mei
5a65235c0d PCI: EPF: Add lpci_epc_map_addr for pre-v5.15 Linux kernels
Build the Tegra PCI vnet driver fails with Linux v5.14 because the
lpci_epc_map_addr() have the incorrect number of arguments.
The arguments to the lpci_epc_map_addr() functions were updated
in Linux v5.12 but the current Tegra PCI EPF driver assumes that they
were updating after Linux v5.14. Update the Tegra PCI EPF driver to
use the correct arguments for v5.12 onwards.

Bug 4456727
Bug 4451567

Change-Id: Ie4ef36854d380e0a896a0f256d846ab8b89ca447
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3070170
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-25 21:39:54 -08:00
Jason Mei
e70b9e4c10 PCI: EPF: tvnet: porting the PCIe tvnet driver
Port the PCIe tvnet to 5.15 kernel

Bug 4456727
Bug 4451567

Change-Id: I1b7a68479749145eca33361d6c79d53622c57ce7
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3070167
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-25 21:39:48 -08:00
Ankur Pawar
29e88ed17e camera: fix the kernel freeze after driver unbind
Kernel freeze is occurring due to incorrect cleanup
in vi5.c.

Fix for kernel freeze:
1 Don't call vi_channel_drv_unregister() and
  tegra_vi_media_controller_cleanup() in vi5_remove.
2 capture_vi_probe() is calling vi_channel_drv_register() and
  tegra_capture_vi_media_controller_init(), so capture_vi_remove()
  should call vi_channel_drv_unregister() and
  tegra_vi_media_controller_cleanup()
3 Use correct dev pointer in vi_channel_drv_unregister().

Code cleanup:
1 Remove use_legacy_path variable that was used for T186.
2 Removed unused t194_vi5_file_private struct.

Bug 4415340

Change-Id: I6153f65d62a9f7f4fc5d04c2ace948a29396e404
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3077660
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Ankur Pawar <ankurp@nvidia.com>
2024-02-21 23:10:25 -08:00
Jon Hunter
61319aef4d drm/tegra: Don't print error on probe defer
The following error messages are sometimes observed on boot ...

 tegra-nvjpg 15380000.nvjpg: failed to get icc write handle
 tegra-nvdec 15480000.nvdec: failed to get icc write handle
 tegra-nvjpg 15540000.nvjpg: failed to get icc write handle
 tegra-nvenc 154c0000.nvenc: failed to get icc write handle
 tegra-vic 15340000.vic: failed to get icc write handle
 tegra-nvjpg 15380000.nvjpg: failed to get icc write handle

The above messages are harmless because the ICC core is returning
-EPROBE_DEFER to indicate that the ICC provider is not available. When
-EPROBE_DEFER is returned the kernel will attempt to probe the device
again and so print an error on -EPROBE_DEFER can be misleading. Fix the
above by using the function dev_err_probe() to print error messages
because this function will only print an error message if the error code
is not -EPROBE_DEFER.

Bug 3436156
Bug 4496044

Change-Id: I47b77e5a0f2bdb817a832daa305246c8803f456b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3075237
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-13 02:24:56 -08:00
Praveen AC
518ae94bb4 media: i2c: update ar0234 EEPROM data structure
- Integrate calibration data structure from
  Leopard Imaging hawk driver into NVIDIA
  hawk driver
- Rearrange EEPROM calibration data structure to
  maintain backward compatibility with HAWK, OWL
  modules with EEPROMs programmed using earlier
  calibration data structure
- Use separate structures for tracking imu noise
  parameters and place it after the module
  serial number.
- Change module serial number length used for
  reading the serial number from EEPROM data

L4T-4649

Change-Id: I17613905e63fef3fc690dca42a0a10bd1f4fc24d
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3072846
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-02-09 01:09:27 -08:00
Praveen AC
6642085af9 i2c:nv_hawk_owl: Reduced sensor stream on time.
Following changes are done to reduce 400ms to 200ms:
1> I2c address trans during every power_on is moved to probe time.
   Since with virtual-i2c mux IMUs are handled and hence we don't need to
   do i2c address trans every time. So once during probe time is enough,
   that reduces ~120ms.
2> Reduced sleeping time during start stream call to 20ms, Which reduced
   ~100ms.

Bug 4180672

Change-Id: I027148f64b892d95e5432394f90bf171156ef9c0
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3072821
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-09 01:09:17 -08:00
Praveen AC
e31d73fa20 media: i2c: ar0234: Fix dual hawk corruption
- Fixes the frame corruption issue encountered
  when simultaneously streaming from two
  hawks via E3653 GMSL2 board
- Route each serializer output to a different
  deserializer output CSI port instead of
  routing video data from both serializers
  to the same deserializer output port
- Route data through two virtual channels for
  each of the two output ports instead of four
  virtual channels all through a single output
  port
- Fix serdes programming comments

Bug 4032165
Bug 3753423
JEC-286

Change-Id: I7b4e929e9f5330cc6eb0aa72646ce429a713df7a
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3072829
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-08 22:54:15 -08:00
Praveen AC
d7f14a85db t23x:P3762: Fix failed to read 2nd Hawk EEPROM serial number.
Changed EEPROM address to 0x15 for 2nd Hawks EEPROM
to avoid fail to read serial number.

Bug 4244937

Change-Id: Ia920ec6464b5bc374289728395da2bceb3f44d39
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3066257
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Praveen AC <pac@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
rel-36_eng_2024-02-05
2024-02-01 22:39:36 -08:00
Jon Hunter
05b82fc2fe nvhost: Remove legacy NVHOST support
Remove the legacy NVHOST support from the nvhost.h file that is no
longer needed. Eventually we will remove this file completely, but it is
currently still needed as it provides a shim layer for working with the
upstream host1x driver.

Bug 4475969

Change-Id: Id4d97b41de2590800e321e4eeb9c03b434e00dc5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3065976
(cherry picked from commit 5d2c7b6e3a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3066026
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-01 10:44:27 -08:00
Jon Hunter
b2e0445c73 video: tegra: Remove nvhost and host1x headers
The nvhost.h header in the ISP and VI drivers is a copy of the nvhost.h
header in the main top-level include directory. Remove these and use the
version in the top-level include directory.

Finally, remove the host1x.h header file that is not used at all.

Bug 4475969

Change-Id: I78133231203ee7eb2dc41eee7b8895ba9ce50e02
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3065975
(cherry picked from commit 4c229ee929)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3066025
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-01 10:44:22 -08:00
Jon Hunter
34ef06bd12 video: tegra: Don't use nvhost_get_private_data
The function nvhost_get_private_data() is a wrapper around the Linux
platform_get_drvdata() function. To remove all the legacy nvhost code
that is no longer supported or needed, update the camera drivers to use
platform_get_drvdata() directly. Note that there are places in these
drivers that already use platform_get_drvdata() and so this change makes
these drivers more consistent.

Bug 4475969

Change-Id: Ie474c46c438f69c2141f41d0702bf57525597ab5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3065974
(cherry picked from commit 73a4985dbd)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3066024
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-01 10:44:16 -08:00
Jon Hunter
7f293be0be media: camera: Remove of_pwm_n_cells usage
The 'of_pwm_n_cells' has been removed from the pwm_chip structure in the
latest linux-next development branch that will eventually become Linux
v6.9. This parameter was used in function 'of_pwm_xlate_with_flags'.
The camera CDI and ISC drivers don't use the kernel's
of_pwm_xlate_with_flags xlate function and instead implement their own
xlate function. Therefore, it is safe to simply drop the usage of the
'of_pwm_n_cells' parameter completely in these drivers.

Bug 4471899

Change-Id: Id4cf4b7ac182d0654080e536457bab1a7128ad1d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3063806
(cherry picked from commit 072a881099)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3067933
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-01 08:24:16 -08:00