Commit Graph

4289 Commits

Author SHA1 Message Date
Narayan Reddy
d3cdce84ec nvethernet: IOCTL handling of HSIs
1) Add IOCTL support for below HSIs
 T264-EQOS_HSIv2-30
 T264-EQOS_HSIv2-9
 T264-MGBE_HSIv2-8
 T264-MGBE_HSIv2-7
 T264-MGBE_HSIv2-6
2) Add support for T26x Err Injection

JIRA NET-1946
JIRA NET-1948
Bug 4778785

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: Idd479983c39a7f15c875dac93c86d5bf4fd5e04c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258754
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:18 +00:00
Joshua Widen
7ae5bc1873 host: isp: Correct log level of debug print
A debug print was left at an incorrect level. Spamming the kernel
log and causing high CPU utilization.

Bug 4921461
Jira CAMERASW-32858

Change-Id: I0037d5bc96f3ec3925eee3b565637b2d2a2fa91d
Signed-off-by: Joshua Widen <jwiden@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3335947
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinmay Mahajan <cmahajan@nvidia.com>
2025-07-24 10:19:18 +00:00
Srishti Goel
825083f3d6 pci: xdma: Polling on XDMA debug reg to restart if DMA hung
Polling on XDMA_CHANNEL_DEBUG_REGISTER_4 for atmost 10msecs in the IRQ handler and restart the channel if the XDMA_CHANNEL_DEBUG_REGISTER_4_INTR_ENGINE_MSI_CHAN_MSI_DISP_FSM is non-zero at the end of this.

Bug 4787071

Change-Id: I215065a1bf7ae35c89c4b3c4df9a21f7bea5ebe9
Signed-off-by: Srishti Goel <srgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330655
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
kevixie
04fdeac230 nvidia-oot: CameraSW: KMD SWUD update
+ Use CameraDoxygenWorkflowV1_02182025 to generate
  SWUD doxygen headers for functions in FusaCap KMD
  and RTCPU
+ Use Cursor Agent to generate SWUD doxygen headers
  for FusaCap capture-vi.c

Jira CAMERASW-32271

Change-Id: Ida6b94d6ffea3df593fa793cc4b9a150c87187ba
Signed-off-by: kevixie <kevixie@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313956
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Narayan Reddy
abd6b1a506 nvethernet: update dereferring of ioctl_data
structure variables inside ioctl_data structure has been
grouped to union, so updated the dereferring of ioctl_data

Bug 5129765

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I8732a1e86985643bb88f58de2b0b11a0d02ffe2b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3323781
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
2025-07-24 10:19:18 +00:00
Akihiro Mizusawa
dd5c4b741f host: nvcsi: Deprecate nvhost_module_pm_ops
Deprecate the usage of nvhost_module_pm_ops as part of the wider
nvhost API deprecation while maintaining equivalent functionality.

The NVCSI driver does not register prepare_poweroff, poweron_reset,
finalize_poweron callbacks nor set the clock gating regs with nvhost,
so the runtime operations will only call clk APIs.

Bug 4921620

Change-Id: I22a75c9f58ec0980aa97997b674c26a9bb62d47b
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321086
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
Tested-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:18 +00:00
Akihiro Mizusawa
c2dd36f33c host: capture-support: Deprecate nvhost_module_pm_ops
Deprecate the usage of nvhost_module_pm_ops as part of the wider
nvhost API deprecation while maintaining equivalent functionality.

The capture-support driver does not register prepare_poweroff,
poweron_reset, finalize_poweron callbacks nor set the clock gating
regs with nvhost, so the runtime operations will only call clk APIs.

Bug 4921620

Change-Id: I438621258378bb6e81fc7a82e3334dcbfa180dc9
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321085
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: FNU Raunak <fraunak@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:18 +00:00
Akihiro Mizusawa
c555e49cf1 host: isp: Deprecate nvhost_module_pm_ops
Deprecate the usage of nvhost_module_pm_ops as part of the wider
nvhost API deprecation while maintaining equivalent functionality.

The ISP driver does not register prepare_poweroff, poweron_reset,
finalize_poweron callbacks nor set the clock gating regs with nvhost,
so the runtime operations will only call clk APIs.

Bug 4921620

