Commit Graph

3458 Commits

Author SHA1 Message Date
Jon Hunter
0d6655f480 video: tegra: nvmap: Fix build for Linux v6.15
In Linux v6.15, the function ioremap_prot() was updated to pass a
variable of type pgprot_t instead of an unsigned long. Add a conftest
test to check for this and update the NVMAP driver accordlingly to fix
the build for Linux v6.15.

JIRA LINQPJ14-47

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

Bug 5170956

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

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

Jira HOSTX-5982

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

Bug 5181576

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

Jira NVIPC-3397

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

Bug 5169776

Change-Id: Ide70b7f746519ed528b5face5b91d9a4c2f9f7ca
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3332021
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Nagarjuna Kristam
6dbef270d8 PCI: tegra264: dma: Add poll to disarm MSI
To avoid getting spurious interrupts during XDMA channel reset,
Add polling of MSI states for NV_XDMA_CHANNEL_DEBUG_REGISTER_4_0
register once channel is disabled.

Bug 4742850

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

JIRA LINQPJ14-47

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

JIRA LINQPJ14-47

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

JIRA LINQPJ14-47

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

Jira CAMERASW-32773

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

Bug 5048625

Change-Id: I57c87128ce41c116fb2c8ef276908ff395864a9b
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3319273
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:17 +00:00
Prakhar Srivastava
2e68d82f52 PCI: tegra264: Remove private-soc directory
Move files from private-soc to parent controller directory.

Bug 5054840

Change-Id: I8ec5e5b34f2226bbbd051f4313033153a096e5c1
Signed-off-by: Prakhar Srivastava <prasrivastav@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3312461
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2025-07-24 10:19:17 +00:00
Jeungwoo Yoo
b62ef100a7 ivc-cdev.c: Fix INT30-C and INT08-C
Jira NVIPC-3395

Change-Id: Iaacae60c6e20ca9d8f9c142d12e96fada895a7e5
Signed-off-by: Jeungwoo Yoo <jeungwooy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3298198
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
ac685ff9af bmi088: Remove version.h header
Kernel version definitions are no longer used in the BMI088 driver and
so remove the version.h header as it is no longer needed.

Bug 4190630

Change-Id: Id0e3052abbf85034c9f4f66f21cc9842eff3658c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330357
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Blake McHale <bmchale@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
673d69fe3a bmi088: Fix mixed declarations and code
When building the BMI088 driver with the compiler option
'-Werror=declaration-after-statement' the build fails with the following
errors ...

 drivers/bmi088/bmi088_iio.c: In function ‘bmi_iio_attr_store’:
 drivers/bmi088/bmi088_iio.c:226:9: error: ISO C90 forbids mixed
  declarations and code [-Werror=declaration-after-statement]
 226 |         struct bmi_iio_state *st = iio_priv(indio_dev);
     |         ^~~~~~

 drivers/bmi088/bmi088_iio.c: In function ‘bmi_iio_attr_show’:
 drivers/bmi088/bmi088_iio.c:283:9: error: ISO C90 forbids mixed
  declarations and code [-Werror=declaration-after-statement]
 283 |         struct bmi_iio_state *st = iio_priv(indio_dev);
     |         ^~~~~~

Fix this by ensuring that all variables are defined at the start of the
functions.

Bug 4190630

Change-Id: I52e90fbc61d4d33ab8c1dfd4e551a54461aad788
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330356
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Blake McHale <bmchale@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:17 +00:00
Joshua Cha
454c782d5c nvsciipc: add missing check routing in set db
add pointer check routine for set_db CMD.

JIRA NVIPC-3520

Change-Id: Ie9768ae839d88519013dfece97192d111acacbb2
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3329729
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jeungwoo Yoo <jeungwooy@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
2025-07-24 10:19:17 +00:00
Joshua Cha
27a2c762f1 nvsciipc: add missing authentication
added missing client authentication to ioctl func below.
nvsciipc_ioctl_get_db_by_idx()
nvsciipc_ioctl_get_vuid()

JRIA NVIPC-3513

Change-Id: I32c3c97ba1c5196ba5858d13393fada073527d2f
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3324672
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jeungwoo Yoo <jeungwooy@nvidia.com>
2025-07-24 10:19:17 +00:00
Ken Chang
8e90031cd8 tegra-cec: poll WR_LOCK for TX data sync
After programming the TX Register, it takes 3-4 clock cycles for TX
data synchronization to the CEC core domain. The TX_EMPTY interrupt
should not be cleared until this data synchronization is complete.

