Commit Graph

4375 Commits

Author SHA1 Message Date
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
nanwa
2314d54174 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit 689815042dacd ("Fix syncpt related crash durin...")

Changes since last deployment:

- Fix syncpt related crash during SC7 resume
- Add SC7 simulation and test
- tests: docs: fix mat_add test specs
- compat: bugfix: prevent fence override
- Add AI code reviewer to CI

Change-Id: I781ac9379787adb9dbdde55cd3fdec5729b08a95
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3358344
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
2025-07-24 10:19:19 +00:00
Naseer Ahmed
feca511d6b conftest: Add drm_connector_has_override_edid
Needed to compile tegradisp-drm in Kernel 6.6.
Kernel 6.6 removes override_edid. Instead it
defines edid_override.

Jira TDS-17170

Change-Id: I0136f4c6ed2aed45b1618afa38503880e6f6af23
Signed-off-by: Naseer Ahmed <naahmed@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313704
Tested-by: Cather Zhang <catherz@nvidia.com>
Reviewed-by: Shu Zhong <shuz@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:19 +00:00
Mohit Ingale
5a615789cd platform: tegra: rtcpu: Rename camera diag control sysfs node
Renamed the "control" sysfs node to "diag_control" in the camera-diagnostics
driver to avoid naming conflicts with other control nodes in the system.

This renames the associated show/store functions and updates all references
to maintain the same functionality through the new more specific node name.
The camera diagnostic control interface is now accessible through
/sys/devices/platform/.../camera-diag/diag_control instead of .../control.

Bug 5225858


Change-Id: I5ce96d6d981354f7af9edc7495cf9eef6ba1fdb6
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3345338
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
2025-07-24 10:19:19 +00:00
Janardhan Reddy
d4def4008d nvscic2c-pcie: Fix Top25 CWE CERT-C violations
Fix total 8 Top-25 CWE violations of below CERT-C rules:

1) CERT STR07-C - 4
cert_str07_c_violation: Using unsafe interface strcpy instead of
strcpy_s for string manipulation.

2) CERT EXP34-C, FORWARD_NULL - 2
var_compare_op: Comparing drv_ctx to null implies that drv_ctx might be
null. cert_exp34_c_violation: Dereferencing null pointer drv_ctx.

3) CERT INT30-C, CERT INT08-C - 2
cert_int30_c_violation: Unsigned integer operation (*msg).data - 7U may
wrap.

Bug 5238880

Change-Id: I481f61f5c96407f90da51f9878ff55cbb61b1699
Signed-off-by: Janardhan Reddy <jreddya@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3340682
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Deepak Kumar Badgaiyan <dbadgaiyan@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:19 +00:00
Narayan Reddy
ebfb82a4c1 nvethernet: correct return val check of get_avb_perf
issue: return value of get_avb_perf of avb_perf command
is checked against non zero value which is incorrect

fix: get_avb_perf always return non zero value based on
avarage bits per second, so modified the check accordingly

Bug 4778785

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I142445491cc617773d5659067690426a98843a33
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3350515
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:19 +00:00
Chris Dragan
6db615e47a misc: mods: update mods driver to 4.31
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Change-Id: I41439d9268c2307bddf6f396db299ab937084d69
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3351803
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:19 +00:00
Johnny Liu
5fc58123c7 hwmon: ina232: introduce ina232 oot driver
Example of information reading from hwmon sysfs interface:

generic_atv_int:/sys/class/hwmon/hwmon0 # grep "" *_input
in0_input:1345
in1_input:24092
curr1_input:268
power1_input:6437376

generic_atv_int:/sys/class/hwmon/hwmon0 # grep "" shunt_resistor
5000

The unit of each node follows the ina2xx ABI specification:
https://elixir.bootlin.com/linux/v6.1/source/Documentation/hwmon/ina2xx.rst

Bug 5060737

Change-Id: I6b9066206c95fc32fd90506b1233d1d5feb6c854
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348715
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
2025-07-24 10:19:19 +00:00
Sanjith T D
930192b47f vblk:mtd: Update the memory allocation
- The Linux BSP secutiry requirement "LINUXBSP70-REQ-223"
   mandates the memory to be initialized before use. So, updated
   the driver to use zero initialized memory allocation API's.
 - Removed the IVC reset done during resume.