Change-Id: Iadf7b4104f622507e8b2e82fe054151e6318d747
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321084
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: FNU Raunak <fraunak@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:18 +00:00
Akihiro Mizusawa
c84bc1ebe7 host: vi: Deprecate nvhost_module_pm_ops
Deprecate the usage of nvhost_module_pm_ops as part of the wider
nvhost API deprecation while maintaining equivalent functionality.

The VI driver does not register prepare_poweroff, poweron_reset,
finalize_poweron callbacks nor set the clock gating regs with nvhost,
so the runtime operations will only call clk APIs.

Bug 4921620

Change-Id: I639d428f5ea1ed1071d4502a877841b7049b9cd2
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3320983
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: FNU Raunak <fraunak@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
2025-07-24 10:19:18 +00:00
Ketan Patil
6e5aec9ce4 video: tegra: nvmap: Add new heap for VI mempool
- The VI is allowed to access the whole of the Guest VM currently as it
is a stage-2 SMMU device. Hence it can read and write to any memory.
This may lead to breach of confidentiality and integrity. In order to
restrict the VI from accessing the whole VM, a mempool is being created
by HV that would restrict access to VI to just the mempool memory.
- In nvmap, we have some special rules for IVM carveout like if user
specify IVM carveout to allocate from, then if first IVM carveout does
not have sufficient memory then nvmap tries to allocate from next IVM
carveout. We don't want these rules applicable for VI mempool heap,
hence only carveout initialization part would remain similar to IVM
carveouts but rest of the operations would be performed normally like
any other carveout.
- Add DT binding doc for VI-carveout.

Bug 4648721

Change-Id: Ib40415a4c80da908654c86162c1cd4b50b33ef31
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196238
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
2025-07-24 10:19:18 +00:00
Jon Hunter
a59a10dfeb drivers: Update timer APIs for Linux v6.15
In Linux v6.15, the timer APIs hrtimer_init() and del_timer() have been
removed. The hrtimer_setup() was added in Linux v6.13 to replace
hrtimer_init() and hrtimer_init() have finally been removed. The
functions del_timer()/del_timer_sync() were renamed to
timer_delete()/timer_delete_sync() in Linux v6.15. Use conftest to
detect these changes and update the drivers as necessary.

JIRA LINQPJ14-47

Change-Id: Id3994900384aad4b91155507cda91e04898ab12c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3336168
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:18 +00:00
Sanjith T D
1d9d3c1755 vblk: Fix the IOCTL issue with block device node.
IOCTL was allowed via block device node due to
mapping of wrong ioctl callback . Fixed the mapping to
the correct ioctl callback that throws error when
ioctl is done on block device node.

Jira SSV-12846

Change-Id: I13b492f216c99ac68f9ac89c509b3019a92c50f8
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3335014
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:19:18 +00:00
Jeungwoo Yoo
89df3ba53b nvsciipc.c: Fix CWE violations
- EXP39-C

Jira NVIPC-3397

Change-Id: Ic4be52a1032ec729442368a96af5cb8b75b99330
Signed-off-by: Jeungwoo Yoo <jeungwooy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3334619
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
3ad90175d1 drm/tegra: Update to Linux v6.14
Update Tegra DRM to align with Linux v6.14. The 'drm_client_setup.h' was
moved from the directory 'include/drm/' to 'include/drm/clients' and use
conftest to detect where it is located.

JIRA LINQPJ14-47

Change-Id: I1f1df6da4400e74d2f97926710ac0ddd5e6413e6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3333837
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
540737a228 drm/tegra: Update to Linux v6.13
Update the Tegra DRM driver to align with Linux v6.13. A function
pointer 'fbdev_probe' was added to the drm_driver structure in Linux
v6.13 and so use conftest to detect this and make the necessary changes
to the Tegra DRM driver.

JIRA LINQPJ14-47

Change-Id: I0120fe9f13bc39446ce4e0a8827eb5d8b42a082c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3333836
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
6be033ba85 drm/tegra: Update to Linux v6.12
Update Tegra DRM to align with Linux v6.12. The output.c driver was
updated to use the 'drm_edid_connector_add_modes()' function that was
first added in Linux v6.3. Use conftest to detect the presence of the
drm_edid_connector_add_modes() function and make the necessary changes
to the driver.

JIRA LINQPJ14-47