Enable CEC HW feature to automatically clears the TX_EMPTY interrupt
after TX data synchronization is complete. It takes time for HW to
clear the interrupt and TX_EMPTY can still appear high, hence SW
needs to poll WR_LOCK until it goes to 0. This will avoid SW to
attempt the next TX block during the same TX_EMPTY interrupt.

Also read RX_REGISTER based on the buffer occupancy which is
indicated by the CEC_RX_BUFFER_STAT_0 register.

Bug 4954851

Change-Id: I3ec3792c9ae3b8a00c800c921cf4e4d09369e6b9
Signed-off-by: Ken Chang <kenc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322519
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Tested-by: Ruopeng Huang (SW-TEGRA) <robhuang@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
amitabhd
d460bf1928 host1x_emu: Support host1x dispatch api in DLA.
Add change to enable host1x dynamic dispatch api
provided by host1x-fence module.

Bug 5064819

Change-Id: Ibad4a6741d9a8227fc6c0098c83a1ed6ec0cc09a
signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3310175
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Mainak Sen <msen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
2025-07-24 10:19:17 +00:00
Joshua Cha
915ce6717f nvsciipc: set nvsciipc max endpoint count
validate nvsciipc max endpoint count.
validate set_db entry pointer.

JIRA NVIPC-3506

Change-Id: Id29531af24367de952b2dccebe23515ad52bfd33
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322061
Reviewed-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Joshua Cha
c9ee1f5372 nvsciipc: remove unused CMDs
removed NVIPC_IVC_IOCTL_NOTIFY_REMOTE and NVIPC_IVC_IOCTL_GET_VMID

JIRA NVIPC-3488

Change-Id: Ic511e6f059ae2149bd82e0c5980c5f95e9494b85
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322033
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
2025-07-24 10:19:17 +00:00
Joshua Cha
e8d5a43b9f nvsciipc: add endpoint mutex
add endpoint mutex to nvsciipc KMD

JIRA NVIPC-3427

Change-Id: I1644213f59d24da4c4eeb693fa3016904388a26b
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3309493
Reviewed-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
nanwa
e677624957 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit e56dfe9c0b2c3 ("kmd: increase timeouts in nati...")

Changes since last deployment:

- kmd: increase timeouts in native debug builds
- fw: Add support to report invalid cmd index
- Honor submission timeout while waiting for space in Fence Buffer
- deploy: Make GVS polling more robust
- deploy: Update GPL 2 license
- deploy: Generate change summary in commit message
- Enabling thread safety tests
- tests: enable MultipleContexts.MaxContext_SingleThread_SingleProcessOnlyo

Change-Id: I8e9353205d322c2a6f3e93875d8b8a8025af4195
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3326483
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
970fbbcc73 gpu: host1x: Fix type casting in debug_hw.c
Fix a CERT-C Expression violation (CERT EXP39-C)
by properly casting the mapped pointer to
u32* when passing it to show_gather() function.
This ensures type compatibility between the
function parameter and the actual object
being accessed.

Fixes CID 12627322

Jira HOSTX-5971

Change-Id: I8a7224b46f4e36582a06d6d6ee1ba21da18fe43c
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3324442
Reviewed-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
3b36d6b76f gpu: host1x: Fix NULL pointer dereference in job allocation
Fix NULL pointer dereference when num_unpins is 0,
which causes job->addr_phys to be NULL. In this
case, the code was incorrectly trying to set
job->gather_addr_phys to &job->addr_phys[num_relocs],
which would dereference a NULL pointer.

Add proper NULL checks to prevent this issue
both during allocation and when
using job->gather_addr_phys throughout the code.

Fixes CID 12627383:
- CERT-C Expression (CERT EXP34-C)
Fixes CID 12627953:
- Explicit null dereferenced (FORWARD_NULL)

Jira HOSTX-5971

Change-Id: If417ec5b5431a4f4b716ca73ddf279c9b0336c94
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3324441
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Nagarjuna Kristam
56278bff69 PCI: dma-test: Update conditions for tests
Update all test logs as  *condition -<condition>- (Passed|Failed)*.
This format is parsed in the script to identify pass or fail for
corresponding test cases.

JIRA NET-3009

Change-Id: I6e7b37d5205a421d3c62142b268bfc646e89a08e
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3323877
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
261488ef83 gpu: host1x-emu: Add host1x_syncpt_get_shim_info
Implement host1x_syncpt_get_shim_info function for
host1x-emu driver and add it to the dynamic dispatch
mechanism in host1x-fence.

This function provides clients with the physical address
of syncpoint aperture, stride and number of
syncpoints, which is needed by various client drivers
like ISP, VI, PVA, GPU etc