Jira SSV-12846

Change-Id: Iac9bd11edb520584206797446b8f3a59d20b2453
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3354502
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:19:19 +00:00
Bhadram Varka
90d4d4e1c4 nvethernet: Fix IRQ type mismatch warning for common IRQ
Issue:
Kernel logs reported an IRQ type mismatch warning for
the Common IRQ, as it was assigned to the Ethernet server.

Fix:
Skip reading and requesting the Common IRQ when virtualization
is enabled.

Bug 5248491
Bug 5091879

Change-Id: I54d145b2f1c1dfbc42a0e0d2f686f1bb085119c4
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341674
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
2025-07-24 10:19:19 +00:00
nanwa
1e36fa1086 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit 52e76e5680447 ("Map only PVA's syncpoints as R...")

Changes since last deployment:

- Map only PVA's syncpoints as RW
- fw: treat unregister resource ID 0 as noop
- Fix tegrastats issue that mixes two reads together
- Delpoy VPU ELF files to tegra tree
- kmd: bugfix: check if ctx inited before async ops

Change-Id: Ife641b1a27580e6f74f2b6e806eebc6750f3f846
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3354736
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:19 +00:00
Ketan Patil
c85efbe2a7 video: tegra: nvmap: Change data type of addr to u64
In android ATV build, userspace is 32 bit while kernel is 64 bit. Hence
value of NVMAP_IOC_CACHE differs on userspace and kernel space side,
as we are using unsigned long data type for addr field. The unsigned
long resolves to 32 bit in userspace while 64 bit in kernel space. Use
u64 data type which will always resolves to 64 bit.

Bug 5111364

Change-Id: I392146e71f7d65ba047ee2dda0d69dd202370968
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348602
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:19 +00:00
Mohit Ingale
a8bff2c6e5 camera:kmd replace WARN/WARN_ON usage
Replace use of WARN or WARN_ON kernel with dev_warn to improve logging
behavior. This change ensures that error conditions are reported with
clear informative messages rather than kernel stack traces that can
flood logs.

Additional information:
- The files `drivers/platform/tegra/rtcpu/debug.c` and
  `drivers/platform/tegra/rtcpu/hsp-combo.c` present in the original
  codebase were deleted as part of unrelated refactoring in the
  target repository; hence, changes related to these files in the
  patch were not applied.
- Additional changes are done to replace WARN_ON at other places.

Bug 4719119

Change-Id: Id12f1b4de77f8b007b557de140257a3bd7478b52
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/3308911
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3352892
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:19 +00:00
Mohit Ingale
15b054f417 rtcpu: Add power management support to camera-diagnostics driver
Added suspend and resume functionality to the camera-diagnostics driver
to properly handle ISP SDL diagnostics during system power transitions.
This ensures that diagnostics are stopped before system suspend and
restarted after resume if they were running before.

Jira CAMERASW-33531