Change-Id: I0ff45ef0ada2f2c2353c1ba579c06ae06122727c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3333835
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Zhiyuan Wang
c9f69ea5d8 linux: kmd: static analysis TOP25 04/02 Part 9
fix CERT INT08-C under the following path:
- drivers/platform/tegra/rtcpu/camera-diagnostics.c

Jira CAMERASW-32960

Change-Id: I592cab86961df8e3a23d95acadced0717f424616
Signed-off-by: Zhiyuan Wang <zhiwang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3334867
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vishal Agrawal (SW) <visagrawal@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Patrick Young <payoung@nvidia.com>
2025-07-24 10:19:17 +00:00
Mohit Ingale
02a104cbb2 rtcpu: Add Doxygen documentation to RTCPU subsystem
Add detailed Doxygen documentation across all files in the RTCPU subsystem.
This documentation effort follows SWUD Doxygen guidelines and provides
complete API documentation for the entire RTCPU codebase.

Use Cursor Agent to generate SWUD doxygen headers

Jira CAMERASW-31120

Change-Id: I3095ff2e321402e72f0f8f5762bad798ea0ecf19
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3332472
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:17 +00:00
Bhadram Varka
11843f9878 nvethernet: fix Tx-ring full issue
Issue: Below issue observed while running TCP_TX perf test
for longer duration.

nvethernet a808a10000.ethernet: [validate_ctx][1082][type:0x2][loga-0x84d2] dma_txrx: Invalid frame len
nvethernet a808a10000.ethernet mgbe0_0: Tx ring[0] is full
nvethernet a808a10000.ethernet mgbe0_0: Tx ring[0] is full
nvethernet a808910000.ethernet eqos_0: Tx ring[0] is full

This is a regression due to the below change -
https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258684

The issue is that TSO packet is being treated as Non-TSO packet.
pskb_expand_head return code is returned directly where it can
return zero for TSO packet.

Fix:
Removed pskb_expand_head since headers are not getting updated in SW.
HW takes care performing the TSO handling. Also optimized the checks
in TSO path code.

Bug 5175569

Change-Id: I7f48ed32898fec51581bf034b953f0ef7a9913f0
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322354
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:19:17 +00:00
cyeddu
2e075e123d nvscic2c-pcie: Fix Top25 CWE CERT-C violations
Fix total 48 violations of below CERT-C rules:

CERT ARR30-C - 1
CERT EXP34-C - 1
CERT INT08-C - 20
CERT INT30-C - 20
CERT STR07-C - 4
CERT STR31-C - 1
FORWARD_NULL - 1

JIRA NVIPC-3120

Change-Id: I2b9b35e97fe6968ec4c656cdcdd01a764640033c
Signed-off-by: Anjanii <amohil@nvidia.com>
Signed-off-by: Janardhan Reddy <jreddya@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263785
Reviewed-by: Deepak Kumar Badgaiyan <dbadgaiyan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:17 +00:00
Mallikarjun Kasoju
ae290b601b ufs: Add conftest to check is_ufs_already_enabled
Add conftest to check is_ufs_already_enabled

Change-Id: Ia830afb2a72586f4da2323a4ab7df8e7eb9cc321
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3312149
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Mallikarjun Kasoju
9a4387e137 ufs: skip ufs initialize if already done
Skip ufs initialize if already done by
earlier firmware

Bug 4757621

Change-Id: I4efdca7e879d5d568d7749abcdebc05fe019fde1
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3293005
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Mallikarjun Kasoju
0587b30451 scsi: ufs: Clean-up ufs driver
Done below changes:
1. Removed FPGA specific changes
2. Removed T194 specific changes.
3. Fixed issues reported by check-patch

Change-Id: I8ea07a57add151ccd2e2fdac4e3bd9d9456cc765
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3274557
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Bhadram Varka
76c28404c5 ethtool: Fix ring size configuration for Thor
Fix several potential issues in ethtool ring parameter handling:

- Add bounds checking for osi_dma->mac array access
- Add NULL pointer validation for ndev, pdata and osi_dma
- Make ring size arrays static const
- Add proper error handling for network device stop

Bug 5158977