Jira HOSTX-5971

Change-Id: I50e60222a035228c981dfa993cb0088e1d15dad2
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3323327
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
Reviewed-by: Amitabh Dutta <amitabhd@nvidia.com>
2025-07-24 10:19:17 +00:00
praagarwal
4a4300f0e8 gpu: host1x: address INT30-C cert violations
add checks for integer overflow in job.c

Jira HOSTX-5889

Change-Id: Id3336c5c390f2ce771492a686a57e47cc9adf9d2
Signed-off-by: Prateek Agarwal <praagarwal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3299139
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:17 +00:00
Christophe JAILLET
6b5633fb93 crypto: tegra - Remove an incorrect iommu_fwspec_free() call in tegra_se_remove()
The only iommu function call in this driver is a
tegra_dev_iommu_get_stream_id() which does not allocate anything and does
not take any reference.

So there is no point in calling iommu_fwspec_free() in the remove function.

Remove this incorrect function call.

Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Tested-by: Akhil R <akhilrajeev@nvidia.com>
Acked-by: Akhil R <akhilrajeev@nvidia.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

JIRA LINQPJ14-47

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I1d511caa5cff07b936d1f347c2768c43a6f1c1e3
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328426
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Akhil R <akhilrajeev@nvidia.com>
2025-07-24 10:19:17 +00:00
Sanath Kumar Gampa
376365d92f ethernet:Update ethtool logic to read macsec stats
Read macsec stats only if macsec is enabled in DT

Bug 5130525

Change-Id: I72de446954513ec6332566ae0647aec323178146
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313063
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
nanwa
0c0870d8a4 pva: mirror from gitlab cv/pva-sys-sw
- Added support for booting from GSC on L4T and updated the VPU allowlist.
- Enabled debug logs by default for debug builds and added a DebugFS node for VPU.
- Addressed data corruption issues in QNX devctls and fixed various KMD data handling bugs.
- Updated DMA configurations and handling.
- Implemented nsight trace logging support and updated VPU stats and NVLOG implementations.
- Other minor bug fixes and documentation updates.

Gitlab commit dc34d709b865 ("intf: Enable following intf tests")

Change-Id: Ide42e0390af9eece5e9ed88ac3eba57b9272d6a1
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3323529
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Vamsee Vardhan Thummala
15f9feb564 drm/tegra: Remove PM from virtual engine
Remove power management functionality from virtual engine driver
as it's no longer needed. This includes suspend/resume operations
and PM ops structure. The driver now relies on system's default
power management behavior.

Jira HOSTX-5933

Change-Id: I092bfa8e2a01345e149ff2c04ed526a0aa7a0944
Signed-off-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322473
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Nagaraj P N
083a40b0d3 nvtzvault: add driver for GP comm via oesp mailbox
- Allow applications to interact with TA via IOCTL
  interface, with one device node per TA/token to
  allow access control policies to be enforced.
- Validate the request parameters
- Add support to to serialize request data from application
  and deserialize response from the TA
- Include process name as part of request to enable
  TA to log required info to nvlog buffer

Jira ESSS-1713

Change-Id: I9e4c4687ecb6e01b0d88130fd640a9b4a59676aa
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3282272
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svc-percl-checker <svc-percl-checker@nvidia.com>
2025-07-24 10:19:17 +00:00
Mahesh Kumar
a23d954e3e platform: dce: Add bootsrap2 command
Add support to the bootstrap command over the admin channel,
which will be called when a client registers. This command will
perform steps that must be performed only after the client is ready.

TODO: This bootstrap-2 command will be replaced by the existing
bootstrap command which we call during DCE-FW bootstrapping once
we split admin bootstrapping and RM bootstrapping in the DCE-KMD.

Jira TDS-17135

Change-Id: I55330b9ce73e1acf20e2a80d392d7984c91ed65f
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3274949
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
8a72e1a997 nvdla: Replace deprecated nvhost_syncpt_* APIs
This commit replaces the deprecated nvhost_syncpt_*
functions with the equivalent host1x_syncpt_* APIs
throughout the NVDLA driver.
The following replacements were made:

- nvhost_get_syncpt_host_managed() →
   host1x_syncpt_alloc() + host1x_syncpt_id()
- nvhost_syncpt_put_ref_ext() →
   host1x_syncpt_put()
- nvhost_syncpt_incr_max_ext() →
   host1x_syncpt_incr_max()
- nvhost_syncpt_read_maxval() →
   host1x_syncpt_read_max()
- nvhost_syncpt_is_expired_ext() →
   host1x_syncpt_wait()
