4541 Commits

Author SHA1 Message Date
nanwa
33227347c8 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit 0d38bbb765943 ("Revert "deploy: Update NvSCI p...")

Changes since last deployment:

0d38bbb7: Revert "deploy: Update NvSCI path in tegra tree"
2201a3ec: Revert "deploy: update nvidia-oot path"

Forked changes (dropped):

54b5ea83: Revert "deploy: Update NvSCI path in tegra tree"
1d42b346: Revert "deploy: update nvidia-oot path"
5819cf8b: Fix Misra defect of type 5.1
d9561abf: Fw: Fix Misra defects
ec8941c0: coverity: Qnx safety upload job timout increase
66fb1410: Fix pva_waiter_thread_func in umd tests.
0f06989c: Misra defect fixes in QNX KMD
76532814: Static defect fixes
1cbd5a36: Fix Misra defects
0deee89b: Fix misra defects
60335a28: Fix Misra defects
dbd5301d: Port pva_intf_test to pva_umd_tests
Change-Id: Ia830a1095993ca863ed649b44bd3d3930894389c
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3508954
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shaurya Garg <shauryag@nvidia.com>
rel-38_eng_2025-12-16
2025-12-10 12:57:29 -08:00
nanwa
058eca0e23 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit 54b5ea8396784 ("Revert "deploy: Update NvSCI p...")

Changes since last deployment:

54b5ea83: Revert "deploy: Update NvSCI path in tegra tree"
1d42b346: Revert "deploy: update nvidia-oot path"
5819cf8b: Fix Misra defect of type 5.1
d9561abf: Fw: Fix Misra defects
ec8941c0: coverity: Qnx safety upload job timout increase
66fb1410: Fix pva_waiter_thread_func in umd tests.
0f06989c: Misra defect fixes in QNX KMD
76532814: Static defect fixes
1cbd5a36: Fix Misra defects
0deee89b: Fix misra defects
60335a28: Fix Misra defects
dbd5301d: Port pva_intf_test to pva_umd_tests
d2e0b878: fw: Fix CCM violations in DMA cmds
f4bc3069: Misra fixes in QNX KMD
f07460f1: fw: Make pva_fw_bm_sections.h private include
cf3c9eaa: pva_fw: prevent interrupt storm on print flush
8d11e690: tests: tag tests with negative and long_duration
e2c592dc: Add dmesg checks for non-negative UMD tests
c162d5d4: deploy: fix scatter file dependency
920f6439: tests: Mark negative tests with prefix negative_
bf855422: fw: Fix abort message overflow
00fa97d6: fw: refactor: remove unused or empty files
34d3f41f: fw: refactor: use _init_ in boot unit file names
ca0dfd16: fw: refactor: clean-up function scopes
8215ec86: Static defect fixes(Misra 10.3, CERT INT31-C)
4ffaaf80: Static defects in QNX KMD
0a8af77b: kmd: DMA validation disabled for test_mode
21063625: perf: add new perf metrics
38532a9b: ci: exclude pva_fw_bm_sections.h from checkpatch
19adcb9a: fw: refactor baremetal v3 folder
f03503ba: fw: refactor baremetal wdt folder
6530b0f1: fw: refactor baremetal utility folder
46c373fb: fw: refactor baremetal pe folder
4c3e2ccf: fw: refactor baremetal hal folder
f0f2e0d3: fw: refactor baremetal dma folder
b95e6512: fw: refactor baremetal boot code
9a8552c6: Static defect fixes
7377ba1c: coverity: fix coverity file permissions
79437d05: coverity: upload cert data for non safety
b9d4eb16: pva: Update allowed state APIs in UMD
7ea85e62: Fix static defects pfsd part 3
d83d03fc: fw: Refactor switch-case statements
d562a635: fw: Fix MISRA violation
040a1a29: Update CI/CD pipeline builds
d88e3378: fw: fix static defects in l2sram changes
d6c0b729: Increasing SIM timeout
f34c1707: L2SRAM Bug Fix
d8ea3fe5: fw: Fix MISRA defects (10.3, 10.4, 1.5)
d585b0f9: tests: Port Security Checks from V2
ef70bab8: Port interaface ests to pva_umd_tests
188fbbed: Misra Violation Fixes
421c1fc0: Static defects in QNX KMD
b0cddda4: cmake: Fix cupva build
af5d307d: Fix GENERIC_CLOCK_FRQ & eventlib_write call, others
849a4a9e: fw: remove PE interrupt log print
da3c1a16: PVA: export pva_get_api_restrictions umd library
884c1617: Standardize baremetal src code
b9ea40ac: Re-enable the tests filtered out in the bug
4016fbaf: fw: Move R5 OCD code to DRAM
d50803b1: fw: Fix CERT defects
6b699175: dvms: Update the public API for DVMS state
c5b550bc: cmake: fix precedence of CLI arg
20af216d: docker: update coverity license
33a28dbd: Fix MISRA 10.4 defects in QNX KMD
187b4414: Fix static defects in pfsd change
91cea667: ci: Add Parallel SQA Stress Test Pipeline
ec8d5f6a: Fix MISRA defects in QNX KMD
b8dd4b72: Fix static defects in pfsd change
98b52770: Port the following pva_intf_test to pva_umd_tests.
2e8e48b0: Updates in QNX KMD: MISRA Fixes
ca4a4e47: Update elfs to fix PPE parity error
c1e97e29: Fix CERT defects in QNX KMD
9f012192: fw: Fix static defects
0434d413: Update deploy script to use PROD and DEV profiles
79c141a3: kmd: bugfix: enforce ctx init for sync ops
c2d19878: fw: Fix Cert defects
2ef3651b: fw: Fix CERT defects
668e92f6: Update device probe in Linux KMD
96c4c365: Fix FW error printing for baremetal
10e76b98: Port the following interface tests to umd tests.
01e68097: Enable pva_fw_utests in CI/CD.
e7928a62: Fix CERT defects in QNX KMD
82af1ecb: tests: mark negative UMD tests with prefix
72400087: kmd: fix incorrect log level
d5d1ac35: Update kernel API class_create
72e01b15: deploy: Add nvplayfair to tests template
1237841a: Add pfsd support
6c481474: Update tests and CI for safety builds
88346e94: Add PROD, DEV and INTERNAL build profiles
872f814f: Add build flag for Tegrastats
2ea9c786: Add build flag for MODS test support
4cb0c338: Add build flag for error injection
4d530991: Add build flags for FW profiling and tracepoints
4a02d022: Add build flag for debug prints
fc2aa7aa: Add build flag for VPU OCD (DOIP)
5ccf9d23: Add build flag for HWPM
c69dc657: Add build flag for golden reg checks
21529167: fw: Fix Cert defects
80e032c9: fw: Fix CCM violations in FW cmds
e170cc47: fw: Fix L2SRAM CCM violation
02b82f60: Fix QNX KMD Misra Violations
6594180b: fw: Fix CCM violations
b34f050d: umd: Misra Dir 4.7 defects fix
7a5d7f74: umd: Fix CERT and Top25 defects
7d49aeea: umd: Fix cert INT31 INT34 INT36 defects
aaef325b: fw: Fix dma cmds CCM violations
a1bcadcd: Fix HWPM base address and init failures
437bdeec: Cleanup device probe and wrapper indirections in Linux kernel
0bd92f89: fw: Fix CCM violations
9c01c5c2: fw: Fix L2SRAM CCM violations
25d314fe: doxy: Update Doxygen comments to make it more generic
cfd6fcbe: KMD: Added documentation for common
e7b93f9a: doxy: Add Doxygen to all KMD shim APIs
da32cbea: doxy: Add Doxygen comments for KMD QNX files
5e22bb15: ci: Reduce test iteration count
2a91d9e5: ci: Remove testing for debug build
b56ead62: fw: Fix pe CCM violations
1ac4c005: fw: Fix DMA CCM violations
e223d5ee: fw: Fix PE CCM violations
75d229cc: Improve error path for FW coverage dump
2d5be991: Do not use GSC when testing in CI
c81f3b72: dedicated coverage tests script
8e8ab336: ci: Add firmware vectorcast build to CI
eb7ea48d: vcast.py: Add firmware support
f3e344af: Add vcast build + test to CI
8e5db8ba: Add vectorcast support
5bc91a84: Add vectorcast to docker image
02d82e46: Fix KMD Misra Rule 10.1 violations
e2386c0c: Dump PVA FW Coverage
3996decf: umd: Fix CERT and MISRA defects
d9fe5c5d: Add QNX SR support in CI/CD
d1c991a9: pva: coverity 7.2 release update
754c74ec: Port the following intreface tests to umd tests
25fe8a38: pva_fw: Setup DMA to also support memcpy
4f9d9f79: fw: Fix basic MISRA defects
62393350: umd tests: add perf test
ae2fbfa3: libs: Fix mul overflow CCM violation
0cbfa44f: Update VPU apps
e86a22ee: Fix Vpu error tests
435a16ea: ci: Modify Interface Test filter
1953f2d7: Port the following tests
90ac41ef: Implement synchronous memory unregistration
e29aaead: kmd: Fix DVMS CCM violations
7a46bc75: kmd: Fix hwseq validate CCM violation
3d8691cf: libs: Fix CCM violation in muls64 helper
98ca3972: kmd: Fix shared buffer CCM violation
4ba27920: kmd: Fix devctl CCM violations
640a7d58: perf: Fetch asl binaries for linux perf tests
4f25e30d: pva_fw: Add fast dma setup for transfers
3a73eb6c: kmd: Fix CCM violation in kmd context
72de95cf: kmd: Fix CCM violations in qnx_main and silicon exec
200a0fe6: ci: Remove checkGitlabJob.py
8bd635ce: coverity: Upgrade versions of Coverity and MISRA config
9c44087f: fw: Isolate VPU HW state reading retries
bee65065: kmd: Log error at the correct level
a5e9570a: deploy: Consider forked branch for commit message
91f1ceb4: tests: Fix VPU OCD expected value
7742f0ae: Add testing support for qnx nsr thor in CI/CD.
0ec69957: umd: Fix basic MISRA defects
beac9313: pva: update _PULSE_CODE_COIDDEATH handling
46192073: doip test: Add test to r/w to CSITE reg
accb2184: kmd: Fix dma_cfg_validate CCM violations
6da720c1: kmd: Fix misc CCM violations
e73779dc: Integrate PVA QNX KMD with DVMS Framework
4556b3f3: kmd: Fix op handler CCM violation
59da12ec: kmd: Fix CCM violation in DMA binding
3404ab99: pva_kmd: Fix a double free static defect
f99ff7c0: umd: Fix CCM Violations in queue_create and cuextend impl
d41fe841: pva_fw: Fixed unsigned type mismatch issues
dbc71f66: Port the following pva_intf_test to pva_umd_tests
b871295e: Change FAILED to failed
fe5c0ec3: ci: Unload default KMD driver on launch
0744de61: Skip duplicated memset in pva_fw_init_cmd_runner
c482932e: Update UMD export file
7f68160f: Fix parallel_scheduling_test_SingleProcessOnly
a869d997: Add VPU return code to context error struct
65108714: fw: Fix macro based type mismatch
3c28728e: Update tests affected by context error
fa208034: Add string representation of context error
71c91d38: umd: Fix nvsci import CCM Violations
6b7c1c05: Remove foreign syncpoint wait support
e512f5d4: Remove qnx/src path from deployment
63cce5ea: cursor: Update prebuilt image path
c14e51d5: docs: Add docs for async error handling
f90d047b: Implement asynchronous error report
5e9eb1f0: umd: Fix Data Channel CCM violation
1cdb79ed: umd: Fix CCM violations in NvSci export and image functions
87592b3f: ci: remove tcu_muxer support
fbf18cdb: DOIP: Fix overflow in Linux
b075f8cf: umd: Fix CCM violation in pva_context_create
a68a617a: Increase timeout value to handle big queues
fb356df3: KMD: Add support for DOIP in QNX
d560be9a: ci: support to track pva solutions algo perf
52111da4: umd: Fix CCM violation in cuextend_validate_memory_unregister
2f05b223: umd: Fix CCM violations in CUExtend memory register functions
c4803585: coverage: add umd code coverage support
3ed84a70: coverity: support safety build for qnx and baremetal
61cbe299: pva: fix static defects
5d07da65: Remove unused fields in UMD context
9f5a2654: Add foreign syncpoint waiter
4e388d3b: Remove limit on concurrent syncpoint wait
ab7e9bc8: nsight: update fence tracepoint
109a7368: nsight: Disable nsight support in safety builds
c9a66b30: nsight: fix engine reservation tracing
13024df9: nsight: clean-up and rename several fields
20cb20cb: nsight: Support redesigned tracepoints on QNX
ab55d48a: nsight: redesign tracepoints for V3 stack
7d6c1630: ci: install xxd tool for build env

Forked changes (dropped):

b2843456: pva: fix static defects
11700626: Revert "Remove WAR of skipping symbol type check"
121b314d: Revert "native: Add symbol type check for native"
b389a5fe: Revert "deploy: Update NvSCI path in tegra tree"
d240f306: Update pva_umd_host_misc.c license
78929b03: Revert "deploy: update nvidia-oot path"
7012c123: Remove unused fields in UMD context
4b7d4634: Add foreign syncpoint waiter
fdb28e8e: Remove limit on concurrent syncpoint wait
Change-Id: I5610d6936207a780668a391f4f7fea0a4cd685dd
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3508228
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-12-09 22:02:15 -08:00
Jon Hunter
005042f3eb crypto: tegra: Update crypto_engine_ctx handling
In Linux v6.6, the crypto_engine_ctx structure was removed and the
crypto_engine_ops was moved from this structure to the crypto_alg
structure. The Tegra Security Engine driver was updated accordingly to
populate the crypto_engine_ops in the appropriate structure depending
on whether the crypto_engine_ctx structure is present or not.

Currently conftest is using the presence of the crypto_engine_ctx
structure to decide where to populate the crypto_engine_ops. While
this works, it is possible that a kernel older than v6.6 also includes
a backport of commit e5e7eb023f24 ("crypto: engine - Move
crypto_engine_ops from request into crypto_alg") that moves the ops
to the crypto_alg structure. Although backporting this commit alone
should not cause any problems, it is better to detect if this commit
is present rather than relying on the presence of crypto_engine_ctx
structure.

To detect the presence of commit e5e7eb023f24 we can simply detect if
one of the functions added and exported by this commit is present.
For example, the function crypto_engine_register_aead() was added and
exported by this commit. Therefore, update conftest to detect if
commit e5e7eb023f24 is present and then update the Tegra Security
Engine accordingly.

Bug 5564561

Change-Id: I3f7688e6e954a158094a9a2fdf73354f765ed680
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3499816
(cherry picked from commit c1631d32f8d80cd31f54e7297c542f308a281d25)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3508186
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-12-09 16:56:58 -08:00
ChunHao Lin
bc32d4b5bd nvidia-oot: r8168: print GPL_CLAIM with KERN_INFO
Add KERN_INFO log level for GPL_CLAIM to downgrade warning messages

Bug 5544210

Change-Id: Ifa6699ecdc49550c7b6b4c44510bda066b9c2a3d
Signed-off-by: ChunHao Lin <hau@realtek.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3503785
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-12-09 10:58:23 -08:00
ChunHao Lin
343e19646d nvidia-oot: r8126: print GPL_CLAIM with KERN_INFO
Add KERN_INFO log level for GPL_CLAIM to downgrade warning messages

Bug 5544210

Change-Id: If1773f0cdfe75c3a166efc461878ac32ce35d457
Signed-off-by: ChunHao Lin <hau@realtek.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3503784
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-12-09 10:58:17 -08:00
Jon Hunter
56068ded4d media: i2c: max967xx: Fix build for pre Linux v6.3
In Linux v6.3, commit 03c835f498b5 ("i2c: Switch .probe() to not take an
id parameter") removed the ID parameter from the I2C probe function. The
max96712 does not build for Linux kernels prior to Linux v6.3 because it
assumes that the ID parameter has been removed. There is an existing
conftest that checks to see if the probe function requires and ID
parameter and so update the max967xx drivers accordingly to fix the build
for kernels prior to Linux v6.3.

Note we should avoid using explicit kernel version checks in out-of-tree
drivers because this does not work for 3rd party kernels. Therefore,
remove the kernel version.h because this is not used or needed.

Bug 5277201

Change-Id: Idbc569d782a952ee9ea0a91aace54df20f50701d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3506342
Tested-by: Shawn Bai <xueyuanb@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shawn Bai <xueyuanb@nvidia.com>
rel-38_eng_2025-12-05
2025-12-08 06:12:28 -08:00
Shawn Bai
2e202467e3 [MAX96712][MAX96726]support RAW10 and RAW16 to ToT
Bug 5277201

Change-Id: I0d402e7d26b700f78e3a5ce4a461b33f4f2cda1c
Signed-off-by: Shawn Bai <xueyuanb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3458947
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-12-05 05:09:51 -08:00
Shawn Bai
ef3128dda2 [MAX96712][MAX96726]add max96712/726 TPG driver
max96712, run in fixed configuration
    1. resolution: 3840x2160
    2. FPS: 30
    3. data rate 1900Mbps
    4. pixel format: RAW10
    5. PHY mode: DPHY 4Lane

max96726, run in fixed configuration
    1. resolution: 3840x2160
    2. FPS: 30
    3. data rate: DPHY 2500Mbps, CPHY 4500Msps
    4. pixel format: RAW16

Bug 5060621

Change-Id: I0ab8139f3b8e4756b7558653ea516e5fbc2f719d
Signed-off-by: Shawn Bai <xueyuanb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3447885
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
2025-12-05 05:09:36 -08:00
Shawn Bai
38e2452efc [Camera]polarity swizzle, clk settle, shmoo en
in modeX prop in dts,

   lane_polarities = <0 4 0 4>;

   cil_clksettletime = "10";

   shmoo_enable = "true";
   afe_hf_gain = "6";
   edge_delay = "3";

Bug 5277201

Change-Id: If0c8202ed2703b7e484bf981982a71a0ed09bf06
Signed-off-by: Shawn Bai <xueyuanb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3447880
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
2025-12-05 05:09:29 -08:00
Aditya Bavanari
8ff86d20ee ASoC: tegra: Fix ret in dpcm_runtime_set_dai_fmt
- snd_soc_dapm_dai_get_connected_widgets returns
number of valid paths which is being returned
as an error code to the mixer control put callbacks
of codec master mode and frame mode controls leading
to them not set properly.
- If the master mode mixer control is set before the
frame mode control, this issue will not be observed
as the fmt value is still updated in hardware. User
space though, will show a wrong value.
- Internal I2S loopback failed in Android sanity
as the frame mode control is set before
the master mode.
- Modify the return value to 0 if it is >0
to fix this issue.

Bug 5705385

Change-Id: I6662057503b9d5be6b71dfdb219334267ea9b9bc
Signed-off-by: Aditya Bavanari <abavanari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3503844
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Sheetal . <sheetal@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sheetal . <sheetal@nvidia.com>
2025-12-03 05:57:59 -08:00
Sheetal
f2c7bd17be ASoC: tegra: Fix memory leak in OOT machine driver
Fix a memory leak in the NVIDIA Tegra ASoC machine driver where
allocated DAPM widget lists were never freed. The function
dpcm_runtime_set_dai_fmt() calls snd_soc_dapm_dai_get_connected_widgets()
which allocates memory for a widget list, but was returning without
calling snd_soc_dapm_dai_free_widgets() to free this memory.

The leak was detected by kmemleak:
  unreferenced object 0xffff00008fc7e300 (size 192):
    comm "alsactl", pid 812, jiffies 4294900395
    backtrace:
      kmemleak_alloc+0xc0/0xe8
      __kmalloc+0x2e0/0x4c8
      snd_soc_dapm_dai_get_connected_widgets+0x108/0x2a0

Fix this by using snd_soc_dapm_dai_free_widgets() on
success or failure to ensure the widget list is always freed
before returning.

Bug 5667057
Change-Id: Ied69968884fc0646a3041e54427736ff1fc232ac
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3500426
(cherry picked from commit 14b3fc2296967968d5972054bff38cf1bf4b518e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3502770
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-12-03 05:57:54 -08:00
Jon Hunter
42b3ff7b23 tty: wch: Disable informational prints
When loading the WCH driver on IGX platforms the various information is
printed to the kernel log using printk. However, because no level is
specified in printk statements, the prints appear as warnings even
though they are informational. The WCH driver implements some
definitions to enable/disable prints and so wrap these informational
prints with WCH_DBG so that they are disabled by default.

Bug 5699474

Change-Id: Ic1426ceab94cd457a1ebdfb57a55ff305ad58ff9
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3500555
(cherry picked from commit c3a03860ada48533d2f81bf33ada02c44d079d9f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3502173
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
rel-38_eng_2025-11-25
2025-12-01 08:42:27 -08:00
Wayne Wang(SW-TEGRA)
f0d6883945 nvethernet: add mutex lock for osi mdio
There is chance to hit race condition when doing mdio read/write from
different application.

This would lead to PHY not work properly intermittently.

Bug 5211090

Change-Id: I62afbc1d206fd4cf02a0b58036e8d38ca84968ac
Signed-off-by: Wayne Wang(SW-TEGRA) <waywang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/3453343
(cherry picked from commit 1442bbd24a8fe0423fc67b5b004b2a07d604c109)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3479480
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-11-25 23:57:26 -08:00
Johnny Liu
4d81ee0f63 drivers: video: Remove emc clock management
EMC clock is not intended to be managed by the kernel/ccplex. It is
completely managed by the BPMP BWMGR driver.

Remove outdated code that touches emc clock directly, and fix the NULL
pointer dereference issue.

Bug 5622903

Change-Id: Ied1b6aaceaa026f954917b4b46f47dece1521d62
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3487187
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-by: Akihiro Mizusawa <amizusawa@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-11-25 19:42:09 -08:00
fraunak
59fa283238 camera: Add ISP floorsweeping support to Linux
This commit implements T264 ISP floorsweeping functionality in the Linux
kernel driver, extending the existing RCE firmware implementation to
provide transparent ISP unit redirection at the kernel level.

Changes:
- Add isp_capture_query_availability_mask_probe() function to query ISP
  availability mask from RCE firmware during driver probe via IVC
- Add isp_capture_find_first_available() helper function to find the
  first available ISP unit from a bitmask for HW assignment
- Integrate floorsweeping logic into isp_get_nvhost_device() to handle
  SW-to-HW ISP unit mapping with thread-safe assignment
- Add isp_capture_get_capabilities() function to expose ISP availability
  to userspace via new IOCTL (ISP_CAPTURE_GET_CAPABILITIES)
- Add probe-time caching of ISP availability mask to avoid repeated IVC
  queries during runtime
- Add comprehensive error handling and safety mechanisms for unknown
  configurations

Implementation details:
- Uses CAPTURE_ISP_FUSE_QUERY_REQ/RESP IVC messages for querying RCE
- Maintains SW-to-HW ISP unit mapping array protected by mutex
- The SW-to-HW mappings persist for the driver's lifetime, given that
  multiple channels make use of the same SW unit ID's and we do not
  have tracking of all open channels during runtime
- Integrates with existing ISP setup flow before buffer allocation
- Maintains backward compatibility with non-T264 hardware
- Conservative approach: blocks requests when no ISP units are available

Floorsweeping logic (handled by RCE firmware, exposed as bitmask):
- Mask bit N set = ISP N available (not fused off)
- Mask bit N clear = ISP N fused off (unavailable)
- Examples:
  - 0x3 (0b11): Both ISP0/ISP1 available (no floorsweeping)
  - 0x1 (0b01): Only ISP0 available → all requests map to ISP0
  - 0x2 (0b10): Only ISP1 available → all requests map to ISP1
  - 0x0: No ISP units available (block all requests)

Benefits:
- Transparent operation for applications using fusacapture library
- Automatic ISP unit redirection without API changes
- Improved hardware yield by supporting single-ISP configurations
- Robust error handling and safety mechanisms
- Minimal performance overhead with probe-time caching

The implementation complements the existing RCE firmware floorsweeping
support and provides a complete end-to-end solution for T264 ISP
floorsweeping across all software layers.

Bug 5640706

Change-Id: If85ee3178e857394300479dd42e636f5f5d3bd23
Signed-off-by: fraunak <fraunak@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3491180
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
Reviewed-by: Kalle Jokiniemi <kjokiniemi@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Tested-by: Akihiro Mizusawa <amizusawa@nvidia.com>
2025-11-25 13:12:39 -08:00
Shao-Chun Kao
7313487650 nv-gpu-static-pg: t264: fix null pointer of driver data
Fix the sequence in nv-gpu-static-pg probe function
to get platform driver data after set.

Bug 5516617

Signed-off-by: Shao-Chun Kao <shaochunk@nvidia.com>

Change-Id: I55c6c234a751db202c9038d7f5ee0cae7c32a5eb
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3496622
Tested-by: Shao-Chun Kao <shaochunk@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shao-Chun Kao <shaochunk@nvidia.com>
2025-11-24 05:27:49 -08:00
Shao-Chun Kao
8369748b12 gpu-static-pg: t264: support gpu pg mask BPMP MRQ forwarding
Add gpu-static-pg kernel driver to support the
BPMP GPC/TPC/FBP setting via sysfs communication
and module parameter, which allow the nvpmodel
system service to set the mask via the interfaces
above.

For nvpmodel service usecase, this driver should
be probed and the mask should be applied before
the GPU driver is probed.

Bug 5516617

Signed-off-by: Shao-Chun Kao <shaochunk@nvidia.com>
Change-Id: Id16e374c21acccd08c0c33c2df1aa909fcba5658
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3458914
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Yi-Wei Wang <yiweiw@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
rel-38_eng_2025-11-12
2025-11-20 01:27:28 -08:00
Rakibul Hassan
77a8c8c156 platform: tegra: rtcpu: ivc bus check null
Add a check before dereferencing pointer.

Bug 5597251

Change-Id: Ied1bc79ad631a44bbf9f00f497cfc6e85a62a579
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3480970
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Akihiro Mizusawa <amizusawa@nvidia.com>
2025-11-17 00:29:40 -08:00
Shaofu
e7201ee607 fix driver get Association fail with FT-SAE
WLAN_AKM_SUITE_FT_OVER_SAE(0x000FAC09) is not processed in
rtw_cfg80211_set_key_mgt, which makes rtw_ft_validate_akm_type not set
RTW_FT_PEER_EN to ft_flags, and thus MDIE is not built in
rtw_ft_build_assoc_req_ies

Fix:
- Add WLAN_AKM_SUITE_FT_OVER_SAE into rtw_cfg80211_set_key_mgt check condition
- Add 9 into rtw_ft_valid_akm check condition
- Update driver version number to 277-9-6

Bug 5580277

Change-Id: I7cc987a9141dc65577dc20e804e92def10e9412e
Signed-off-by: Shaofu <shaofu@realtek.com>
Signed-off-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3485741
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
2025-11-10 12:57:08 -08:00
Narayana Reddy P
422ec5c90a Update the revision numbers to 277-9-5
Bug 5578305

Change-Id: I3047c5d8c786afec34bee1f02b7f21128afbc70c
Signed-off-by: Shaofu <shaofu@realtek.com>
Signed-off-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3485453
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-11-07 10:58:01 -08:00
Shaofu
1b4312e37b Fixed redundant association requests when WPA3 SAE H2E authentication fails
Bug 5578305

Change-Id: I495c2311bc79b84df1a367fa9c7b89c90888ec45
Signed-off-by: Shaofu <shaofu@realtek.com>
Signed-off-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3485390
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-11-07 10:57:56 -08:00
Shaofu
188f83f47a Fixed 802.11r OTD roaming failure
Bug 5578305

Change-Id: I8db3a30e3830423212c334a9f4c8b7efdde1d480
Signed-off-by: Shaofu <shaofu@realtek.com>
Signed-off-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3485386
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
2025-11-07 10:57:51 -08:00
Shaofu
cd8063b7e1 Fixed issue where 6 GHz hidden APs could not be found on non-PSC channels
Bug 5578305

Change-Id: Ia0479d756cd64fd2a60ff563c22fdc5194954420
Signed-off-by: Shaofu <shaofu@realtek.com>
Signed-off-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3485380
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-11-07 10:57:46 -08:00
Shaofu
fef3efa9d1 Ensure disconnect indication after roam command failure
Bug 5578305

Change-Id: I2f8caaa18b3220285182f30774d6246dd4557cca
Signed-off-by: Shaofu <shaofu@realtek.com>
Signed-off-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3485374
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-11-07 10:57:41 -08:00
Shaofu
5f08e6dabd If ROAM CMD (wpa_cli roam), do scan if bssid not found even in busy traffic
Bug 5578305

Change-Id: I92c794dee4c3a6a01589c05570eb227f0e2730dd
Signed-off-by: Shaofu <shaofu@realtek.com>
Signed-off-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3485372
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-11-07 10:57:36 -08:00
Shobek Attupurath
56fe2c567d rtl8852ce: Add Nvidia changes to driver v277-9
- Reduce log level
- Remove unwanted prints
- Add Nvidia sourcetree path

Bug 5504994

Change-Id: I243236f586b0ee62161d7a4dbca5660c29c3b8b3
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3473468
Tested-by: Narayana Reddy P <narayanr@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-11-06 21:17:19 -08:00
Narayana Reddy P
4efcfaf97c rtl8852ce: realtek driver update to 277-9
----------------------------------
rtl8852ce release notes for Nvidia
----------------------------------

v1.19.16_nv-277-9-0-g3c314be22.20251020_Certified_Module
- same as v1.19.16_nv-277-9-g3c314be22.20250903_Certified_Module_beta
- just remove "beta" string for formal release

==================================================================
v1.19.16_nv-277-9-1-gc6d0f2e20.20251015_Certified_Module_beta
* If ROAM CMD (wpa_cli roam), do scan if bssid not found even in busy traffic

Tested:
- simple connection test: PASS
- wpa_cli roam command is work and show prev_bssid in log: PASS

==================================================================
v1.19.16_nv-277-14-ga7d65c4a9.20251002_Certified_Module_beta
* fix the deauth reason 7 caused by roaming racing
* downgrade the fwstate debug level

==================================================================
v1.19.16_nv-277-12-g1a8402802.20250926_Certified_Module_beta
* add fwstate debug log

==================================================================
v1.19.16_nv-277-11-g3b6c1d36e.20250925_Certified_Module_beta
* default enable ACS and RSSI debug
* add reauth and reassoc timeout config via insmod or /proc/

==================================================================

Bug 5504994

Change-Id: I3ecd41fdb28de12bf6e37d9dfaca5c7f40e2fe1d
Signed-off-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3473467
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-11-06 21:17:13 -08:00
Revanth Kumar Uppala
d25418285d r8126: Fix system crash during shutdown
During system shutdown, a kernel crash could occur because the r8126
driver's tally counter update routine (`rtl8126_dump_tally_counter`)
was still accessing PCIe address space after the device was already
stopped or powered down.

To prevent this, introduce a new driver flag `R8126_FLAG_SHUTDOWN`
that is set in `rtl8126_shutdown()`. This flag is checked
now before accessing tally counters, ensuring no further
crash during shutdown.

Bug 5620576

Change-Id: I2bb74fc52e712198bfe15b109a2136dc8a2affcd
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3482325
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ninad Malwade <nmalwade@nvidia.com>
Tested-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
2025-11-04 10:11:55 -08:00
Manish Bhardwaj
e3f7b0f173 nvidia-oot: remove tegra_hv_ivc_convert_cookie API
tegra_hv_ivc_convert_cookie API is not being used
and is there lying as dead code.

Bug 5433066

Change-Id: I8036cb5e398bcc3fb720ff3afbea92e350d441a0
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3440189
(cherry picked from commit 8560fc5c340ae63e39169aca3beb02dbf229e9bc)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3448411
(cherry picked from commit 2c8771c90e44da8d423fc1896ff277343c06647b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3480666
Tested-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-10-31 10:42:10 -07:00
robelin
7f93fd77a5 platform: tegra: bwmgr: Improve resource management to avoid leak
The previous implementation doesn't release the resource in a few
cases, which can lead to leakage. Improving error handling and resource
cleanup when the driver is removed.

Bug 5483386

Change-Id: I316879075808ea945ebac997728aa51ff8b69488
Signed-off-by: robelin <robelin@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3474021
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
2025-10-29 22:38:10 -07:00
Revanth Kumar Uppala
9831027796 nvethernet: Support both DT flags to maintain backward compatibility
In the previous release for T264 platforms,the restart lane bringup
logic was controlled through the device tree flag
'nvidia,pcs-rx-eq-sw-ovrd'.
In incremental releases, the flag has been renamed
'nvidia,force-restart-lane-bringup'.

To maintain backward compatibility with older device trees,
the driver now checks for both flags.If either flag is present,
restart lane bringup is executed.

The legacy flag 'nvidia,pcs-rx-eq-sw-ovrd' is deprecated.

Bug 5017313

Change-Id: I24040f508ef776e29a0bb0c1f07d4a74fa4cc8cc
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3471233
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-24 16:27:28 -07:00
Ketan Patil
a530fa20f8 video: tegra: nvmap: Define nth_page
In Linux v6.18, commit 84efbefa26df ("mm: remove nth_page()") removes
the nth_page macro and this breaks the build for NVMAP. Define the
nth_page macro if it is not defined in the kernel to fix the build.

Bug 5566555
Bug 5215421

Change-Id: Iaa6bcd2204e4c1ab59516bb7353a71f3ec6e19c4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3449760
(cherry picked from commit c0db792d335d8525821d3aac16e64506e84bf4c2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3475136
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-10-23 07:12:06 -07:00
Johnny Liu
d7466525c8 platform: tegra: bwmgr: support error handling
When BWMGR is unavailable, BWMGR could be either unsupported and
disabled in BPMP firmware.

For unsupported state, MRQ_BWMGR_INT is not available to use.

For disabled state, MRQ_BWMGR_INT is available but sending any
MRQ_BWMGR_INT request will just get -BPMP_NODEV error code.

Add error handling logic to make min_freq and max_freq devfreq sysfs
nodes as read-only but still expose devfreq nodes, such as
available_frequencies, min_freq, and max_freq, to allow user space
apps to read information from.

Bug 5555075

Change-Id: Id7c2695765d3dfee148a0d1bc1f7b0552fe4b343
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3467128
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-20 12:11:55 -07:00
Johnny Liu
bf60517305 drivers: pva: enable profiling when it is active
Bug 5467846

Change-Id: Iad35078b05e0dbfa5ac638a718b1a900fd054d9e
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3465128
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Nan Wang <nanwa@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
2025-10-15 11:27:03 -07:00
Asha Talambedu
eb29d03e62 nvadsp: Fix UBSAN array-index-out-of-bounds in msgq
Replace struct hack pattern with flexible array members in msgq_t
and msgq_message_t to resolve UBSAN warnings.

The message queue implementation was using the old "struct hack"
pattern with single-element arrays (int32_t queue[1] and
int32_t payload[1]) to create variable-length structures. While
functionally correct, this triggers UBSAN array-index-out-of-bounds
errors when accessing elements beyond index 0, even though the
memory is properly allocated.

UBSAN errors observed:
- msgq.c:64: index 2045 out of range for type 'int32_t [1]'
- msgq.c:69: index 153 out of range for type 'int32_t [1]'
- msgq.c:124: index 53 out of range for type 'int32_t [1]'
- msgq.c:148: index 53 out of range for type 'int32_t [1]'
- msgq.c:149: index 2045 out of range for type 'int32_t [1]'

Changes:
1. Convert queue[1] to queue[] in msgq_t structure
2. Convert payload[1] to payload[] in msgq_message_t structure
3. Update MSGQ_HEADER_SIZE and MSGQ_MESSAGE_HEADER_SIZE macros
   to use sizeof() directly, as flexible array members have zero
   size and cannot be used with sizeof()

The flexible array member (FAM) approach is:
- C99 standard compliant
- Linux kernel best practice for variable-length structures
- Binary compatible with the previous implementation
- Eliminates UBSAN false positives without functional changes

Bug 4831393

Change-Id: I243d4a1b1f091bf17cfc10337e75dbd1b878042f
Signed-off-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3464624
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-15 04:42:29 -07:00
Shubhi Garg
12c09aa934 net: can: mttcan: split 8Mbps for 40MHz and 50MHz
The MTTCAN controller uses different core clock frequencies depending on
the SoC variant: 40MHz for T264 and 50MHz for T194/T234. The 8Mbps data
bitrate needs to be an exact divisor of the clock frequency for proper
operation.

For 40MHz clock: 8Mbps = 8000000 bps (40MHz / 5)
For 50MHz clock: 8Mbps = 8333333 bps (50MHz / 6)

The previous single MTTCAN_SPEED_8MBPS definition (8333333) only worked
correctly for 50MHz clocks and would not divide evenly for 40MHz clocks.

Split MTTCAN_SPEED_8MBPS into two separate defines:
- MTTCAN_SPEED_8MBPS_40MHZ: 8000000 for exact 8Mbps on 40MHz clock
- MTTCAN_SPEED_8MBPS_50MHZ: 8333333 for closest 8Mbps on 50MHz clock

Both values use the same production settings (prod_c_can_8m) and will be
selected based on the chip's configured clock frequency. The 5Mbps rate
remains unchanged as it divides evenly for both clock frequencies.

Bug 5497458

Change-Id: I17190ae6821f89d33e76114f20b91dbd65ba25f2
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3469194
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Kevin Fu <chunhuaif@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-10-15 01:28:10 -07:00
Jon Hunter
0242b95056 PCI: tegra264: Fix RP off support
We cannot use enum definitions in '#if defined()' statements because the
'#if defined()' is a preprocessor macro that is evaluated prior to
compilation. Fix this by adding a test to conftest to detect if
CMD_PCIE_RP_CONTROLLER_OFF is defined.

Bug 5551652

Change-Id: I71826a58e428f1a335e8e0d895f25f3cea46a65e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3467641
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Prakhar Srivastava (SW-TEGRA) <prasrivastav@nvidia.com>
2025-10-13 17:57:26 -07:00
Ankur Pawar
9ee2b01686 Camera: fix kernel warning after VI timeout
VI return timeout status when no frames are
received from camera sensor. During the error
recovery, the v4l2 buffers are set to
VB2_BUF_STATE_ERROR, this causes kernel warning.
As per the v4l2 framework correct buffer state
for timeout is VB2_BUF_STATE_QUEUED.

Bug 5512645

Change-Id: Iafc720b1ba74f04490d7d14e2e9014bd599b3cba
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3463848
Tested-by: Jerry Chang <jerchang@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Jerry Chang <jerchang@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
rel-38_eng_2025-10-06
2025-10-07 09:27:06 -07:00
Jon Hunter
76bdc9f5b6 net: can: mttcan: Fix build for Linux v6.17
In Linux v6.17, the 'const' qualifier for the 'struct cyclecounter'
argument on of the cyclecounter 'read' function pointer was dropped.
Add a test to conftest to detect this and update the Tegra MTT CAN
driver accordingly to fix the build.

Bug 5420210

Change-Id: Idff1429bbf45fe160e16a6dbc51e8cb00909a876
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3423831
(cherry picked from commit 10569f9bbea4fc8172a94b8d5c5190fc2687b199)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3462468
Reviewed-by: Brad Griffis <bgriffis@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-10-02 10:14:18 -07:00
Jon Hunter
9976ac1020 net: can: mttcan: Drop support for legacy kernels
Drop support for Linux kernel prior to v5.15 because these are no longer
supported.

Bug 5420210

Change-Id: I659c71f11d4c8996a35c952e0c6b27d7b7dcf239
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3423848
(cherry picked from commit f236f1fbd9d5d7b1886fc3abfa83719da1996772)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3462467
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-10-02 10:14:07 -07:00
Jon Hunter
a5bb404485 virt: tegra: Fix build for Linux v6.17
Upstream commit fc2898ea793a ("workqueue: Remove unused
work_on_cpu_safe") removed the 'work_on_cpu_safe()' function for Linux
v6.17. Fix this by open coding the 'work_on_cpu_safe()' in the Tegra HV
CPU Yield driver.

Bug 5420210

Change-Id: I3110554839853be9a906063d479539543394acbd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3423830
(cherry picked from commit 97075404a16dc4f9d66147ae4b15a04526978e0e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3462466
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-02 10:14:02 -07:00
Jon Hunter
74171df1a4 platform: tegra: uss-io-proxy: Migrate to GPIOD
Upstream commit a55893133830 ("gpiolib: Remove unused
devm_gpio_request()") removed the devm_gpio_request() function and this
breaks the Tegra USS IO Proxy driver. The devm_gpiod_get() function has
been supported in the Linux kernel since v4.3 and now that the legacy
GPIO functions are being removed, migrate the Tegra USS IO Proxy driver
over to using GPIO descriptors.

Bug 4387902
Bug 5420210

Change-Id: I0c62977dc4ec829e14f105babdd08bbd64113fa2
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3423827
(cherry picked from commit e4572a5ff434f778178b1dfb39b4c1cf7923db6d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3462463
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-02 10:13:50 -07:00
Jon Hunter
d814c113bb drm/tegra: Fix build for Linux v6.17
The arguments to the function drm_helper_mode_fill_fb_struct() and
function pointer fb_create() have been updated in the Linux v6.17. Add
the necessary conftest tests to check for the new variants of these
functions and update the Tegra DRM driver accordingly.

Bug 5420210

Change-Id: Ie1470df199d154d3f94f5f7773dcc1ba138e23da
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3423828
(cherry picked from commit dde42d012e4187e798d5d7c3cfa974f49059d0a1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3462462
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-10-02 10:13:45 -07:00
Jon Hunter
2800fd5f4b drivers: Fix gpio_chip '.set' callback for v6.17
In Linux v6.17, the gpio_chip structure's '.set' callback function was
updated to return an integer. Add a test to conftest to detect this and
update the necessary drivers accordingly.

Bug 5483854

Change-Id: Ie48a50775885a06c8aa23ddb72fdbc73361ab92b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3440815
(cherry picked from commit 5dc88266853f0c5fbc7dd925187f63c2b6560a4b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461855
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: Brad Griffis <bgriffis@nvidia.com>
2025-10-02 10:13:34 -07:00
Jon Hunter
c2fd2c3c66 misc: bluedroid_pm: Ensure 'host_wake' is configured
Currently the wakeup source is configured if only the 'ext_wake' is
valid. However, the bluedroid_pm_timer and proc interface that are
configured when 'ext_wake' is valid, also assumes that 'host_wake' is
also valid. Therefore, update the code to only configure the
bluedroid_pm_timer and proc interface if both of these are valid.

Bug 4958861

Change-Id: I16ef55359c36acc9dc50464f43816ae2ef3c3123
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3397252
(cherry picked from commit b1e18d66aa0ab6d491b88caac5fa9abddb69d0e4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3462461
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-02 10:13:17 -07:00
Jon Hunter
432f3748e0 misc: bluedroid_pm: Free proc on failure
If the call to wakeup_source_register() fails during probe, then the
'proc' interface is not freed. Ensure that this is freed as expected.

JIRA LINQPJ14-60

Change-Id: I188be2998429c1ada6ccdf765791367e61735359
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3397251
(cherry picked from commit a0f0bebe2a2a54b87f91b1812c22bbd14470a61c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461888
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-02 10:13:12 -07:00
Jon Hunter
7c70fbf0cf misc: bluedroid_pm: Verify wakeup registration
The structure returned from the function wakeup_source_register() is not
currently checked to see that a valid structure is returned. If
wakeup_source_register fails to register the wake-up source, then this
function will return a NULL pointer and this will lead to a crash when
defereferencing this pointer. Therefore, check that a valid structure is
returned from wakeup_source_register() and if not then return an error
from the probe function.

JIRA LINQPJ14-60
Bug 4958861

Change-Id: I03356700ab03d6c25080b3806ea8b7da3983a302
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3394894
(cherry picked from commit 14286052fb9dd496b243221fa1066f828451b294)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3405519
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-02 10:13:06 -07:00
Jon Hunter
8407ab4b3e misc: bluedroid_pm: Fix optional GPIOs
The function devm_gpiod_get_optional() will return an error code encoded
as a pointer type if the GPIO requested is not found. Therefore, we need
to use the IS_ERR() macro to determine if the GPIO is valid, otherwise
we could incorrectly attempt to dereference an invalid pointer. This bug
was introduced when migrating the bluedroid driver to use the gpiod
functions.

Bug 4387902
Bug 4958861

Change-Id: Ib9e7494c92226454d93506c2c0d4c80bd6a7493c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3397231
(cherry picked from commit b461fa1a87f9beb5faa1dc917956603430b12df7)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3405518
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-02 10:13:01 -07:00
Bruce Xu
74cc0f56f2 misc: bluedroid: remove duplicate timer declaration
There are 2 timer defined. One statically and one in the
bluedroid_pm_data struct. Both timers call the same function on expiration. In the case of the statically defined timer this is a problem because it assumes that the timer is part of the bluedroid_pm_data and so calling timer_container_of() or from_timer() results in an invalid pointer and hence kernel panic. Fix this by
removing the statically defined timer.

Bug 4958861

Change-Id: I08f9dc3a032f84ca3350fbec5fb97062da8d6795
Signed-off-by: Bruce Xu <brucex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3400991
(cherry picked from commit 61490c6a2a65e24068cd33a92d8730260ad83f95)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3405517
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-10-02 10:12:56 -07:00
Jon Hunter
50c387ecf9 nvmap: Remove dma_buf_ops flag cache_sgt_mapping
The dma_buf_ops flag 'cache_sgt_mapping' has been removed in Linux
v6.16. Although NVMAP has its own caching and so it should be possible
to simply drop this flag, some tests are failing. For now add a test to
conftest to detect if this flag is present and update the NVMAP driver
accordingly.

Bug 5215421

Change-Id: I382d5c62fd550254d387abd1a21e5a1c5cda3a6e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3384177
(cherry picked from commit 326b31912bf1da7de0a5340826ec1fdaf084c11e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461885
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-01 15:28:54 -07:00