Change-Id: Ia592c14d9ff1b81bee7d3382ef171443dd30e4b2
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3317305
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Mohit Ingale
bce3cb0a57 platform: tegra: rtcpu: Add runtime control for camera diagnostics
Add a new sysfs interface that allows toggling camera diagnostics on and
off at runtime without deallocating memory resources. This enhances the
camera-diagnostics driver functionality by:

- Adding a new 'control' sysfs attribute for starting/stopping diagnostics
- Implementing intelligent state checking to avoid unnecessary operations
- Providing better user feedback about the current diagnostic state
- Preserving allocated memory between stop/start cycles

The implementation checks if diagnostics are already running or already
stopped before attempting state changes, preventing redundant operations
and providing informative messages to users.

This allows us to run isp-falcon-memtest, which conflicts with
camera-diagnostics driver.

Jira CAMERASW-32042

Change-Id: I67d0e7e15a25cf000554d1c222b2890be1adce4a
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330307
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:17 +00:00
Mohit Ingale
0f10f5e639 platform: tegra: rtcpu: Implement camera diagnostics driver
This commit expands the camera-diagnostics driver to add
support for ISP PFSD tests. The implementation:

- Adds diagnostics IVC communication between kernel and RCE firmware
- Implements ISP SDL test vector loading, verification, and execution
- Provides proper memory allocation and IOMMU mapping across devices
- Supports multiple ISP instances with chip-specific configurations
  (T234/ISP6 and T264/ISP7)
- Creates sysfs interface for diagnostic status reporting
- Adds proper error handling and resources cleanup
- Implements CRC validation for test vectors

The driver enables hardware safety diagnostics for camera subsystems
to ensure reliability and functional safety of the camera pipeline.

New header files:
- camrtc-diag-messages.h: Defines messages for IVC communication
- camrtc-diag.h: Contains common diagnostic data structures

Jira CAMERASW-32042

Change-Id: I9a892b40891cffc3d460723d9fdc92854c6cda85
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313001
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
2025-07-24 10:19:17 +00:00
Sanjith T D
39392014e5 vblk: Add separate device node for FFU
In order to provide separate access control for
Device Management and Firmware Update IOCTL's,
separate device nodes are created.

 - /dev/vblkdevX.ctl is for Device Management related IOCTL's
 - /dev/vblkdevX.ffu is for Firmware Update related IOCTL's

Removed the old approach of checking for access permission
inside the driver.

Jira SSV-12846

Change-Id: Id34d37a34eb1b988559d5dc3aec0b2291dcecc8f
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3324229
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
13834d4e13 drm/tegra: Update to Linux v6.8
Update the Tegra DRM driver to align with the upstream Linux v6.8 kernel
preserving all the downstream changes that still need to be upstreamed.

JIRA LINQPJ14-47

Change-Id: If0a9149bcfa2fd6276ac8100933abc3d532a5ddc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3333320
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
8a28999d28 drm/tegra: Drop kernel version checks
Drop the kernel version checks from Tegra DRM because these are only
needed for pre-Linux v6.x kernels and these are no longer supported.

JIRA LINQPJ14-47

Change-Id: Ie5190eec6f3e37b477ae2ad84f2ef2f3ed9c3d8a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3333319
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
7a6b9bbadb pva: Fix mixed declarations and code
When building the PVA driver with the compiler option
'-Werror=declaration-after-statement' the build fails with the following
error ...

 drivers/video/tegra/host/pva/./src/kmd/common/pva_kmd_shared_buffer.c:
  In function ‘shared_buffer_process_msg’:
 drivers/video/tegra/host/pva/./src/kmd/common/pva_kmd_shared_buffer.c:
  error: ISO C90 forbids mixed declarations and code
  [-Werror=declaration-after-statement]
  187 |    uint32_t msg_size = safe_subu32(header.size, sizeof(header));
      |    ^~~~~~~~

Fix this build issue by ensuring the variable 'msg_size' is defined at
the start of the shared_buffer_process_msg() function.

Change-Id: Ibd4a51caae06bfda2e11dfc6e3f1cf2f26d618c7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330348
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
Reviewed-by: Nan Wang <nanwa@nvidia.com>
2025-07-24 10:19:17 +00:00
Ketan Patil
838bb12196 video: tegra: nvmap: Gather pages and then flush cache
After a deeper analysis, it was found that multithreaded cache flush is
not required. Only gathering the pages and then doing cache flush is
enough to get the perf improvement, the cache flush time of each page is
almost half in this case as compared with not gathering the pages. So it
means there is continuous cache eviction is happening. So, while
allocating big pages from allocator, instead of allocating one big page
and flushing it, allocate all required big pages and then flush pages
at last.