- nvhost_syncpt_set_min_update() →
   host1x_syncpt_read() + host1x_syncpt_incr()

Each replacement includes:
- Obtaining syncpoint handles when necessary with
   host1x_syncpt_get_by_id_noref()
- Proper error checking for null handles and return values
- Maintaining the emulation wrapper in nvdla_sync_syncpt_emu.c

Bug 4922416

Jira HOSTX-5963

Change-Id: I8ce4299f89a8938c07895656689a59cc20a097ec
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321364
Reviewed-by: Arvind M <am@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
cdf96fa81b nvdla: Replace deprecated nvhost_module* APIs
Remove dependencies on the following deprecated
nvhost API functions by implementing their functionality
directly in the NVDLA driver:

1. nvhost_module_init:
   Replaced with direct implementation in nvdla_module_init:
   - Get clock resources and set clock rates
   - Initialize reset control
   - Set up power management runtime
   - Create debugfs entries

2. nvhost_module_deinit:
   Replaced with direct implementation in nvdla_module_deinit:
   - Disable power management runtime
   - Free falcon firmware if present
   - Clean up debugfs entries

3. nvhost_module_reset:
   Replaced with direct implementation in nvdla_module_reset:
   - Handle prepare_poweroff callback
   - Acquire and release reset control
   - Load clock gating registers
   - Handle finalize_poweron callback

4. nvhost_module_busy:
   Replaced with direct implementation in nvdla_module_busy:
   - Get PM runtime sync
   - Handle PM runtime errors

5. nvhost_module_idle and nvhost_module_idle_mult:
   Replaced with direct implementations:
   - Mark last busy for PM runtime
   - Handle autosuspend or regular PM runtime put

6. nvhost_module_pm_ops:
  Replaced with custom nvdla_pm_ops structure:
   - Implement nvdla_runtime_suspend and nvdla_runtime_resume
   - Implement nvdla_suspend and nvdla_resume
   - Configure SET_RUNTIME_PM_OPS and SET_SYSTEM_SLEEP_PM_OPS

7. nvhost_module_load_regs:
   Replaced with nvdla_module_load_regs:
   - Implement register manipulation with direct memory mapped I/O
   - Use writel instead of host1x_writel

Bug 4921620

Jira HOSTX-5963

Change-Id: I3006a92a05966da138da31730e97f74f786c9d0c
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321246
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
0f991be9e7 nvdla: Replace deprecated nvhost_client* APIs
Replace deprecated nvhost client device functions with
their direct implementations to maintain compatibility
with newer host1x drivers:

1. Replace nvhost_client_device_get_resources with
   direct implementation:
   - Get host1x data from parent device
   - Map device resources directly

2. Replace nvhost_client_device_init with
   nvdla_client_device_init:
   - Allocate character device region
   - Create device node using nvdla_client_device_create

3. Replace nvhost_client_device_release with
   nvdla_client_device_release:
   - Clean up device node
   - Unregister character device region

This change ensures the NVDLA driver continues to work
correctly with the host1x driver while removing
dependencies on deprecated functions.The device node
"nvhost-ctrl-dla" is still created with the same
functionality as before.

Bug 4921461

Jira HOSTX-5963

Change-Id: Ib27000fa47fdd72f80ca4030232d31e100c01ea4
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3320695
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
303edb8a0e nvdla: Replace nvhost_syncpt_unit_* API Usage
Replace the deprecated nvhost_syncpt_unit_interface_init()
function with host1x_syncpt_get_shim_info() in
the NVDLA driver. This change:

1. Adds a local def of struct nvhost_syncpt_interface
2. Implements the functionality in nvdla_sync_syncpt.c
3. Adds necessary include files for IOMMU and DMA mapping

This change ensures the NVDLA driver continues to work
correctly with the host1x driver while removing the
dependency on deprecated functions.

Bug 4921461

Jira HOSTX-5963

Change-Id: I085a24045758a2ecbb026654c3ee57a8dfda9271
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3320585
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
2025-07-24 10:19:16 +00:00
Robert Huang
a0aa537149 misc: cec: add wake up support.
This change adds SC7 wake support to cec driver.
CEC engine can detect TV packets in SC7 state and
can wake up when particular pattern detected.
In resume functionality, the total arrived packets on FIFO
needs to read and reported back to user-space.

This change adds -
1. Program CEC engine to activate for SC7 wake.
2. Program required opcode and physical address.
3. Register for wake and read packets in resume path.
4. Provide sysfs control to program physical address.

