Commit Graph

4504 Commits

Author SHA1 Message Date
yizhou
737925e58e kmd: re-enable the panic_callback
- introduced a panic_flag in the tegra_rtcpu_trace.
- set panic_flag to 1 when kmd receives panic hsp
  message from RCE.
- the trace buffer readout thread calls rtcpu_trace_snapshot
  to dump out the snapshot section when panic_flag is set to 1.

Bug 5293085

Change-Id: Ief5d9431bfc944fc588f38a69f7758f829cf2e6e
Signed-off-by: yizhou <yizhou@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3368252
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Kalle Jokiniemi <kjokiniemi@nvidia.com>
2025-07-24 10:20:35 +00:00
Joshua Cha
b42f5d8ada nvsciipc: add put_cred()
Added missing put_cred() after using get_current_cred()

JIRA NVIPC-3520
Bug 5300203

Change-Id: Iddfb1ae78bb265109709360746b315bd1e62561b
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3369157
Reviewed-by: Jungho Kim <junghok@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
2025-07-24 10:20:35 +00:00
Narayan Reddy
38227b2177 nvethernet: add SIOCGHWTSTAMP support
issue: facing an unsupported ioctl error while
launching the ptp4l, since get timestamp configuration
support is not there.

fix: add get timestamp configuration ioctl support

Bug 5274698
Bug 5287071

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I9254b041d4d3b9dc2cddebc14dc6100ed1b76807
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3366858
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@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: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:20:35 +00:00
Srishti Goel
25d24fca15 pci: tegra264: Do not toggle PRSNT# in tegra264_pcie_ep_rst_assert
When EP boot up first and RP in power OFF state, default PERST# input is
high due to onboard pull up. When RP is powered ON, it causes a glitch
from high to low due to default pinctl settings, it is perceived as
PERST# assert by Endpoint. In tegra264_pcie_ep_rst_assert() PRNST#
signal is released (set high), this will cause PCIe link up failure.
This WAR is initially added for RP reboot case, to handle a scenario
where EP function driver still executing core_deinit as part of PERST#
assert and mean while RP boot up and ready for link up again. However
on Thor it is measured that core_deinit is taking only ~1.4 msec which
completes before RP boots. So, it is safe to remove PRNST# release WAR
in tegra264_pcie_ep_rst_assert(), this fixes link up failure when RP
boot after EP.

Bug 4981895