Bug 4628529

Change-Id: I4d8113010a8c82a1cab124e26b14e8a3f5791cd1
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3325002
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ajay Nandakumar Mannargudi <anandakumarm@nvidia.com>
2025-07-24 10:19:17 +00:00
Ketan Patil
5bb431b8df Revert "video: tegra: nvmap: Add multithreaded cache flush support"
This reverts commit b90900fdece2eb002b5061681aead4a74401b484.
After a deeper analysis, it was found that multithreaded cache flush is
not required. Only gathering the pages and then doing cache flush is
enough to get the perf improvement, the cache flush time of each page is
almost half in this case as compared with not gathering the pages. So it
means there is continuous cache eviction is happening. Hence revert the
multithreaded cache flush support to simply the code and patch 3325002
adds gathering of pages support.

Bug 4628529

Change-Id: Ieb9237c6c2935cbf88036bc3ab83c33dc4d5e38d
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3325001
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
2025-07-24 10:19:17 +00:00
Hitesh Khode
c90336041c SerDes: EPL error reporting on irq
Add EPL reporting support in interrupt handling

JIRA TDS-17145

Change-Id: I3f7257ecbbc66880c65327cfdde52d2de5a3042a
Signed-off-by: Hitesh Khode <hkhode@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322971
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
2025-07-24 10:19:17 +00:00
Jukka Kaartinen
9e6481e659 vi: Add check for csi_port
Validate csi_port already in the setup phase to have same
behaviour as in the QNX.

Bug 5048625

Change-Id: Id53faa8c97899fe590da9b2e90dc72cac9e1b4ae
Signed-off-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3315532
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:17 +00:00
Nagaraj P N
a45f684085 vse: allocate priv struct during init
Also, update gmac crypto ctx free logic

Bug 4881474

Change-Id: I5e2f10814b3a1f41ff098f2c602ee2de431f6cf5
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3287699
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Ambika Prasad <ambikap@nvidia.com>
2025-07-24 10:19:17 +00:00
Manish Bhardwaj
c7180f767c nvidia-oot: update copyright year in virt drivers
Bug 4985113

Change-Id: I16682c1c2c8b2d5f76700e9133c8626a11905bfd
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328450
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
0d6655f480 video: tegra: nvmap: Fix build for Linux v6.15
In Linux v6.15, the function ioremap_prot() was updated to pass a
variable of type pgprot_t instead of an unsigned long. Add a conftest
test to check for this and update the NVMAP driver accordlingly to fix
the build for Linux v6.15.

JIRA LINQPJ14-47

Change-Id: Icff9f63bf5c914997b69076435dd9e2432f343a3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3332454
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
585f64d7df gpu: host1x: Add syncpoint name and process name in syncpt_load
Update syncpt name and process info
in debug log.

Bug 5170956

Change-Id: Ie7db05a60b95febcdc645fe406297e09ad97976f
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330491
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
amitabhd
26b29860fd host1x_emu: DT Property based syncpoint memory
This change uses DT property to select syncpoint memory.
If property "syncpoints-mem" is defined hypervisor syncpoint
memory mechanism is used. Otherwise memory is allocated from
guest kernel.

Previously this was based on code level MACRO. Changing it to
DT simplify selection of syncpoint memory.

Jira HOSTX-5982

Change-Id: I5e26ef2d42d5d01d6aff0f2b43fd11c23218057d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3329245
Reviewed-by: Leslin Varghese <lvarghese@nvidia.com>
Reviewed-by: Sourab Gupta <sourabg@nvidia.com>
Tested-by: Amitabh Dutta <amitabhd@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Amitabh Dutta <amitabhd@nvidia.com>
2025-07-24 10:19:17 +00:00
N V S Abhishek
99b41fa0f6 tegra: nvmap: Return error instead of Bug On
Return error instead of Bug on when the ioctl
is called for prod builds. This is done to facilitate
proper error propagation to the clients.

Bug 5181576

