Commit Graph

4335 Commits

Author SHA1 Message Date
sitalluri
121870b4aa misc: mods: Add support for AON invocation
- Enable MODS kernel driver ADSP APIs
- Updated CONFIG_TEGRA_NVADSP to MODS_HAS_TEGRA
- get_handle call is invoked for each API
      - To avoid regression on parallel WAT testing
- Fork nvidia-oot from nvidia-kernel
      - Firmware APIs do not support 5.1 version.
- Updating the same IOCTLs as its being used by AON and ADSP tests.

Bug 4149877

Change-Id: I0063f6610c078395ce9ce3f348bbab360e7dc676
Signed-off-by: sitalluri <sitalluri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3057290
Reviewed-by: Kuan Luo <kluo@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: John Lu <johlu@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: John Lu <johlu@nvidia.com>
2024-07-30 08:51:55 -07:00
Jon Hunter
6e9c85dd91 conftest: Fix PCI EPC has core_init_notifier
The conftest test for detecting if the structure 'pci_epc_features' has
the member 'core_init_notifier' is not working as expected because it is
a bit field in the structure. Re-work the conftest test to fix this.

Bug 4593750
Bug 4748899

Change-Id: Ib93e4ae869c6a28922c0feed28ce90912371ff66
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3181508
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-28 21:57:40 -07:00
Matti Ryttylainen
8bb21ea435 Camera: Add task_fence events for VI/ISP
Nsight needs task_fence events from camera engines.
Add task_fence event traces to be emitted during ISP task begin/end
and during VI frame end.

Jira CAMERASW-24223