Change-Id: Ie24652a267bf3e3bc740d9c40e5b6d6671429b00
Signed-off-by: Srishti Goel <srgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3345684
(cherry picked from commit 8944b4a4d767a144b7204865d26b4e989ee003b6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338072
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Mark Mendez
0138f99d46 PCD: Fix license to GPL2
This fixes the mistake of adding the Nvidia proprietary
license for upstream documents

Bug 5068365
Bug 5278766

Change-Id: If346041568bbf7b94c68b787dd22783840fa1de8
Signed-off-by: Mark Mendez <mmendez@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321819
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
yizhou
b1789adbac kmd: disable the panic_callback
Disable the panic_callback function as a workaround
for bug 5293085.

when panic_callback() is called from an atomic context,
it tries to do something that could sleep (e.g. calling
mutex_lock when the mutex is contended).

Bug 5293085

Change-Id: I822bd72fdbedcaa9201086dae991da36f34df8fa
Signed-off-by: yizhou <yizhou@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3368091
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Tested-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
2025-07-24 10:20:35 +00:00
Narayan Reddy
29ee31019b nvethernet: remove ETHER_PRV_TS_IOCTL support
remove ETHER_PRV_TS_IOCTL since it is not longer used.

Bug 5265084

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: If3fd6d82b67812e25c9146569d2ff2f0e8dab5f4
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3367197
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:20:35 +00:00
Praveen AC
459e781d79 virtual i2c mux support for other Hawks
* Add virtual i2c bus support for 2nd, 3rd
& 4th Hawks to read/write EEPROM data
while streaming
* Move MAX96712 function declarations to
a proper header file instead of using extern
declarations in .c files. This fixes checkpatch
warnings about externs in .c files and improves
code organization

Bug 4807682

Change-Id: Ie4e7f7b9adc6fe6255a517cd5f076afdc754384a
Signed-off-by: Praveen AC <pac@nvidia.com>
(cherry picked from commit 57dc20f5a8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3365540
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2025-07-24 10:20:35 +00:00
Sheetal Tigadoli
5de17f758a drivers:nvpps: Add support for configurable inital operating mode
Add support to select initial operating mode (GPIO or TIMER)
through DT property "nvpps-event-mode-init".

This allows users to specify which mode the driver should
start in rather than always defaulting to GPIO mode if gpios
property is specified in DT.

Key changes:
- Add DT property parsing for initial event mode
- Add validation to ensure selected mode is supported
- If this property is not specified, default mode selection
  happens based on if nvpps-gpios property is defined or not
- Add informative debug messages about selected mode
- Add error handling for invalid configurations(eg: init
  mode is GPIO but gpios property is not defined). If
  validation fails, probe returns error instead of
  defaulting to TIMER mode.

bug 5253938

Change-Id: I64c2a6565eeb46d6b07cf266cd4189fba9f0fba3
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3352704
(cherry picked from commit 091bb3ff50972e8dc3d7b941d850b4c1457b2a9e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361726
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:20:35 +00:00
Sheetal Tigadoli
148c895a23 dt-bindings:nvpps:Document property to set initial operating mode
Add documentation for the new 'nvpps-event-mode-init'
property in the NVIDIA nvpps driver devicetree bindings.
This optional property allows users to specify whether the
driver should start in GPIO mode (1) or TIMER mode (2).
If not specified then default mode is chosen based on
if the nvpps-gpios property is defined or not.

bug 5253938

Change-Id: I624e50458383a5a61efdb4d5dd790b4a1dc7bb7e
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3352703
(cherry picked from commit 3e3c946b6b0122b5cb9afe4f3150301c7f64b3a0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361725
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Khushi
ff1bc4d840 vse: remove dynamic allocate memory during runtime
Bug 5225204

JIRA ESSS-1833

Change-Id: I1cb869cf11a51cb0d910989bbbe4793d3439b6cf
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3326503
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:20:35 +00:00
Khushi
ae4f81c13d vse: Static violation fix driver
Bug 5225204

JIRA ESSS-1846

Change-Id: I25268475765572b0cce18b78b7eda436e1c55d56
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3339815
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
2025-07-24 10:20:35 +00:00
Joshua Cha
bb2c8b1fc4 nvsciipc: increase inter-process channel count
default DriveOS inter-process endpoint count is about 1300 for now.
DriveAV requirement needs 8192 inter-process channels
(=16384 endpoints) except for DriveOS system usage.
Hence increased the number of inter-process endpoints by 2048
more in considering margin.

Bug 5224327

Change-Id: I47f5a67f9ece917ed5fe873be2e188f128d63961
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361956
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
2025-07-24 10:20:35 +00:00
Mark Stephen Krueger
872a72234a kmd: trigger RCE snapshot on timeout
Jira CAMERASW-32243

Change-Id: I529a0d39990f6a20ff9780089383deebe22e2741
Signed-off-by: Mark Krueger <mkrueger@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3355776
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Ying Zhou <yizhou@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
2025-07-24 10:20:35 +00:00
Prakhar Srivastava
e6a11f7e4c PCI: tegra264: Disable RST# IRQ when EP not ready
Enabled RST# IRQ during EP_START after tegra264_pcie_ep_rst_deassert is
invoked for EP and disable RST# IRQ during EP_STOP after
tegra264_pcie_ep_rst_assert is executed for EP and EP is not available
anymore. This prevents unwanted EP accesses during RP reset sequence
causing PERST# to toggle, while EP is not ready or available.

Bug 5281037

Change-Id: I43e1fd6c6ccfaae64a6bb2375a3685f186766d78
Signed-off-by: Prakhar Srivastava <prasrivastav@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3363313
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:20:35 +00:00
Manish Bhardwaj
9c6469ff98 tegra_hv: stop compiling unused APIs for prod kernel
- stop compiling unused APIs for prod kernel
- remove APIs having just function declaration

Jira ESLC-8593

Change-Id: I8acd01a88e0ea4c3792d7080f685bcac9c9cf559
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3363569
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:20:35 +00:00
Sanjith T D
d6ef2a4201 vmtd: Establish IVC channel on LCPU-2
- The IVC channel establishment has to be done
   on LCPU-2 to avoid timeouts during boot.
 - Updated the vblk driver to register the IRQ handler
   before performing the IVC reset.

Jira SSV-13035

Change-Id: Id337db4ce394bc89fd052f94463ed3fc3a49f9ba
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3355578
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:20:35 +00:00
std
3ea97358bb virt oops: Establish IVC channel on LCPU-2
The IVC channel establishment has to be done
on LCPU-2 to avoid timeouts during boot.

Jira SSV-13035

Signed-off-by: Sanjith T D <std@nvidia.com>
Change-Id: Ib647c318621a1b4435909d8a76f25f341bdb2c95
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3366612
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:20:35 +00:00
Sanjith T D
89e5c02ff7 vblk:vmtd:oops: doxygen comments for external API
Jira SSV-12897

Change-Id: Ie4b8d54a601a3a904e02f9f93e4ae52ae0447b3c
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3336860
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:20:35 +00:00
Sheetal Tigadoli
59e320fc90 drivers: nvpps: Add configurable TS capture interval
Add support for configurable timestamp capture interval
through device tree property 'ts-capture-interval'.
This allows users to tune how frequently timestamps are
to be captured in TIMER mode.

- Add support for device tree property 'ts-capture-interval' (in ms)
- Defaults to 1000ms if property not specified
- Validate interval is within allowed range (100ms - 1000ms)
- Update timer configuration to use configurable capture interval

Bug 5242056

Change-Id: I4a327558576a86650890be4ae7e1ccfa5abe3c1d
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348872
(cherry picked from commit 1317865f5dc042348e1e39b2aa54a7bb6aa1ffdb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361722
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:20:35 +00:00
Sheetal Tigadoli
e9783303bc dt-bindings:nvpps:Add ts-capture-interval property
Add documentation for 'ts-capture-interval' property.
This property allows configuring the interval between timestamp
captures in milliseconds (valid range: 100ms-1000ms), determining how
frequently the driver collects timestamp data.
If unspecified, timestamps are collected every 1000ms (1s) by default.

Bug 5242056

Change-Id: I12412d67d6eb3885d15a73ed1d40210fcc33d64e
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348871
(cherry picked from commit 742ac3220d0af4cc5bbac873bc4743a3b437efc0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361721
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Frank Chen
48f3711947 nvidia-oot: cdi: Update cdi package buf size check
The original checking for cdi_dev_package buffer size is wrong,
it should not check the max size against max I2C payload size.

If the cdi_dev_package buffer size is too big for i2c transfer,
it will be breaking down to smaller sizes and transferred using
multiple I2C messages.

Define a new MAX_CDI_DEV_PACKAGE_BUFFER_SIZE for checking the
cdi_dev_package buffer size.

Bug 5107765
Jira CAMERASW-333779

Change-Id: Ieec049d51af4911dfd31410f43aa4733b75d265d
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3365281
Reviewed-by: Kevin Xie (SW-TEGRA) <kevixie@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ganesh Ram Savithri Sreenivas Murthy <ganeshrams@nvidia.com>
Reviewed-by: Samuel Hung <samuelh@nvidia.com>
2025-07-24 10:20:35 +00:00
zyi
c71ca8521c kernel: nvidia-oot: fix TAINTED_SCALAR
Fix TAINTED_SCALAR static analysis:
- camera/fusa-capture/capture-isp-channel.c

New violations are in
fusa_kmd: delta per rule
=======================================================
New :
=======================================================
Total new violations : 0
=======================================================
Fixed:
 -       TAINTED_SCALAR:  -3 defects
 - MISRA C-2012 Directive 4.14:  -3 defects
=======================================================
Total fixed violations : -6
=======================================================

Jira CAMERASW-33480

Change-Id: I428982ba33a26dcd5bb66e7b9a13ea689d7a8d1f
Signed-off-by: Yi Zhang <zyi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3363100
Tested-by: Mike Jia <mijia@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Yang Xu <yangxu@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Divyash Kumar <divyashk@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mike Jia <mijia@nvidia.com>
2025-07-24 10:20:35 +00:00
Hitesh Khode
cb4010130d SerDes: BHSI-16, BHSI-10: Add Read after write opcode
Bug 5218749

Change-Id: Iaca83d0c201b746d5e70a4e3717781d0273c55ab
Signed-off-by: Hitesh Khode <hkhode@nvidia.com>
(cherry picked from commit 6ac5c42e80f80f1defb9e8d3f2803f143da4f506)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341500
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Zhongjie Wang
1d5c9f1143 nvethernet: Add capability checks for ioctls
Issue description:
- Some privileged ioctl commands lack capability checks,
  so a malicious user can configure ethernet HW with those
  ioctl commands.

Fix description:
- Revisited all ioctl commands in nvethernet and added
  missing capability checks for privileged ioctl commands.

Jira NET-2865

Signed-off-by: Zhongjie Wang <zhowang@nvidia.com>
Change-Id: Idae1d72f205ca24a02693274668cdff58f4d12e9
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337486
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@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: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
55e777b5cd nvdla: kmd: enable current voltage, power knobs
The following knobs are enabled with this commit.
- power_mW
- voltage_mV
- vftable_mV_kHz (Supported in command list v1.3 and above)

Additionally, the implementation for setting MCU and core frequencies
are accidentally swapped. This commit fixes the issue.

Bug 5185298
Jira DLA-7905

Change-Id: I0e7ec2a7d1d07e7da103f6fe70ee09247f532cfa
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337804
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit 4804a2da70eee29ade79153fac15998d287a5ab1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3340409
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
3850099bf5 nvdla: kmd: support autosuspend, lpwr telemetries
[1] BUG_ON -> WARN_ON as per the recommendation from svcacv.
[2] Updated the power management interface
    - Setting delay for rail, power and clock gating is easier to
        manage with separate API.
    - delay_us has been removed from the gating.
    - New stat interface has been exposed for any stats related
        to the power management operations.
[3] Supports autosuspend feature.
[4] Supports lpwr telemetries for the rail, power, and clock.
    - idle time in us
    - active time in us
    - idle count
    - active count
    - entry and exit latencies in us (max, min and total)

Bug 5185298
Jira DLA-7905

Change-Id: I81267d7c3e9c35c81d29a19efe9192d436322ee9
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3318099
(cherry picked from commit c7cf5bb3b24dd9ed58e55a3fec56c8b1503c7e01)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338010
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Tested-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
3f7a9abe07 nvdla: kmd: support power management with HFRP
Jira DLA-7800

Change-Id: If02567cb5a30a6fbeae7d5256ba612317605fb48
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3303252
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
Signed-off-by: Arvind M <am@nvidia.com>
(cherry picked from commit c71198a1ef7cc7715401da08c24ef2bbc4b44de0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337347
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
3ed7b12ef5 nvdla: kmd: update riscv offsets with firewall
With the registers remapped to the DLA KMD accessible area, the riscv
register offsets are updated to point to the remapped offsets.

Bug 5080056
Jira DLA-7802

Change-Id: Id7558bb032e1702eb17d55e1fc87a2d8dcd3ba30
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300041
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit cccd927a215c370c7297a256901dd93ffdf3d4fa)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337346
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Vishal Thoke
e0a8ac6edf nvdla: kmd: implement dvfs_statdump & set_mcu_freq
[1] connected dvfs_statdump and clk_mcu_freq
    from debugfs to FW interface end to end.

Jira DLA-7799

Change-Id: Ic4871b3acafcd9acf1901a72f5ba3465fb7c252b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306119
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit 8417d0c3c1f68760f4c6427863aba75b9586d86c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337345
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
c27930b9db nvmap: kmd: Add support for ACPI
Bug 5011465

Change-Id: I77ba3d5dcbee602859766db079d2b9a579730bce
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3277542
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit 905368c55e4ae51c01b5d7d4ed8caa022ec73261)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3277546
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
4bf26c4247 host1x-emu: kmd: Add support for ACPI
This change enable device probing for ACPI device.

Bug 5011544

Change-Id: Ibfc85be18b0d73e813f68c699e4baa3de9682b5d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3276952
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit bbfa4c3afd2dd3856b01be1b15c3023549dd079b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3272347
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Amitabh Dutta <amitabhd@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:18 +00:00
Arvind M
7f006193a3 nvdla: kmd: add support for ACPI
Bug 4988970
Jira DLA-7673

Change-Id: I8d611932cf7b7af107f135e9ae44caad9032a6c0
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3272418
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit e01c86ebdf123d6e9a40986c16f7f3ccbb989cc1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3270720
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:19 +00:00
Mainak Sen
f0404e50f6 drm: tegra: Disable TEGRA_SYNCPT_INCR IOCTL for T264 platform
Conditionally disabled the legacy TEGRA_SYNCPT_INCR IOCTL for T264
platforms since it's no longer needed. This IOCTL is superseded by the
newer TEGRA_SYNCPOINT_INCREMENT IOCTL which provides better functionality
and follows the modern API design.

The conditional compilation helps reduce the attack surface on T264
platforms by removing legacy code paths that aren't needed.

Use CONFIG_ARCH_TEGRA_264_SOC as the proper platform-specific flag
to identify T264 platforms, as this is the standard architecture flag
used throughout the codebase.

This change affects:
1. The IOCTL definition in the tegra_drm_ioctls table
2. The IOCTL handler function implementation

This improves code cleanliness by removing unnecessary legacy code
on newer platforms while maintaining backward compatibility for
older platforms that might depend on this IOCTL.

Bug 5060574

Change-Id: Idd21d69ebd992f976770016b5805f7d6af89c88d
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3342657
Reviewed-by: Sourab Gupta <sourabg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:19 +00:00
yizhou
4736728ec1 camera: dump out RCE snapshot on CAMRTC_HSP_PANIC
- implemented a panic callback function which dumps out
  the snapshot section of the RCE trace buffer.
- registered the panic callback function with hsp handle
  during handle init time.
- when receiving the CAMRTC_HSP_PANIC from RCE, trigger
  the panic callback function to dump out the RCE snapshot.

Jira CAMERASW-32243

Change-Id: I523a0b51637a6cf1091d578195c75090b52ffcd7
Signed-off-by: yizhou <yizhou@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341536
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:19 +00:00
yizhou
d68f89d225 camera: Add snapshot section & HSP PANIC cmd
- Add the snapshot section into the trace buffer header struct
- Introduce a new HSP command which will be used to signal
  KMD about RCE halt.

Jira CAMERASW-32243

Change-Id: I3890b30200b3a0a386939d432842269f4c1e1225
Signed-off-by: yizhou <yizhou@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314382
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
2025-07-24 10:19:19 +00:00
Nagaraj P N
7e77b140e3 nvtzvault: take lock before close session
- need to take lock to avoid race conditions when accessing
  mailbox.
- don't use spinlock in irq context as irq is not shared
  and only one request is processed at a time.
- remove debug print.

Bug 5225204
Bug 5275408

Change-Id: I2de5a07d06568012d6557d3a32126478b6ddaf15
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3356286
(cherry picked from commit 521e75b7c3cbc5f4724a8a0f3c11c3a2940383b2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3364010
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:19 +00:00
Jon Hunter
ef0bf7c94c mc-utils: Remove get_dram_num_channels_t26X
The function get_dram_num_channels_t26X() is identical to the function
get_dram_num_channels_t23x() and so get rid of the
get_dram_num_channels_t26X() function and just use
get_dram_num_channels_t23x().

Bug 5054840

Change-Id: I5647bf9a946dc06e692b1a2fc44f750bc68ec65d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3362555
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:19 +00:00
Jon Hunter
cdef2b63f6 drivers: Remove 'private' directories
Drivers in the NVIDIA OOT repository are public and so remove the
directories named 'private' to avoid any confusion once these sources
are released.

Bug 5054840

Change-Id: I9156e3b08df9ce3d90dc0a2b5e72416f28fac5f5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3351272
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:19 +00:00
Joshua Cha
fe810a887f nvsciipc: fix endpoint access error
Fix authentication in mutex handling (Linux).
Fix endpoint access error return value and
add endpoint name debug info.

Bug 5237628

Change-Id: Id54b182c41c0d8e637dbe212ceea3d914b56edac
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3345811
(cherry picked from commit 3115465d891b10bc389b813a2fb279d0b0bce9b0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3345807
Reviewed-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:19 +00:00
Khushi
8e4bf79db8 Bug Fix: Fix AESRNG performance on Thor
Bug 5095525

Change-Id: I4de355ea6a53b4dcc5654cb67d50c128efd8e06b
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348752
(cherry picked from commit 28f1ad0ad6ec3fe69a7f551a24accb526c23e410)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361960
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:19 +00:00
Mohit Ingale
00c660901e rtcpu: camera-diagnostics: fix dependency module
tegra-isp5 module is identified by name nvhost_isp5, it should always be
loaded first to ensure all initializion is done for isp device.

Bug 5225858

Change-Id: I35c7715034ac1301c7592a59827d9fd1e1fbdcdd
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3358137
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
2025-07-24 10:19:19 +00:00
Khushi
fba609e17f bug fix: negative test cases
Bug 5225204

Change-Id: I0b6bb5f347e037d79466abf0f88b2ff21ee22b9f
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3349831
(cherry picked from commit 3229106e7d7fb08ce58e1732e2a7ad4efabff906)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313802
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:19 +00:00
Nagaraj P N
60a05995c2 vse: copy error code from SE Server
error code from SE Server is not being copied
for Keyslot Allocate/Release case, which results
in success being returned even when keyslot operation
has failed.

Bug 5225204

Change-Id: Ib2ef5c64c2e84c70c01dc6922ef636b87cd081d9
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3357970
(cherry picked from commit 82d81ec68217c516636f9b072373b924bfae376e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361711
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:19 +00:00
Nagaraj P N
2f4f0d54a1 vse: address CERT-C EXP39-C violations
avoid typecasting different pointer types
to address EXP39-C violations.

Bug 5225204

Change-Id: I1650c690074ca8275f76868751d82d2d137d83a4
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3353505
(cherry picked from commit b879bcc3eb2524c7080981b52913df55d4883c47)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3358594
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:19:19 +00:00
Manish Bhardwaj
edd7b240b0 nvidia-oot: clear out the memory before freeing
Jira ESLC-8592

Change-Id: I0532bab29d4267477770f317576610514c25d4ea
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3356255
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:19 +00:00
Suneel Kumar Pemmineti
2483ab734d nvsciipc KMD: Fix incorrect PID
The code was using task_pid_nr(current) to get the process ID, which
returns the Thread ID (TID) instead of the actual Process ID (PID) for
multi-threaded applications. This caused problems with endpoint
reservation tracking since different threads of the same process would
appear as different owners.

current->tgid (Thread Group ID) represents the actual Process ID in
Linux. task_pid_nr(current) returns the Thread ID which is unique for each
thread within a process. Using TGID ensures all threads from the same
process are properly identified as belonging to the same process.

This fix ensures proper endpoint reservation tracking across all threads
of a multi-threaded application.

Bug 5260259

Change-Id: If2f864dc4456de71b1df49e64320463a24203c68
Signed-off-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3360307
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jungho Kim <junghok@nvidia.com>
2025-07-24 10:19:19 +00:00
Xiaoming Xiang
f717989baf fuzz: syzkaller semi automation script
Jira CAMERASW-30740

Change-Id: I429c9465b1fa1873d3a5e9ef3d9a182e22e486c9
Signed-off-by: Xiaoming Xiang <xxiang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314647
Reviewed-by: Ming Chang (SW-TEGRA) <mingchang@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Patrick Young <payoung@nvidia.com>
2025-07-24 10:19:19 +00:00
zyi
9192e31e0a fuzz: nvidia-oot: syzkaller fuzz test description
Involving the following modules: cam_fsync cdi fusa_kmd

Jira CAMERASW-30645

Change-Id: Iebba84a0df43f0acc8b8d3906be5e0d1f85505fe
Signed-off-by: zyi <zyi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3307513
Reviewed-by: Ming Chang (SW-TEGRA) <mingchang@nvidia.com>
Reviewed-by: Patrick Young <payoung@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Xiaoming Xiang <xxiang@nvidia.com>
Tested-by: Xiaoming Xiang <xxiang@nvidia.com>
2025-07-24 10:19:19 +00:00
Xiaoming Xiang
b081602754 fuzz: nvidia-oot: fix syzkaller fuzz test crash
fix cdi and fusa kmd module crash

Jira CAMERASW-30661

Change-Id: I78b49a5f0d65f7c69ff1f1a8b746c4091d4adeb7
Signed-off-by: Xiaoming Xiang <xxiang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337853
Reviewed-by: Ming Chang (SW-TEGRA) <mingchang@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Patrick Young <payoung@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:19 +00:00