Change-Id: Icf65e2bad08c048804bcf1b18103b757308d5d12
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328974
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Martin Radev <mradev@nvidia.com>
2025-07-24 10:19:17 +00:00
Jeungwoo Yoo
8e91b73244 nvsciipc.c: Fix CWE violations
- EXP39-C

Jira NVIPC-3397

Change-Id: Iacdcd3160f2060ffd8b1e0cc8958ff29cac670f4
Signed-off-by: Jeungwoo Yoo <jeungwooy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3326688
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Joshua Cha <joshuac@nvidia.com>
2025-07-24 10:19:17 +00:00
Ketan Patil
c20759506b video: tegra: nvmap: Add field to indicate hugetlbfs based memory
Hugetlbfs memory handles are shown under the IOVMM debugfs as the memory
comes from the system memory and not from any carveout. But it is
causing confusion among the customers. Hence add a field to indicate if
the buffer was allocated from hugetlbfs or not.

Bug 5169776

Change-Id: Ide70b7f746519ed528b5face5b91d9a4c2f9f7ca
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3332021
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Nagarjuna Kristam
3a9f9b5d12 linux: dma-test-common: Fix DMA re-init sequence
DMA channel is re-init based on incorrect previous and current
channel change check, fix the same. Add DMA cookie pointer info
logs for easy debugging.

Bug 4742850

Change-Id: Iec5dd32ffb3699c5d57961949597c2c80ef250ad
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330635
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:17 +00:00
Nagarjuna Kristam
6dbef270d8 PCI: tegra264: dma: Add poll to disarm MSI
To avoid getting spurious interrupts during XDMA channel reset,
Add polling of MSI states for NV_XDMA_CHANNEL_DEBUG_REGISTER_4_0
register once channel is disabled.

Bug 4742850

Change-Id: Id39e53f0fd33faa4358a3648e6baea8cc96c187c
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330634
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
8cb3f30c12 net: nvethernet: Fix build for Linux v6.15
In Linux v6,15, a 'speed' argument was added to the phy_loopback()
function. Add a conftest test to detect this change and update the
nvethernet driver accordingly. Note that if 'speed' is set to 0 when
calling phy_loopback(), then phy_loopback() behaves the same way as it
did before this argument was added. So by default set speed to 0 for the
nvethernet driver.

JIRA LINQPJ14-47

Change-Id: I55f775e672bfa1a00c9ccbd825c82be1868b0b52
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330685
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
9672874453 ufs: Fix Tegra UFS for Linux v6.15
In Linux v6.15, the pwr_change_notify() function was updated making the
3rd argument of type const. Add a conftest to detect this and update the
Tegra UFS driver accordingly.

JIRA LINQPJ14-47

Change-Id: I83f22bf0961200d9078fb35d408dac9149d786d2
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330680
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Kartik Rajput <kkartik@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
cf368bfa2b ASoC: tegra: Fix build for Linux v6.15
In Linux v6.15, the SOC_SINGLE_VALUE macro was updated and an 'xmin'
parameter was added. Add a conftest test to check for this and update
the Tegra ARAD driver accordingly.

JIRA LINQPJ14-47

Change-Id: I597104327dac9108a7ab106f0c3fec575947626d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328425
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
04e5d3eac8 blk: vblk: Fix build for Linux v6.15
In Linux v6.15, the 'request_queue' parameter was removed from the
function blk_rq_map_sg(). Add a conftest to check for this and update
the Tegra HV VBLK driver accordingly.

JIRA LINQPJ14-47

Change-Id: I140200fe7acbaebb383abd7939153178f0ca484a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330664
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Yuyuan Chen
b21532e8c8 kernel: nvidia-oot: Fix Static issues
Fix TAINTED_SCALAR and Directive 4.14

Jira CAMERASW-32773

Change-Id: I94534469e34d1826f09784391701838448de3dfa
Signed-off-by: Yuyuan Chen <yuyuanc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321543
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Patrick Young <payoung@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Ryan Li <ryanli@nvidia.com>
2025-07-24 10:19:17 +00:00
Mohit Ingale
5c39da20d5 media: camera: Reject channel setup for already configured stream id
If channel is already opened for given stream id and virtual channel id,
reject the request and error out.

Bug 5048625

Change-Id: I57c87128ce41c116fb2c8ef276908ff395864a9b
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3319273
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:17 +00:00