Change-Id: Ic52fe91e0cfcc2a3138cacd8433e3b5a644378e4
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3344684
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Robert Kelly <rkelly@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
2025-07-24 10:19:19 +00:00
Jon Hunter
04b1b44e81 media: camera: Use conftest for CSI2 config
In Linux v5.18, commit 20c238dfb26c ("media: v4l2-mediabus: Drop legacy
V4L2_MBUS_CSI2_*_LANE flags"), commit 5a6ac3f4b46f ("media:
v4l2-mediabus: Drop legacy V4L2_MBUS_CSI2_CHANNEL_* flags") and
commit b9f7caa7753a ("media: v4l2-mediabus: Drop
V4L2_MBUS_CSI2_CONTINUOUS_CLOCK flag") removed various CSI2 flags.
Out of these flags we only need to set the number of lanes. The other
flags are redundant. The configuration was moved by
commit 94d964e58ad6 ("media: v4l2-fwnode: Move bus config structure
to v4l2_mediabus.h") to the structure v4l2_mbus_config_mipi_csi2
which itself is under the structure v4l2_fwnode_endpoint. Use conftest
to detect if the structure v4l2_mbus_config_mipi_csi2 is present and
avoid using kernel version checks.

Bug 4425688

Change-Id: Icd597492e48831326c203a6556176ac3767472a3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3354475
(cherry picked from commit 2f83033498)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3354638
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:19 +00:00
spatki
3b9dbf3106 tsec: Changes to the tsec kmd wrt t264
This change makes the following changes to the tsec kmd to get it
working on t264.

- Add compatible property for t264
- Update dma mask bits for t26x

Jira TSEC-14

Change-Id: If9fe7498f38018a2fed461281aa02865e6db5e7d
Signed-off-by: spatki <spatki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341847
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-by: Byungkuk Seo <bseo@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2025-07-24 10:19:19 +00:00
Junghyun Kim
7b863e3e09 kernel: cdi: Update fsync logic
CIM version 3 for Ferrix is added in DT which can be used to select
GPIO port number of IO expander to control the multiplexer for
each deserializer

Bug 5163582

Change-Id: I3ce608be9f5c18af005e1bc6fea9c73daeef7995
Signed-off-by: Junghyun Kim <juskim@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3342728
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Chinmay Mahajan <cmahajan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:19 +00:00
Sanath Kumar Gampa
efd43d9c76 nvethernet:split macsec_sa_state_lut 2 sysfs nodes
Issue: Observed KSAN bug when using both Tx and Rx sa_state luts in a
single sysfs Entry as the data is not within the PAGE_SIZE

Fix: Split the sa_state_lut to 2 entries different for Tx and Rx

Bug 5178711

Change-Id: Id6929abae263622b02c00cef459e974661b5f1bc
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3334987
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Nan Zhang <nazhang@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
2025-07-24 10:19:19 +00:00
Mohit Ingale
41bf84e591 tegra: fsync: Fix tick calculation for freq generation
Use DIV_ROUND_DOWN_ULL consistently for frequency calculations to match
QNX implementation. For 30Hz signals, reference ticks were calculated
as 1041667 for a value of 1041666.67, while QNX correctly uses 1041666.

When generating precise frequencies, this rounding difference affects
how extra ticks distribute across periods (covering the 0.67 gap over
3 periods). The QNX implementation works correctly because it rounds down,
while the Linux implementation was rounding up.

This change ensures proper fractional tick distribution and prevents
signal drift over time for frequencies that aren't exact multiples of
the TSC clock unit.

Bug 5223558

Change-Id: I5fbeafd1e37c92fe95f2f3605d1ae225eacb88c8
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348278
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: Ian Kaszubski <ikaszubski@nvidia.com>
2025-07-24 10:19:19 +00:00
Jon Hunter
c9abbd16c0 ufs: tegra: Simplify headers
Depending on kernel version the Tegra UFS driver includes different
headers to build the driver. Now that Linux v5.x kernels are no longer
supported, we can simplify this. Simplify the headers for the Tegra UFS
driver as follows ...

1. For Linux v6.x kernels only the ufshcd-priv.h and ufshcd-pltfrm.h
   headers are required. These headers are copied from the Linux kernel.
   However, only the prototypes for the functions 'ufshcd_query_attr',
   'ufshcd_query_descriptor_retry' and 'ufshcd_pltfrm_init' are needed.
   The functions 'ufshcd_query_attr' and 'ufshcd_query_descriptor_retry'
   have not been change since they were introduced in Linux v4.17 and
   the function 'ufshcd_pltfrm_init' was last updated in Linux v6.1
   (making the ufs_hba_variant_ops argument const). Although redefining
   the prototypes outside the kernel is fragile and does not protect the
   Tegra UFS driver from updates to these functions, this problem
   already exists.
2. Move the files ufshcd-pltfrm.h and ufshcd-priv.h into the Tegra UFS
   driver directory because these are not needed outside of the driver.

JIRA LINQPJ14-47

Change-Id: I3891bf756723f730f036637891c55090b5d2a384
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3349825
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:19 +00:00
Jon Hunter
b8e8f99bbd ufs: tegra: Remove legacy headers
Linux v5.x kernels are no longer supported and so remove all the legacy
UFS related headers for these kernels.

Bug 3978622
JIRA LINQPJ14-47

Change-Id: I6e514305d30f93d74bd75fc335db69ced79b3866
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3349975
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: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:18 +00:00
Jon Hunter
b3c970d8f9 drivers: Remove unused headers
Remove all the unused headers.

Bug 5054840

Change-Id: I4b441c6cb39025aa0c9d35c6f0f597ada5b1882b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3349974
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Khushi
3e98bab231 vse: Add keyslot management related changes
JIRA ESSS-1834

Signed-off-by: Khushi <khushi@nvidia.com>
Change-Id: I5276228f9e1f42c945336e641f5180777ccf9006
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3318026
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: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:19:18 +00:00
Manish Bhardwaj
025c3b6b37 nvidia-oot: set the nvlog mode with read only permission
Bug 4997347

Change-Id: I7823b318a932877647243852af36649fb563090e
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3351170
Reviewed-by: Sumeet Gupta <sumeetg@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:18 +00:00
Manish Bhardwaj
381d88e597 nvidia-oot: don't set nvlog & mempool buffers as executable
Bug 5248920

Change-Id: I89ac129953aa312f30d11f721c0ab8255e515af2
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3350549
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:18 +00:00
Saravanan Ponnuswamy
45b9d2ed87 nvdisp_serdes: Fix CERT ARR30-C
- This patch fixes the following CERT violation
   CERT ARR30-C - 3
     (CID - 6388489)

   - Passed the priv->client directly

 - JIRA TDS-15862

   CERT ARR30-C:
     __mptr - 32UL evaluates to an address that
     is at byte offset -32 of an array of 848
     bytes

Change-Id: If513c6d718019d50d9a19bdd864650be9ed45bfd
Signed-off-by: Saravanan Ponnuswamy <saravananp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3344668
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
2025-07-24 10:19:18 +00:00
Sanath Kumar Gampa
7fec719a7c nvethernet:Move blocking MACSec in PHY to server
Removed the below functionality from Linux OSD as we moved
the same to ethernet server to avoid implementation in QNX OSD

- Restrict enabling MACSec in PHY

Bug 5221921

Change-Id: I0cbdeccfe91a67060a4609b9b8bc2bf842547b99
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341020
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Mainak Sen
d3e0d8bb36 nvdla: Replace deprecated syncpt API in EMU driver
This commit replaces the deprecated nvhost_syncpt_unit_interface_init()
and other related deprecated nvhost syncpoint functions
in nvdla_sync_syncpt_emu.c with direct implementations
using the host1x API

Key changes include:
- Added a local nvhost_syncpt_interface structure definition
- Replaced nvhost_syncpt_unit_interface_init()
   with direct initialization code
- Added nvdla_syncpt_address() function to replace nvhost_syncpt_address()
- Updated nvhost_syncpt_put_ref_ext() -> host1x_syncpt_put()
- Updated nvhost_get_syncpt_host_managed() ->
   host1x_syncpt_alloc() + host1x_syncpt_id()
- Updated nvhost_syncpt_incr_max_ext() -> host1x_syncpt_incr_max()
- Updated nvhost_syncpt_read_maxval() -> host1x_syncpt_read_max()
- Updated nvhost_syncpt_is_expired_ext() -> host1x_syncpt_wait()
- Updated nvhost_syncpt_set_min_update() ->
   host1x_syncpt_read() + host1x_syncpt_incr()

Bug 4921461

Jira HOSTX-5971

Change-Id: Ief353770bfcf87ef48abcc598f5ca84bcf72bd22
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330688
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
2025-07-24 10:19:18 +00:00
Ankur Pawar
9597e077cd media: camera: remove t194 from nvcsi driver files
Refactor nvcsi driver files to replace t194, with
more general name. Modify the makefile as well
As t194 on dev-main is deprecated as a platform.

Compatible string "nvidia,tegra194-nvcsi" remains
to maintain backward compatibility and avoid any
device tree changes.

Bug 3790154

Change-Id: Iad742dfc75430a9b74bf9d03bf5e89c0912eeab1
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313179
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:18 +00:00
Nagaraj P N
c01b5d0614 vse: add error prints for nvlog
Add error prints to adhere to nvlog guidelines.
Also, expose ivc config params via new dev node.

Jira ESSS-1835
Bug 5225204

Change-Id: I39da948ad3debdac84aa4065979dda598985deef
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3344527
(cherry picked from commit a14445ab406720469551eecb713d1f19dca845c7)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3336143
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:19:18 +00:00