Commit Graph

3155 Commits

Author SHA1 Message Date
Jon Hunter
85be13c709 net: nvethernet: Fix build for Linux v6.11
In Linux v6.11, the structure 'kernel_ethtool_ts_info' was added as a
copy of the existing 'ethtool_ts_info' for the kernel and the various
kernel functions were updated to use the new structure. This broke the
build for the nvethernet driver, so add a test to the conftest script to
detect the presence of this new strucutue and update the nvethernet
driver accordingly.

Bug 4749580

Change-Id: I2c5daa0132edee8c98eec3a66e19144484325ab0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176868
(cherry picked from commit 9d6283ca4f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3178809
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2024-07-22 02:26:53 -07:00
Jon Hunter
913e17563b media: camera: Use of_pwm_xlate_with_flags()
In Linux v6.11, commit d6f66e292676 ("pwm: Make pwm_request_from_chip()
private to the core") made the function pwm_request_from_chip() a
private function to the PWM core driver. This function is used by both
the CDI and ISC camera drivers and so these driver no longer build
against Linux v6.11.

Fix this by updating the CDI and ISC drivers to use the function
of_pwm_xlate_with_flags() which has been supported since Linux v3.8.
This function internally calls pwm_request_from_chip() and configures
the pwm->args.period parameter and is therefore, equivalent to the
existing code.

Bug 4749580

Change-Id: Id1381ebc08730aaaa6c3591d90bcc4cc95a6c235
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176063
(cherry picked from commit f308807197)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3178155
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-07-19 09:09:06 -07:00
snchen
f2d3ec994c camera: add SBGGR12 color format
Add SBGGR12 color format to support bayer bggr12

bug 4575548

Change-Id: Ic59b6bc33e67da7f94e2a6805a18971423036e74
Signed-off-by: snchen <snchen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3173804
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Amit Purwar <apurwar@nvidia.com>
Reviewed-by: Jerry Chang <jerchang@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
rel-36_eng_2024-07-08
2024-07-16 04:40:16 -07:00
snchen
20374db85d vi5: camera: add ovrride capture timeout control
add CID to override the capture timeout.

bug 4737219

Change-Id: I6df8e760ce8051054ba34a8b85b00bb237f9cd98
Signed-off-by: snchen <snchen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3173821
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: Jerry Chang <jerchang@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-07-15 01:09:31 -07:00
Jason Mei
bd0a8befee nvethernet:Fix cbb error when ifconfig down
Issue:  CBB bus error when running ifconfig down
	on the nvethernet interface.

Fix:    All MDIO interfaces must be disabled
	before resetting the MAC. The MDIO was
	accessed by the MAC.

Bug 4714627

Change-Id: Ib75cfae70b13093cc574cd0cd07334cc03468ad7
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3165268
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-12 16:24:19 -07:00
Jon Hunter
118cd4e0a6 media: camera: Fix crash in sensor drivers
When CONFIG_V4L2_ASYNC is not enabled and CONFIG_DEBUG_LIST is enabled
then the following kernel panic is observed ...

 imx219: probe of 9-0010 failed with error -524
 list_add corruption. next->prev should be prev (ffffb2b2e95dad78),
  but was 0000000000000000. (next=ffff000088baf508).
 ------------[ cut here ]------------
 kernel BUG at lib/list_debug.c:23!
 Internal error: Oops - BUG: 00000000f2000800 [#1] SMP

If CONFIG_V4L2_ASYNC is not enabled in the kernel, then the function
tegracam_v4l2subdev_register() will return -ENOTSUPP and this will cause
the probe of the sensor drivers to fail. Although failing to probe the
driver is expected in this case, it is not expected that this will
trigger a kernel panic if CONFIG_DEBUG_LIST is enabled. The panic is
caused because tegracam_device_unregister() is not being called in the
exit path of the probe function when tegracam_v4l2subdev_register()
returns an error.

Bug 4704110

Change-Id: I4875a31e55c24b5ab0932a683f16a7a74695a6b6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3162389
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2024-07-11 09:08:59 -07:00
Laxman Dewangan
87c78ad125 pci: Port pci-epf-tegra-vnet to support 5.14.0
Most of the code in the file pci-epf-tegra-vnet.c is written
to support the linux kernel version 5.14.x (x != 0), all minor
version above 0.
Make the condition of linux version check such that 5.14.0 is
also part of 5.14.x i.e. (5.14).

Jira HOSTX-5375

Change-Id: Ib3d7ca619497761b8bc77796c9fe0f59c2ab9cf8
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166767
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3172802
Reviewed-by: Jason Mei <jianjunm@nvidia.com>
Tested-by: Jason Mei <jianjunm@nvidia.com>
2024-07-10 23:54:26 -07:00
Jon Hunter
408ef72fb9 net: realtek: Add option to disable drivers
The RealTek drivers do not build against all Linux distributions because
some Linux distributions have back-ported upstream changes and so the
KERNEL_VERSION checks in the driver do not work for these distributions.

Add compilation flags for these drivers so that we can skip the building
of these drivers for certain Linux distributions.

Please note that the RealTek drivers build fine against Linux v5.14 and
so we should not prevent these driver being built against all Linux
v5.14 kernels.

Bug 4729493

Change-Id: I004d61a884c6f01b4629de56ecc17b55d4fa2cd1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3171274
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-09 04:39:09 -07:00
Jon Hunter
537492a880 trace: Fix build for Linux v6.10
In Linux v6.10, the __assign_str() macro was updated to remove the 2nd
argument. Add a test to the conftest script to detect this and update
the various trace header files as necessary.

Bug 4593750

Change-Id: I495e78658249baa84cca5b864f4e172c1f3f0838
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3152310
(cherry picked from commit 083d7038d1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3170281
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-08 17:54:00 -07:00
Revanth Kumar Uppala
d99dede530 bt: realtek: Fix potential buffer overflow in cfg_list_item struct
The `cfg_list_item` struct previously defined the `data` array with a zero-length,
which can lead to buffer overflow issues detected by the `fortify_memcpy_chk` function.
So change the zero-length array to a flexible array length.

Bug 4701669

Change-Id: I3c4575efbab681fa8b6039793c410b23c4179106
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3159595
(cherry picked from commit 6f80c397ed)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166006
Tested-by: Jon Hunter <jonathanh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2024-07-02 06:39:24 -07:00
Laxman Dewangan
df9e50c808 rtcpu: Port IVC bus driver to use iosys-map utils
The IVC driver in core kernel has been changed to accept
VADDR via iosys_map structure. Use the proper iosys map
utils to pass address when doing the tegra_ivc_init().

Bug 4346767

Change-Id: I416f6fbbea7605da9ae729e2076d10fb6360525d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3039534
(cherry picked from commit 0679fc19d6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3161024
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Paritosh Dixit <paritoshd@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
rel-36_eng_2024-06-26
2024-06-27 04:24:04 -07:00
Revanth Kumar Uppala
a1658e5ab7 r8126: Enable support for RSS
Enable support for Receive Side Scaling (RSS)
in Makefile

Bug 4478230

Change-Id: Iafb026ba3b9b152ea7e44933562093144bfcf062
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3159352
(cherry picked from commit ee37ee732d)
Reviewed-by: Sandipan Patra <spatra@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3159475
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-19 08:39:01 -07:00
Revanth Kumar Uppala
523d81ebd5 ethernet: Add dummy driver for r8126
r8126 driver build is disabled on K6.10 and later. This is
causing the packaging failure where module is not available.

Add dummy driver when real driver is not available to make
packaging success.

Bug 4478230

Change-Id: I6ceef7f92863499c58edaf4ddd19ae65b12a2a00
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158781
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-19 01:12:49 -07:00
Revanth Kumar Uppala
cb5d91e562 r8126: Add r8126 driver version 10.013.00-NAPI-PTP
Add support for r8126 ethernet driverversion 10.013.00-NAPI-PTP
which adds support for PTP and supports till K6.9

Bug 4478230

Change-Id: I381d3689a188e5d365ff89092a98023eeaa2a095
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158780
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2024-06-19 01:12:44 -07:00
Revanth Kumar Uppala
36b50b7f27 ethernet: Add dummy driver for r8126
r8126 driver build is disabled on K6.9 and later. This is
causing the packaging failure where module is not available.

Add dummy driver when real driver is not available to make
packaging success.

Bug 4478230

Change-Id: I1b83fe1c3f30a9f825631650ca2520d720ef07c6
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3144344
(cherry picked from commit 4c39ed9cb5)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158779
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-19 01:12:39 -07:00
Revanth Kumar Uppala
98c8d2f1ab r8126: Change file permissions of source files
Remove executable permissions for source files

Bug 4478230

Change-Id: I2bf56e5abac7da957890ac73b7fd00656c8b7063
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3139856
(cherry picked from commit a1c548df68)
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158766
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-19 01:12:34 -07:00
Revanth Kumar Uppala
eb9eb329cb r8126: Add r8126 driver version 10.013.00
Add support for r8126 ethernet driverversion 10.013.00 which supports
till K6.4

Bug 4478230

Change-Id: I1fdac264355ca639d992825fd6e0404d9d075272
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3095406
(cherry picked from commit 33839a5be8)
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158765
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-19 01:12:29 -07:00
Laxman Dewangan
f65ba6483d ethernet: Add dummy driver for r8168
r8168 driver build is disabled on K6.9 and later. This is
causing the packaging failure where module is not available.

Add dummy driver when real driver is not available to make
packaging success.

bug 4628651

Change-Id: I8ade511488fab856f63e84c1ee51986286b2fa2d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3138401
(cherry picked from commit 316baa6776)
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158764
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-19 01:12:24 -07:00
Jason Mei
e2bb52def5 PCI: EPF: tvnet: disable the edma interrupt
1. Disable the corresponding PCIe EP controller
   EDMA interrupt.
2. Disable IP checksum to improve performance
   since the PCIe link is reliable.
3. DMA unmap matches the map size.
4. Adjust the SKB buffer link list handle.

Bug 4704944

Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Change-Id: I05f76fa60e3533c2dd01e53ed17664d6898fcffd
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158126
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2024-06-18 22:39:00 -07:00
Revanth Kumar Uppala
f870a5f9fc nvethernet: macsec: Add module param for macsec.
Add module parameter to enable/disable macsec.

By default macsec will be enabled and it can be disabled
with help of module parameter "macsec_enable"

Bug 4640382

Change-Id: I3b6ffde52a73760cd65f02abe472c3133996b698
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3156387
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2024-06-17 03:57:32 -07:00
Mikko Perttunen
490c984662 gpu: host1x: Handle CDMA wraparound when debug printing
During channel debug information dump, when printing CDMA
opcodes, the circular nature of the CDMA pushbuffer wasn't being
taken into account, sometimes accessing past the end. Change
the printing to take this into account.

Bug 4398831
Bug 4386806

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I3a24da2c310e9414882f7cabbbda5158b6da00a2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3033461
(cherry picked from commit 58568987a6e9733e3113b927c6fce454778b3a4d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3155731
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
2024-06-12 21:24:07 -07:00
Revanth Kumar Uppala
928bbd8792 r8168: Replace kernel version checks with conftest
Use conftest instead of version checks for api changes
across the kernels.

Bug 4471899

Change-Id: Ia0750eb8e4d634c0a6ed71b6eb64857cddaf467f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3134835
(cherry picked from commit dd4ca5aab9)
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3147967
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-12 01:09:46 -07:00
Revanth Kumar Uppala
954d58f2bc r8168: Disable 10M EEE
- This disables 10M EEE for r8168 driver

Bug 4205197
Bug 4652606

Change-Id: I804b0d53460d19d8ed0b692b7327210634e2a111
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123376
(cherry picked from commit 6b62a514a3)
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3147912
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-12 01:09:41 -07:00
Revanth Kumar Uppala
91baac051e r8168: Fix -20C 10mbps failure in Mods test
Issue:
Ethernet mplan stability tests at -20C for 10Mbps fails with rate 15%
Basically the GPHY 10M power saving includes the below parameters,
clock speed down, pll off and reference voltage off.
During debugging it was found that enable/disable pll circuit
frequently when in 10M low data traffic (such as idle mode) may have
a corner case and plays a part in this issue repro.

Fix:
So plloff saving function should be disable (do not have to open it) for nvidia -20C mplan test case.

Bug 3946623
Bug 4652606

Change-Id: Ifabe9e26e840537520d66acca106b37d3c285722
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123359
(cherry picked from commit 20dbe0996b)
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3147911
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-12 01:09:36 -07:00
Revanth Kumar Uppala
6d4ef6154e r8168: Change file permissions of source files
Remove executable permissions for source files

Bug 4471899
Bug 4652606

Change-Id: I4d259b03014a8853b9baf0d04265ad521fefddb9
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123346
(cherry picked from commit ae13276f5d)
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3147910
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-12 01:09:31 -07:00
Revanth Kumar Uppala
4643e350da r8168: update driver to 8.053.00
- Update realtek r8168 driver version to 8.053.00
- This update adds support till K6.8

Bug 4471899
Bug 4652606

Change-Id: I77734753b8ad9ca108afccda609d29ea73c848f5
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123343
(cherry picked from commit 7086a36e68)
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3147909
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-12 01:09:26 -07:00
Jon Hunter
b4cc53aa67 media: camera: Add missing conftest.h
The camera VI driver was recently updated to fix the build for Linux
v6.10, but the change that fixed the build did not add the 'conftest.h'
header file which is needed. Add this header file to fix building the
driver for Linux v6.10.

Bug 4593750

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I11fdab89a1cb69552fbafbf4b4358561b71cac13
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3150516
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
rel-36_eng_2024-06-13
2024-06-04 09:39:29 -07:00
Jon Hunter
9cb00122ac media: i2c: Fix build for Linux v6.1+
The IMX390 driver was recently updated and this broke building the
driver for Linux v6.1+ kernels. Revert the specific changes that broke
the build and update the max929x driver so that it can also be built for
Linux v6.1+ kernels.

Finally, replace 'gpio_cansleep' with 'gpiod_cansleep' because
'gpio_cansleep' was removed in Linux v6.5. This also aligns with the
other camera drivers that use 'gpiod_cansleep' instead of
gpio_cansleep'.

Bug 4505240

Change-Id: I46960bca1e1e4aeff9bd9fdaed8b2db2be104b5b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3149880
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-04 07:24:28 -07:00
Ankur Pawar
adc35280cb media: i2c: enable IMX390 WDR mode
Enable WDR(wide dynamic range) mode for IMX390.
The following modification and addition are done:
1 Add WDR mode table
2 Restructure IMX390 driver for WDR gain and framerate
3 Use common driver to configure serializer(max9295) and
  deserializer(max9296)

Bug 4505240

Change-Id: I52fc3f03a66fe4e2446d7b41f409ed4154c42f02
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3105249
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
2024-05-30 05:39:35 -07:00
spatki
517660e465 tegra: tsec: port init_comms property to oot tree
This change ports the init_comms property handling to oot version
of the tsec driver.

Bug 4669447

Change-Id: Ifa0468dfbbd16b362622f50e49f4fbd076454c48
Signed-off-by: spatki <spatki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3144129
Reviewed-by: Nikesh Oswal <noswal@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-30 01:13:15 -07:00
Nikesh Oswal
09b7b63ec4 video: tsec: Set tsec state before power_on/off
Set s_tsec_state before calling tsec_plat_poweron
as it enables irq and can context switch to the irq
handler which needs s_tsec_state set appropriately

Bug 4437491

Change-Id: I1f48713329b9315376fe926d1e8b33686d05d035
Signed-off-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3145973
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-30 01:13:10 -07:00
Nikesh Oswal
fa9c7418dc video: tsec: add support to reboot tsec fw with context
Add support to shutdown tsec firmware by saving the context info
first so that same can be used when rebooting the firmware.

Also use the DO_IPC_OVER_GSC_CO flag only to decide if commands and
messages are sent over GSC_CO or EMEM. Larger buffers will still be
allocated in GSC_CO and pointers to it can be embedded in commands
and messages.

https://confluence.nvidia.com/display/PSS/Reboot+HDCP2X+FW+with+Context+Information

Bug 4437491

Change-Id: Ibeebe98a30db04f1b4b1a28c06ba359ff3a8d85d
Signed-off-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3117020
Reviewed-by: Byungkuk Seo <bseo@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3145972
2024-05-30 01:13:05 -07:00
Jon Hunter
cb70a7e245 net: nvethernet: Fix support for Linux v6.9
When nvethernet was updated to support Linux v6.9 kernels, the code that
checks if the variable 'eee_req->advertised' is zero or non-zero was not
updated correctly. For Linux v6.9, the variable 'eee_req->advertised' is
a bitmask and so cannot be checked directly to see if it is zero or
non-zero. Building the nvethernet driver with the flag '-Werror=address'
exposed this issue. Fix this by using the 'linkmode_empty()' function to
determine if 'eee_req->advertised' is zero or non-zero for Linux v6.9
kernels.

Bug 4471899
Bug 4662166

Change-Id: Id4080d62006226648cd398dc8652578c74dd8158
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3146810
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-05-29 09:24:33 -07:00
Praveen AC
716ec492d8 cam_cdi_tsc: Fix Fsync IOCTL fail sometimes
Make sure tsc is stopped during device close, when the app
is failed to send stop IOCTL for tsc generator.Hence, it avoids
inconsistency in starting the External Fsync trigger.

Bug 4220418

Change-Id: I13286d42a62c85cb52e0d1eabf714865e8fe6956
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3129384
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2024-05-24 09:54:30 -07:00
Jon Hunter
5e0562c90d media: virtual-i2c-mux: Fix build for Linux v6.10
In Linux v6.10, the 'class' argument was removed from the
i2c_mux_add_adapter() function. Add a test to conftest to detect the
correct number of arguments for i2c_mux_add_adapter() and update the
virtual-i2c-mux driver accordingly to fix the build for Linux v6.10.

Bug 4593750

Change-Id: I7333a511b487b7c2f2fa0ce7c34f2df5f061fbe4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142398
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-24 07:40:09 -07:00
Jon Hunter
1b72d87cce media: camera: Fix build for Linux v6.10
In Linux v6.10, a pointer to a dynamically allocated 'struct device'
was replaced with a statically allocated 'struct device' in the
'pwm_chip' structure. Update the Tegra camera drivers accordingly to fix
the build for Linux v6.10.

Bug 4593750

Change-Id: I05e15e2a63383ab2f96be6c20e81705de9581869
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123220
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-05-24 07:39:58 -07:00
Jon Hunter
0104837e60 pwm: tachometer: Fix build for Linux v6.10
In Linux v6.10, a pointer to a dynamically allocated 'struct device'
was replaced with a statically allocated 'struct device' in the
'pwm_chip' structure. Update the Tegra PWM Tachometer driver accordingly
to fix the build for Linux v6.10.

Bug 4593750

Change-Id: I9d629746290282b5c1858f8308128d94ff155c49
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123219
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-05-24 07:39:53 -07:00
Jon Hunter
39e07fb02b block: virtual-storage: Allow build for Linux v6.10
The function blk_queue_max_hw_sectors() was removed in Linux v6.10 and
so add a test to conftest to see if this function is present or not to
allow the driver to build. The virtual-storage driver is currently
broken for Linux v5.19+ kernel due to other incompatibilities with these
newer kernels, but has been updated so that it still builds. Therefore,
allow the driver to build for Linux v6.10 while the driver is fixed
properly for these newer kernels.

Bug 4311184
Bug 4593750

Change-Id: Ic4054c87acdf3c77f03ff94fbdde513d84fe229b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142216
(cherry picked from commit c73cf3c92a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142204
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-23 04:11:55 -07:00
Jon Hunter
67b36c62c3 conftest: Fix tests for Linux v6.10
Some of the conftest tests are no longer working with the mainline
kernel and this is causing various build failures for drivers. Upstream
commit a3b00f10da80 ("objpool: enable inlining objpool_push() and
objpool_pop() operations") inlined some code that causes build error to
occur when the tests are built with 'Werror=address-of-packed-member'.

Upstream commit 6f303d60534c ("gcc-9: silence 'address-of-packed-member'
warning") disables the option 'address-of-packed-member' for the kernel
already and so fix these new build failures by disabling this option
for the conftest tests.

Bug 4593750

Change-Id: I37af97079bb7734fcd5bf10384b1afc071613594
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142214
(cherry picked from commit 1a635bb0ea)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142203
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-23 04:11:44 -07:00
Jon Hunter
57d240e007 nv-virtio-poc: Add missing header
In Linux v6.10 the nv-virtio-poc driver fails to build and the following
error is seen ...

 drivers/nv-virtio/nv-virtio-console-poc.c:277:13:
  error: implicit declaration of function 'remap_pfn_range';
  did you mean 'vmap_page_range'? [-Werror=implicit-function-declaration]
  277 |         if (remap_pfn_range(vma, vma->vm_start, ipa_pfn,
      |             ^~~~~~~~~~~~~~~
      |             vmap_page_range

Upstream commit 22bcc915ae91 ("kfifo: don't use "proxy" headers")
updated some kernel headers to only 'include what is used' and exposed
that the nv-virtio-poc driver is not explicitly including 'linux/mm.h'.
The function remap_pfn_range() has been defined in 'linux/mm.h' since
Linux v2.6 and so fix this by always including 'linux/mm.h'.

Bug 4593750

Change-Id: Ic43b22ca51bbc16e2085d146d28e40c21206ae2f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142213
(cherry picked from commit ef52cefdda)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142202
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-23 04:11:33 -07:00
Jon Hunter
d259181558 media: camera: Fix v4l2-subdev for Linux v6.10
In Linux v6.10, the v4l2-subdev callbacks 'g_dv_timings' and
's_dv_timings' were moved from the v4l2_subdev_video_ops structure to
the v4l2_subdev_pad_ops structure. Fix the build for Linux v6.10 by
using conftest to determine which structure is used for these callbacks.

Bug 4593750

Change-Id: Ic54e88da22ed7d1da9b6026a45b9c4307637c7b4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142215
(cherry picked from commit 6255ffef44)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123222
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-23 04:11:18 -07:00
Jon Hunter
70cf7e08f3 drivers: Fix missing vmalloc.h for Linux v6.10
Upstream commit 690da22dbfa8 ("asm-generic/io.h: kill vmalloc.h
dependency") removed the vmalloc.h header file from io.h and this breaks
building various drivers with the latest -next kernels. Fix this
by ensuring vmalloc.h is included and in most cases slab is not actually
needed and so remove this where possible. Note that it is fine to make
this change for all current supported kernels.

Bug 4593750

Change-Id: I003d1302bda226d356467e6ede99949b2716940a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141984
(cherry picked from commit cb8b9f5a53)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123218
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-23 04:11:13 -07:00
Shubhi Garg
f902d95962 drivers: mttcan: fix bus-off restart txfer
[Issue]: CAN freezes/stops to send messages after restart from bus-off state.
Throws following log from kernel: "write: No buffer space available"

[Reason]: When message txfer starts, tx_object (which keeps track of active tx)
gets filled. If CAN goes to bus-off state, txfer remains incomplete for some
messages. In such case, tx_object bits will not get cleared. It will stop
adding more messages in controller RAM.

Along with tx_object, from network layer, there are socket echo buffers.
When CAN is initialized and up on network, netif_start_queue is pushed to start
transmission. When msg txfer starts, socket buffer gets filled and freed only
when txfer completes. During bus-off, since network queue remains ON, all the
queued msgs get filled in socket buffers and does not allow upcoming msgs.
Therefore we see "write: No buffer space available".

[Fix]: Clear tx_object when device goes to bus-off state and stop network queue.
Start network queue again during restart from bus-off.

Bug 4438223

Change-Id: I3cbc6529a90f357372c8b0095bdce4217b133e9b
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142091
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2024-05-23 01:54:36 -07:00
Jon Hunter
d95c0d0add thermal: Fix build for Linux v6.10
In Linux v6.10, commit b1ae92dcfa8e ("thermal: core: Make struct
thermal_zone_device definition internal") made the structure
'thermal_zone_device' internal and so the 'devdata' member is no longer
directly accessible. The function thermal_zone_device_priv() was added
in Linux v6.4 for retrieving the 'devdata' and so update the various
thermal drivers to use this function if present.

Bug 4593750

Change-Id: Ic53de9bbd5459c99a3ac26759aa8a966cd775fe5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123221
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-20 07:39:53 -07:00
Praveen AC
32ed59d81b camera:driver: Fix the race condition of setting bypass mode.
Add the check to see if the device is already in use or not,
while calling s_ctrl by multiple user apps on the same video node.

Here ,The "vb2_is_busy" function checks if the queue represented
by the vb2_queue instance is busy by checking if there are any
buffers in the active queue.If there are any buffers in the active queue,
it means that they are currently being processed by the device driver,
and the queue is considered busy.

Bug 3836336

Change-Id: I3d9b215f953c44d55cbbc287fe94c9b793da5955
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2856359
Tested-by: Jerry Chang <jerchang@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Jerry Chang <jerchang@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3130744
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
2024-05-08 20:54:46 -07:00
Praveen AC
664ca6964c t23x:tpg:[WAR] Disable gain control to avoid insmod fail.
Disable gain control during tpg probe for t23x to avoid
insmod fail due to "NULL VI channel" when "tpg_gain_ctrl"
is enabled.

Bug 3695458

Change-Id: I15c035eaa2f187b927dc114e88959378f9e52a61
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2828420
Reviewed-by: Nithin Varghese <nvarghese@nvidia.com>
Reviewed-by: Shashank Kumar (shaskumar) <shaskumar@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3130734
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
2024-05-08 20:54:41 -07:00
Jon Hunter
e9b64b08d1 net: nvethernet: Drop adjfreq support
The 'adjfine' method was first introduced in Linux v4.10 by commit
d8d263541913 ("ptp: Introduce a high resolution frequency adjustment
method.") and the 'adjfreq' method was finally removed in Linux v6.2.
Given that 'adjfine' has been supported since Linux v4.10, drop the
deprecated 'adjfreq' method completely to simplify the nvethernet
driver. This fixes build issues for 3rd party kernels that removed the
'adjfreq' method and are older than Linux v6.2.

Bug 3936429

Change-Id: I897bbd3ba92b11d8132c5762d2618b4e82ad44aa
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128119
(cherry picked from commit 46af0c1d24)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3129149
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-05-02 04:09:19 -07:00
Brad Griffis
b0e75c8874 pci: endpoint: use conftest for pci-epf-tegra-vnet.c
There are several build issues observed in pci-epf-tegra-vnet.c
when building against mainline.

These errors pertain to the following previous commits:

* Use conftest to find if pci_epc_event_ops struct has core_deinit.
* pci: Use conftest to find if probe of pci_epf_driver has ID arg
* misc: nvscic2c-pcie: Drop usage of enum pci_epc_irq_type from Linux 6.8

The pci-epf-tegra-vnet.c is recently added and needs to use those
same new conftest capabilities.

Bug 4346767

Change-Id: I4ea66524513cdc4d62607a061c3f253e2a3cee2b
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128608
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-05-01 09:56:19 -07:00
Jon Hunter
28f1253514 PCI: Fix endpoint DMA test for Linux v6.9
Building the PCI EPF DMA test driver for Linux v6.9 is failing because
the parameters for the pci_epf_alloc_space() function has been updated
to pass the alignment value via the 'pci_epc_features' structure instead
of passing the value directly.

Instead of hard-coding the endpoint alignment in the EPF DMA test driver
use the 'pcie_epc_get_features()' function to retrieve the endpoint
features structure which has the endpoint alignment.

By using the conftest script to detect the parameters for the
pci_epf_alloc_space() function, we can then pass the appropriate
arguments to the pci_epf_alloc_space() function.

Bug 4471899

Change-Id: Id80259a4c90d6f6ae2132cccbec1a96113d22be7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3116548
(cherry picked from commit 971680aadb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128431
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-05-01 09:56:14 -07:00
Laxman Dewangan
83238f4563 pci: Use conftest to find if pci_epc_event_ops struct has core_deinit
Use the conftest to find if the struct pci_epc_event_ops has
core_deinit as callback function. This callback is added
by Nvidia in core kernel.

Bug 4346767

Change-Id: I399197917ac7746ca367f55b9dc4e3a5bd79f073
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028740
(cherry picked from commit 1e9fc00bc2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128430
Tested-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-05-01 09:56:09 -07:00