Verification of SC7 wake is done for below cases -
1. TV turn on and off is tested.
2. TV source input change is tested.
3. CEC Analyzer set-stream is tested.

Bug 4974679

Change-Id: Ia1ceeb13b89614c96d0b6d42f2bb58419865414b
Signed-off-by: Robert Huang <robhuang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300821
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
2025-07-24 10:19:16 +00:00
Bhadram Varka
1960558372 nvethernet: suspend/resume time profiling
Add suspend/resume time to the debugfs so that
tests can be written to monitor the SC7 KPI

Bug 4202840

Change-Id: I92531277ab7149269186f8c61237931de99a3368
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300390
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: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:19:16 +00:00
Bhadram Varka
b5a64188d3 nvethernet: don't free/alloc descriptors in SC7
- dma_alloc_coharent is taking more time while
allocating the descriptors in resume path.
- This change will not free the DMA descriptor
- It only free DMA buffers in the Rx ring while suspend
and re-allocate the DMA bufeers in the Rx ring during
resume.

Bug 5094704

Change-Id: If52471d11dd300c324a9c9bc1723fcb3d3e51bf7
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313272
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: svcacv <svcacv@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:19:16 +00:00
Frankie Chang
c781ccfdbc nvdla: not build axi-nvdla.ko for ACK
We don't need axi-nvdla.ko in Android,

Bug 4344670

Change-Id: I60c657638802a6e3d9c2c747e7d80ce5d7b80b21
Signed-off-by: Frankie Chang <frankiec@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3320501
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
2025-07-24 10:19:16 +00:00
Bhadram Varka
3edc4ff927 nvethernet: Add nvidia,use-random-mac-addr DT property
Adding support for generating the random MAC address
if nvidia,use-random-mac-addr is set with value 1.

Below property should be there insider ethernet DT nodes -
nvidia,use-random-mac-addr = <1>;

Recommendation is to use only for MODS setup.
This should not be enabled in the production DT.

Bug 5142789

Change-Id: I87db90685bb9769358eda4edc226b929ccdce67f
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3317020
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Lovie Wang <loview@nvidia.com>
2025-07-24 10:19:16 +00:00
Sanjith T D
010cb686b0 vblk: Fix top25 static analysis violations.
Jira SSV-12834

Change-Id: I9b58305b033cc5dabe9b07ebcf34633b738ae057
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3317746
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
2025-07-24 10:19:16 +00:00
Nagarjuna Kristam
f61c2ced6d PCI: tegra264: ep: Fix ICD mis-matches in code
Add state checks for set_bar, map_addr and unmap_addr API's.

Bug 5132823

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: Ifb17259229a74289703f18b34e223fed18ead1eb
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314131
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Nagarjuna Kristam
ab18e366eb PCI: epf: dma-test: Add negative tests for EP and DMA
Add negative tests for EP API's set_bar and clear_bar.
Add negative tests for all DMA API's

JIRA NET-2400

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: If1b171f67b4c0a372e2a515704893609b7d11b76
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313976
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Suneel Kumar Pemmineti
04ccb5c0c3 nvsciipc: enable endpoint security
- allow ioctl access if UID looked up is one of process UID
  or SGIDs.
- removed legacy codes
- set UID of set DB ioctl using sysfs

JIRA: NVIPC-2817

Change-Id: Ic910b5bdbb362e9cda0cc3af4bcd9c1642725a25
Signed-off-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225830
Tested-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Manish Bhardwaj
1fabab5472 hvc_sysfs: supporess hvc trace buffer error log
hvc trace buffers logs are being used for collecting
eventlib by hypervisor. Since this is not needed in
prod binary so suppressing the hvc buffer missing error.

Bug 5150377

Change-Id: I567cb2cd3e8b5e7e10a24a57e09221c6014264fc
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3320466
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Ashwin Joshi <asjoshi@nvidia.com>
2025-07-24 10:19:16 +00:00
Sushil Kumar Singh
d3e47da5a4 nvethernet: disable HSI error reporting if EPL is disabled.
Issue:
During iperf test on pegasus board on customer observed below error periodically
nvethernet 6810000.ethernet: Failed to report error: reporter ID: 0x0, Error code: 0x1002, return: -19

Fix:
Disable HSI error reporting from hsi work queue function
for L4T platforms if safety component EPL is not supported.

Bug 4090612

Change-Id: Ifc51dd93fb16c1dbf7e42c648ca14443bb40550b
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
(cherry picked from commit 983ddcae450c36cde9ec79433e16a4ed5aa89319)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313872
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3318856
Tested-by: Wayne Wang (SW-TEGRA) <waywang@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00