Change-Id: Ia44baf73777f30abc823459f5e7dfd4d495d3ca6
Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141174
(cherry picked from commit ad0f0cba98173bbf055f5e69ebf175d9daf1ac3b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3181495
Reviewed-by: Sampatlal Arjunram Jangid <sjangid@nvidia.com>
Tested-by: Devang Kubavat <dkubavat@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Pushpesh Pranjal <ppranjal@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
2024-07-28 21:57:31 -07:00
Jon Hunter
f327656ea3 nvmap: Implement nvmap_page_mapcount()
Upstream commit cdd9a571b7d8 ("fs/proc: move page_mapcount() to
fs/proc/internal.h") made page_mapcount() an internal function for Linux
v6.11. This function is used by the NVMAP driver and so implement this
function in the NVMAP driver directly instead. Note that newer kernels
implement folio_entire_mapcount() for compound page counts where as
older kernels use compound_mapcount(). Use conftest to detect which of
these functions is present in the kernel.

Bug 4749580

Change-Id: I6504448727d6b3e9f2caa8581a66aad464ae2426
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3180097
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-28 21:44:06 -07:00
Sheetal Tigadoli
d71b21ebb9 drivers:nvpps: clear TSC CAPTURE interrupt enable bit
Clear INTR_EN bit from TSC_CAPTURE_CONFIGURATION_PTX
register as part of PTP TSC sync initialization sequence
as nvpps does not use capture interrupts for PTP-TSC
functioning.

Bug 4640129

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: I9f374d8cde49cabcbc57e9edaf92031c07b6ada1
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3177373
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vijay Mishra <vijaym@nvidia.com>
2024-07-28 21:41:19 -07:00
Prashant Parihar
a21f30c983 nvvse: Add SM4 implementation
- Add VSE driver and crypto driver changes for SM4
CBC/CTR functionality
- Utilize existing function for AES CBC/CTR for SM4

Jira ESSS-1409

Change-Id: Ifaab10dd81c33b047554c28a37c399a3cb0d3419
Signed-off-by: Prashant Parihar <pparihar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3143320
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2024-07-28 12:47:58 -07:00
jianjunm
20c43e79ff host1x-fence:Free the kzalloc mem
Issue: ioctl call host1x-fence cause memory leak
The kmemleak log shows:
  unreferenced object 0xffff0001ac305500 (size 128):
  comm "deepstream-test", pid 4370, jiffies 4295045195 (age 133.220s)
  hex dump (first 32 bytes):
    00 01 00 00 00 00 ad de 22 01 00 00 00 00 ad de  ........".......
    28 aa 67 bf 00 00 ff ff 00 7c ed 1f 01 00 ff ff  (.g......|......
  backtrace:
    [<000000000d2d94dc>] kmem_cache_alloc_trace+0x2bc/0x3d0
    [<000000006a957993>] dev_file_ioctl+0x588/0x86c [host1x_fence]
    [<000000003528f698>] __arm64_sys_ioctl+0xb4/0x100
    [<00000000d39dabe0>] invoke_syscall+0x5c/0x130
    [<00000000aee791e3>] el0_svc_common.constprop.0+0x64/0x110
    [<0000000050bcd11c>] do_el0_svc+0x74/0xa0
    [<00000000530f0cc4>] el0_svc+0x28/0x80
    [<00000000b6d076a3>] el0t_64_sync_handler+0xa4/0x130
    [<000000008943bb27>] el0t_64_sync+0x1a4/0x1a8

Fix: release the kzalloc memory after finish using

Bug 4738188

Change-Id: Ifeb316a2a52432f0199ad22d3de277b123acda24
Signed-off-by: jianjunm <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3175899
(cherry picked from commit 84de937501)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3181288
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2024-07-27 07:54:53 -07:00
Viswanath L
e0de45f88a nvadsp: Pass CPU freq to firmware via HWMBOX
Pass CPU freq, read from clock property "cpu_clock", to
firmware via HWMOX set in adsp_cpu_freq_hwmbox field.

Bug 4678940

Change-Id: Iebebb0cade69c8686b5d17b65a3405783fb5690e
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3180569
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Asha T <atalambedu@nvidia.com>
2024-07-25 14:05:47 -07:00
Viswanath L
13814dc9f7 nvadsp: Set shared_mem_hwmbox in resume flow
Platforms that implement suspend-resume as clean firmware
restart need to latch the shared mem address in every
suspend-resume cycle, but mbox value may be lost due to
module reset, so ensure that shared_mem_hwmbox is written
unconditionally in os_start flow.

Bug 3916054

Change-Id: I649d70871401475d66e0e50abeeaf4c347040119
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3180285
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Asha T <atalambedu@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
2024-07-25 14:05:44 -07:00
Bitan Biswas
cba663d0db crypto: fix crypto_engine_ctx build error
struct crypto_engine_ctx removed in k6.6 hence use
conftest helper based macro to select updated data types

Bug 4346767

Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Change-Id: Iaf565c4ef74fdd87ea0020b369bc3d882d32326e
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176823
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-07-25 06:13:35 -07:00
Akhil R
abb0a027b2 crypto: tegra: Align with upstream
Fix the known bugs in the SE driver and align the driver with upstream
add Makefile flags so it will build SE driver for v6.1 or less

Bug 4488964

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I6efa471b6efcd161d36167a0784185f3e0266d7c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3124250
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-25 06:13:31 -07:00
Ashish Mhetre
37e1ae733d video: tegra: nvmap: Export VPR device only if VPR is enabled
Bug 4731544

Change-Id: I095d0a6f87c63a65ba586fd6fcfdfef9dafc1d04
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3171188
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Tested-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-21 03:25:37 -07:00
Jon Hunter
9d6283ca4f 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
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2024-07-19 03:13:55 -07:00
Liang Cheng
a6d19ed508 psc: fix the spurous interrupt
ccplex side sees two interrupts. The first one is handled
properly while the second one does not have bit MBOX_OUT_VAID
being set.

Fixing this by reading psc_ext_ctrl register after writing.

Bug 4741744

Change-Id: I22ac1619b7f88a96658c8d197f09daccf3bb40d8
Signed-off-by: Liang Cheng <licheng@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3174350
Reviewed-by: David Pu <dpu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-19 03:11:03 -07:00
Rakibul Hassan
7cba06ad35 capture: Move VI syncpt funcs to host1x client
Change removed the vi-thi driver and moves the syncpt
creation function into VI host1x client driver.

Jira CT26X-1602

Change-Id: I7f1880f61aa89e650014870dba596d7e0db4c1b2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3165150
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Tested-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mika Liljeberg <mliljeberg@nvidia.com>
2024-07-19 03:08:04 -07:00
Praveen AC
8ba7c4a320 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
(cherry picked from commit 518ae94bb4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3073820
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2024-07-19 03:05:51 -07:00
Jon Hunter
f308807197 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
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-18 18:43:41 -07:00
Ashish Mhetre
acc19f5003 video: tegra: nvmap: Allow CPU read on VPR buffers
This patch allows CPU to read and mmap VPR buffers by restricting CPU
VPR read restrictions for pre-si platforms. The knob for controlling the
access is /sys/kernel/debug/nvmap/vpr/vpr_cpu_acces and by default VPR
CPU read is disallowed.
This change is necessary to support pre-si VPR validation for platforms
where there may not be a HW engine that supports CRC computation for VPR
buffers.

Bug 4670086

Change-Id: Ic0d575abbda3cdda10f075a2c7092ced09723333
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3145680
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2024-07-18 18:36:07 -07:00
Jason Mei
6fea0b4122 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
(cherry picked from commit bd0a8befee)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3174678
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2024-07-17 06:27:03 -07:00
Vincent Chung
3b2ffad838 drivers: tegra: cam_fsync: add high precision support
Update the cam_fsync (TSC edge generation) driver to support
1us prevision

Bug 4704962

Change-Id: I88782acef36101acb57603a3f52b79306a9bc27b
Signed-off-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3170858
(cherry picked from commit 5c82b64311078feaad42923201020bac038679f4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3168172
Tested-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
Reviewed-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
2024-07-17 06:17:30 -07:00
Akihiro Mizusawa
1f825ee8cd oot: capture-isp: Add h2 surface
Add h2 surface pinning in the capture-isp driver.
Also add image_def_mr2 to capture descriptor.

Jira CT26X-1728
Bug 4716542

Change-Id: Ib1657e7cebb335e78fb4eed855a6dad309c397f7
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3164329
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2024-07-17 06:09:19 -07:00
Nagaraj P N
0b77774c92 vse: Add support for HMAC SHA Sign/Verify
Add support for both old and new chip

Jira ESSS-1336
Jira ESSS-1371

Change-Id: Ie4010bc7f3d8f3b71e3f49197c21911cd11a6dea
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3144907
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
2024-07-17 06:01:20 -07:00
Praveen AC
9cdefe40e0 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>
(cherry picked from commit 716ec492d8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141448
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-16 17:15:51 -07:00
Chinniah Poosapadi
cbc914d16d capture: Move ISP syncpt funcs to host1x client
Change removed the isp-thi driver and moves the syncpt
creation function into ISP host1x client driver.

Jira CT26X-1602

Change-Id: I1242fb198a06a1e6b037030ee2558142ff7a6ff6
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3164905
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-16 02:05:25 -07:00
Akihiro Mizusawa
1f2ef6588e video: tegra: add support for T264 isp
Move capture-isp-channel registration from host to
capture-isp driver.

Make tegra-capture-isp a separate driver module.

Implement support for T264.

Add isp_unit affinity to ISP_CAPTURE_SETUP ioctl.

CT26X-468
CT26X-469
CT26X-467
CT26X-466
CT26X-464
CT26X-465

Change-Id: If644d6aa0ad1b12d34457dc94249ed09f9f9f720
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3095788
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
2024-07-16 02:04:36 -07:00
Akihiro Mizusawa
c37b941d16 fusa-capture: create standalone capture-isp driver
This change converts the capture-isp driver to
independent module which can be probed. This is
needed as per 2nd ISP Design for associating ISP
processing channels with right ISP unit.

JIRA CT26X-462
Change-Id: I720714b5221833c7df5cd56febd213ea6db02c48
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3095787
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-07-16 02:04:32 -07:00
Jon Hunter
24acf38e0b 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
(cherry picked from commit 118cd4e0a6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3173737
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-14 05:22:05 -07:00
Pranjal Singh Mandloi
f95a7d53c4 NVVSE: GCM/GMAC Linux changes
Jira ESSS-1378

Change-Id: Ie47a432c73cc99ae209fb4b61dfc0acbe399aaff
Signed-off-by: Pranjal Singh Mandloi<pmandloi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3163800
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-13 21:37:56 -07:00
Nagarjuna Kristam
c0896b1af7 pci: epf: dma-test: Clear bar only for T23x
During EP deinit, BAR is cleared. However, For T26x, this notification
is triggered from stop() ops callback. Both stop and clear bar executes
on EPC mutex lock, resulting in deadlock.
Since during EP deinit all EP registers are cleared, clear_bar execution
is not needed.

Bug 4567932

Change-Id: I7b28a85a4da51bdaf5228b6462fb723758c46753
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3171420
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-13 12:45:34 -07:00
Jason Mei
b8d1d9a28e 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>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3164057
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2024-07-13 12:35:19 -07:00
Jon Hunter
d449f6cfd6 PCI: EPF: dma-test: Fix build for Linux v6.10
In Linux v6.10, the 'core_init_notifier' flag has been removed and
dw_pcie_ep_init_notify() is now called by the designware endpoint driver
so it is not necessary to call from the EPF DMA test driver. Add a test
to the conftest script to detect the presence of the
'core_init_notifier' flag and update the EPF DMA test driver as
necessary.

Bug 4593750

Change-Id: I1c3862df2c673fcb2d7c19ebbf5e7d1cbdefea1f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3152309
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-13 02:47:36 -07:00
Jon Hunter
27bc2f4757 media: camera: cdi-mgr: Fix crash freeing GPIOs
When booting Linux v6.10-rc5 on Tegra234 the CDI MGR driver was failing
to setup the GPIOs. If the driver fails to setup the GPIOs then we
expect the probe of the driver to fail. However, in this case when the
probe failed, it then crashed the kernel completely and the following
crash log was observed ...

 cdi-mgr sipl_devblk_3: cdi_mgr_configure_gpios Failed to allocate gpio
  desc
 cdi-mgr sipl_devblk_3: cdi_mgr_probe(): GPIO setup failed
 Unable to handle kernel NULL pointer dereference at virtual address
  0000000000000300
 ...
 Call trace:
  rt_spin_lock+0x24/0xa8
  devres_remove+0x38/0x174
  devres_release+0x1c/0x80
  devm_gpiod_put+0x24/0x4c
  cdi_delete_lst+0x18c/0x1200 [cdi_mgr]
  cdi_mgr_debugfs_init+0x608/0x11b0 [cdi_mgr]
  platform_probe+0x64/0xec
  really_probe+0xb8/0x284
  __driver_probe_device+0x74/0x12c
  driver_probe_device+0x38/0x114
  __driver_attach+0x74/0x13c
  bus_for_each_dev+0x74/0xf0
  driver_attach+0x20/0x30
  bus_add_driver+0xe4/0x20c
  driver_register+0x5c/0x130
  __platform_driver_register+0x24/0x34
  init_module+0x1c/0x1000 [cdi_mgr]
  do_one_initcall+0x44/0x2e8
  do_init_module+0x58/0x1f8
  load_module+0x1b94/0x1cf8
  init_module_from_file+0x84/0xc8
  __arm64_sys_finit_module+0x1b8/0x270
  invoke_syscall+0x40/0x11c
  el0_svc_common.constprop.0+0xc4/0xe4
  do_el0_svc+0x18/0x28
  el0_svc+0x30/0xe0
  el0t_64_sync_handler+0xc8/0xcc
  el0t_64_sync+0x16c/0x170
 Code: b9447420 d503201f 91006262 d2800000 (c8e07c41)
 ---[ end trace 0000000000000000]---

The problem is that the CDI MGR allocated the gpio descriptors by
calling the function devm_fwnode_gpiod_get_index(). This function
returns an ERR_PTR() on failure. When this does fail and cdi_mgr_del()
is called to clean-up, this does not check to see if the descriptor
IS_ERR(), but simply check if it is NULL or not, which is not correct.
Hence, we end up calling devm_gpiod_put() for an invalid descriptor and
the above crash is observed. Given that we are calling
devm_fwnode_gpiod_get_index() to allocate the descriptor, it is not
necessary to call devm_gpiod_put() at all, because the kernel will
automtically call this for us. Therefore, fix this by removing the call
to devm_gpiod_put() completely.

Please note that although this was caught with Linux v6.10-rc5, this is
applicable to all kernel versions.

Bug 4627271

Change-Id: I576a984ebaaeea590c5acea1b489284379832ae9
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3148004
Reviewed-by: Frank Chen <frankc@nvidia.com>
2024-07-12 22:38:49 -07:00
Manish Bhardwaj
5626a33be3 storage: update kernel version check
Support pstore client driver to store crash logs
in persistent storage device

JIRA ESLC-8017

Change-Id: I199e31f8ddf2f457326b98b5443daff67e60179a
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3168608
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Bhavesh Parekh <bparekh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-12 15:27:22 -07:00
Laxman Dewangan
5349b1398f ethernet: Disable realtek R8168 build for RHIVOS-1 kernel
Disabling build of Realtek R8168 for RHIVOS-1 kernel
as this is not required for RHIVOS-1.

Bug 4729493

Change-Id: Iee3af848b2ffd8b4cbe684ae2d37ec7191d69581
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3170563
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-11 15:54:50 -07:00
Jon Hunter
4f7910695a 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
(cherry picked from commit 408ef72fb9)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3152308
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-07-11 15:54:46 -07:00
Laxman Dewangan
d356293253 nvidia-oot: correct the kernel config path
The kernel and system type specific configuration files are
placed at config/*. Adjust the path accordingly in master
Makefile.

Jira HOSTX-5375

Change-Id: I0883473b81a1e9c84ab80840c3f04e23e6b81075
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3169511
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-09 03:16:16 -07:00
Nagaraj P N
e9f3b6f0aa vse: rng: allocate buffer in generate callback
Allocation within init function cannot be performed as the
context structure does not have the node_id info populated
yet by cryptodev which causes the DMA buffer to be allocated
for the wrong engine/SID.

ESSS-1402

Change-Id: I58435cbe381812dfa314d86e6e46ee1e7ff77d0d
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3167473
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-08 15:58:27 -07:00
Narayan Reddy
0bca2438be nvethernet:set clocks based on serdes speed
1) set eqos rx clock based on serdes speed
2) set mgbe app parent based on serdes speed

Bug 4713751

Change-Id: If776c84807f7aa0373e1106c218b60da51921e79
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166928
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2024-07-08 15:55:49 -07:00
Jon Hunter
083d7038d1 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
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-07 12:50:13 -07:00
Laxman Dewangan
4e62fd7ed9 nvidia-oot: Add rhivos-1 specific configuration file
Add redhat kernel rhivos-1 specific OOT configuration files to
configure the OOT driver build accordingly.

Currently, disabling realtek R8126 and Realtek RTL8822CE build.

Jira HOSTX-5375

Change-Id: Id33c19171e1f61c94d9e9a7b90324e86a7e17072
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3169502
2024-07-06 01:31:41 -07:00
Laxman Dewangan
02d32d24ba Makefile: Parse kernel name and system type get specific configurations
The OOT driver requires the kernel and system type specific configuration.
These configuration is set in OOT drivers itself by parsing the kernel name
and system type.
The configuration are done in config file which is included from makefile
based on kernel name and system type.

Jira HOSTX-5375

Change-Id: I12b71e4cb6330706e0e53292f6d0c3073b199173
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3168812
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-06 01:28:35 -07:00
Mikko Perttunen
60b43d6545 gpu: host1x: Request syncpoint IRQs only during probe
Syncpoint IRQs are currently requested in a code path that runs
during resume. Due to this, we get multiple overlapping registered
interrupt handlers as host1x is suspended and resumed.

Rearrange interrupt code to only request IRQs during initialization.

Bug 4658418

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I25e129452aeb39c23aa2d6f6a54729f60390d088
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3145171
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-06 00:09:14 -07:00
lchiu
d2a5a35cfe vse: support 64 bit keyslot for tsec
Bug 4620571

Change-Id: Iea2f42167245308348a0a50e9fde14036c3f0736
Signed-off-by: lchiu <lchiu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3130036
(cherry picked from commit ba8f79f3e14b755ebb99464de2ff8d1c2d173e24)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3140529
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-06 00:07:00 -07:00
Khushi
b7a1a14256 NVVSE SM3 Implementation
Implements SM3 in NVVSE crypto driver linux
ESSS-1346

Change-Id: I9f8b9bc18d7c30d8dac04e8f19941ef061aa8478
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3131643
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-04 09:23:09 -07:00
David Pu
a5b6d4a5b6 psc: fix oops when rmmod and clean up the driver
This patch fixes kernel Oops due to freeing psc_debug device multiple
times.

bug 4699764

Change-Id: I0a57317b1b064c08d657752a726d855533ec4d3c
Signed-off-by: David Pu <dpu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166051
Tested-by: Liang Cheng (SW) <licheng@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-04 05:18:50 -07:00
Laxman Dewangan
edbb5317f8 nvidia-oot: Remove the builds of device tree from nvidia-oot
The build of device tree is moved to new folder/repo and hence
it is not required to have build support file for device-tree.

Remove the unused file.

Bug 4654821

Change-Id: Id01d634d551d36bc9b36c8971b13ed27f7b6b6d6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3165347
2024-07-04 05:10:03 -07:00
Manish Bhardwaj
3a04791c47 vsc: add priority member in vsc config structure
Bug 4709721

Change-Id: I17442674bab6ca6b854cb85483250c679cb62502
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3164956
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: Kasinadha Dendukuri <kdendukuri@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-03 14:21:27 -07:00
Junghyun Kim
74316123dc media: camera: Update device creation
Use %d instead of %x to match with the number used in cdi

Bug 4704962

Change-Id: I911b6596ba1efcef3ad9a0d0c0056ac430fcea6c
Signed-off-by: Junghyun Kim <juskim@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3163825
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Chinmay Mahajan <cmahajan@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Igor Mitsyanko <imitsyanko@nvidia.com>
2024-07-03 14:05:09 -07:00
Prathamesh Shete
1a85000f63 cdi_mgr: pass parent node instead of child
Bug 4704962

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Change-Id: Ib18f1de8e129916036913ec25bf5300d6f19def4
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3149773
Tested-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinmay Mahajan <cmahajan@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
2024-07-03 14:05:01 -07:00
Jian-Min Liu
f308ec7c39 kleaf: Add p4root symlink into conftest group
The execution of conftest currently relies on the GNU toolchain located
in the P4ROOT path. However, since kleaf is a hermetic build, the P4ROOT
environment variable is cleaned up during the kleaf setup. To address
this, we create a symlink to connect the original P4ROOT path to the
kleaf build path.

Bug 4344670

Change-Id: I7877fd5d5543f73001dd1a017dfd0cc552802658
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3161994
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-03 13:58:26 -07:00