Commit Graph

4335 Commits

Author SHA1 Message Date
Akihiro Mizusawa
37e79d637e host: vi: Deprecate nvhost client device APIs
Deprecate the nvhost_client_device* APIs and implement equivalent
functionality in the VI driver.
Remove the API calls to create nvhost-ctrl-vi devices as they are
no longer used.

Bug 4922171

Change-Id: If9b6db1b3792c10b7a11a86cf2cb63d4fdc8fb6f
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3298848
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:16 +00:00
Akihiro Mizusawa
348929ede2 host: vi: Deprecate nvhost syncpt unit interface API
Deprecate the nvhost_syncpt_unit_interface_init API and implement
equivalent functionality in the VI driver.

Bug 4921461

Change-Id: I86ed97cf1ad6efee4cbf8e86c7bd577f6dec3f2d
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297501
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:16 +00:00
Akihiro Mizusawa
7cbca491db host: vi: Deprecate nvhost syncpt APIs
Replace Nvhost syncpt APIs with host1x equivalents in the VI
host1x driver and the VI channel driver.
Note the WAR to include host1x-next.h before nvhost.h. The nvhost.h
header will be deprecated in the future.

Bug 4922416

Change-Id: I5dccf8bef069f894802dce777939cb8262a3cf14
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3296280
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:15 +00:00
Mohit Ingale
794163ce8e media: tegra: Conditionally disable L4T-specific drivers in embedded Linux builds
This change adds conditional compilation blocks to disable L4T-specific
camera and multimedia drivers when building for embedded Linux platforms.
Key changes include:

- Add ifneq ($(NV_BUILD_SYSTEM_TYPE),embedded-linux) checks in multiple
  Makefiles to exclude L4T-specific components
- Introduce NV_IS_L4T define to conditionally include L4T functionality
- Reorganize header includes to support both L4T and embedded Linux builds
- Conditionally wrap L4T-specific struct members and function calls
- Update module dependencies (cdi_mgr now depends on cdi_dev instead of cdi_pwm)

Jira CAMERASW-32251

Change-Id: I934fdd0188e914c07b456c0f6ad379d2a08555ca
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3294869
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:15 +00:00
amitabhd
2cc3c99c6e host1x_emu: Adding API dispatch functionality
Adding dynamic APi dispatch functionality in host1x-fence
modue. This CL exports new host1x wrapper API, which can
be called by client kernel modules. The wrapper API dispatch
call to either Host1x module or Host1x-EMU depending if the
host1x-emu driver registered its interface during its probe.

Bug 5064819

Change-Id: I49445cdce7c3795a2c94fde9d0871da393993554
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306857
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Leslin Varghese <lvarghese@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
2025-07-24 10:19:15 +00:00
Ketan Patil
1e83ec96df video: tegra: nvmap: Fix build failure
Linux v6.10 and v6.11 are failing as follow_pfn was removed since kernel
v6.10 Use conftest to detect if follow_pfn, follow_pfnmap_start
functions are present or not and based upon this result, call the
appropriate functions in nvmap code.

Bug 5007238

Change-Id: Ie7e0c9bde652fd89158a5778aa8254fc86bf4696
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3311535
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:15 +00:00
Viswanath L
f985bb9f00 nvadsp: Fix priv data in show_os_version()
Fetch correct private data in show_os_version(). This function
is mapped to callback seq_file->seq_operations->show, which will
be called in seq_read() flow.

Bug 5122582

Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Change-Id: Ic8e4df342063139b91fa33297e59916ffb8b5a20
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3311120
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
gokull
d8a3d29fed block:vblk: Resolve compile error tegra_vblk V6.11
Method to configure the struct queue_limits has changed
from kernel v6.11.
The following API's are removed from v6.11
[1] blk_queue_max_secure_erase_sectors
[2] blk_queue_max_discard_sectors
[3] blk_queue_write_cache
[4] blk_queue_logical_block_size
[5] blk_queue_physical_block_size
[6] blk_queue_max_hw_sectors
[7] The semantics of the flag QUEUE_FLAG_NONROT
is set as default value for queues, so this flag
is removed in v6.11.
[8] The flag BLK_MQ_F_SHOULD_MERGE is not valid in
v6.14

The above API's are replaced by direct
assignment to the queue_limits and use the new API
queue_limits_set. This API takes the incoming
values, validates, populates the other members
of the struct accordingly and assigns the
provided queue_limits to the corresponding queue.

The change contains:
 [1] Addition of new approach that is compatible
with v6.11
 [2] Addition of a macro (NV_BLOCK_USE_QUEUE_LIMITS_SET)
for backward compatibility
 [3] This is a special case where both the variable
and the function needs to be present for the macro to be
enabled. The changes were made accordingly.
 [4] The flag BLK_MQ_F_SHOULD_MERGE is protected by
macro

Bug 4311184

Signed-off-by: gokull <gokull@nvidia.com>
Change-Id: Ida2c12de0977f6405e7cc7dec946cf0f64413c97
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3303900
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Nan Wang
b63a822a1b pva: deploy V3 KMD
Jira PVAAS-17785

Change-Id: I8ebc4c49aec209c5f82c6725605b62742402500a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3299880
Tested-by: Nan Wang <nanwa@nvidia.com>
Reviewed-by: Vishwas M <vishwasm@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nan Wang <nanwa@nvidia.com>
2025-07-24 10:19:15 +00:00
Nan Wang
b5d768302a pva: move V2 to pva_v2 folder
Prepare for deploying v3 driver

Jira PVAAS-17785

Change-Id: I0a28a90c87394bdc40c587dad11d5991c46b6cab
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3299879
Tested-by: Vishwas M <vishwasm@nvidia.com>
Tested-by: Nan Wang <nanwa@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nan Wang <nanwa@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
2025-07-24 10:19:15 +00:00
Pritesh Raithatha
7399ae2100 platform: tegra: allow mc-utils load for non-tegra devices
Nvgpu driver has dependency on mc-utils driver so
allow the driver to get loaded for non-tegra devices.
Also update functions to fail for non-tegra devices
in case called by mistake.

Bug 5066721

Change-Id: I410c10d0155ac85001eb12b2f4bce694affb5186
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3295359
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:15 +00:00
Ankur Pawar
4299b8bfe0 camera: fusa: Fix concurrency issue
Fix concurrent access issue in destroy_buffer_table().
The function is freeing buffers while only holding the
write lock during hash deletion. Other threads could
still be accessing the buffers.

Create a temporary list within the lock and then unmap
the addresses safely.

Bug 5017044

Change-Id: Ib262570aaa19f65c4cb3959123a85c5f66e5db68
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306890
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Zuyi Hu <zuyih@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
2025-07-24 10:19:15 +00:00
amitabhd
909b489e87 host1x_emu: Fence polling modification
In simulation platform enabling hrtimer fence polling
is causing kernel to block/unresposive.

This issue is not observed in sillicon platforms.
As per this CL making following changes.

1. Added flag for kernel Thread polling.
2. Enabling HRTimer fence polling for silicon platform.
   only.

Bug 5094695

Change-Id: I011900e9299be71413c92952d447e53abfd34128
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297995
Reviewed-by: Leslin Varghese <lvarghese@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:15 +00:00
Khushi
08f05cb80d vse: Add vaildation checks for Algorithms
Bug 5058383

Change-Id: Ibeb1436938db0d87a5c4f99275aed6cec17dabe1
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3284860
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:19:15 +00:00
Sumit Gupta
46ea0fea4a configs: Add build config for Noble kernel
Add new file 'Makefile.config.noble' to enable NV_OOT*SKIP_BUILD
for Noble Kernel similar to Kernel-oot.
Reference change:
 https://git-master.nvidia.com/r/c/linux-nv-oot/+/3214053

Bug 4551265

Change-Id: Ifd43a4ed775addc72a5062cf267b0481d20a5404
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3305239
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-07-24 10:19:15 +00:00
saranyad
d0e719df4a DCE_KMD: Fix TOP 25 CWE Rule
- This patch fixes the following violations

  OVERRUN - 1 (24138320)
  - Added checks to validate boundries

  Rule: OVERRUN
  Rule Description: Out-of-bounds access to a buffer

JIRA TDS-15862

Change-Id: I4df6c7124da19143eb0d9b8027df28fccdff0b75
Signed-off-by: saranyad <saranyad@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3305934
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Nagarjuna Kristam
4dce44a907 PCI: tegra: Add common DMA IRQ
IRQ is external interface for DMA driver. Use one IRQ handler callbacks
to register and call SoC specific handler them based on SoC type.
Add ICD documentation for common IRQ API's

JIRA NET-2663

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: I51137489ebe071e2e4a3edc3c5e3fefb84c994fa
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3305091
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2025-07-24 10:19:15 +00:00
Nagarjuna Kristam
330ecd452b pci: tegra264: Remove MSI info from ICD
MSI API are not supported via GuestOs decomposition. Disable documentation
for the same during ICD compilation.

JIRA NET-2663

Change-Id: Ie1a0ca75b91e848152d0748f8f49735bedd0be70
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3305090
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:15 +00:00
Ketan Patil
d256920b00 video: tegra: nvmap: Handle pages mapped using remap_pfn_range in alloc from VA
OpenRM maps the buffer with remap_pfn_range and then it's user VA is
passed to libnvrm_mem to create a handle out of it. NvMap uses
get_user_pages to get user pages from the VA. It fails for the buffer
mapped with remap_pfn_range. Hence use follow_pfn/follow_pfnmap_start
functions to obtain pfn from the VA and then obtain page pointer from
it.

Bug 5007238

Change-Id: I45a6ede6b5f164e537f014d9db3475b4c6d89307
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3298720
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Lakshmanan Selvi Muthusamy <lm@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
2025-07-24 10:19:15 +00:00
Mainak Sen
db0d9da92f drm/tegra: Fix Engine timestamp shift factor
In Orin and previous chipsets, engine timestamp counter
runs 32 times faster than CNTVCT register, so the actual
timestamp is obtained by right shifting with factor of 5.
In Thor onwards, this shift is not required is for VIC engine.

Jira HOSTX-5905

Change-Id: I69980fdfcf50b15db99b1fbad522aecd571a0f17
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306825
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Joshua Cha
a674701be0 nvsciipc: add suspend/resume callback
print suspend/resume status

JIRA NVIPC-3318

Change-Id: I43585ba82ccb75dda92f7276e5d5bab416087818
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297783
Reviewed-by: Jeungwoo Yoo <jeungwooy@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:15 +00:00
Mark Mendez
14c6de030c PCT: Add PIC and Title
Jira ESDP-28694

Change-Id: Ic6fa743f34b6331d85334465961ae64a91aee588
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3307869
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Mark Mendez <mmendez@nvidia.com>
2025-07-24 10:19:15 +00:00
spatki
0b1641eee3 tsec: allow sending more than 1 cmd to same unit
This change removes the check in tsec comms part of dce
which blocks sending more than 1 command to tsec fw for the
same unit. This is to let the display driver force send
command to tsec fw when it is in the middle of a command
to inform it about certain events ex: hotplug. Tsec driver
should trust that display driver is doing checks when sending
the command to tsec fw.

Bug 5008088

Change-Id: Id765c558a8350c501466685d3894a2c8349550eb
Signed-off-by: spatki <spatki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3288182
Reviewed-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Nagaraj P N
f552a45569 cryptodev: update buf addr check for SHA requests
Input buffer VA needs to be checked only for
non-zero copy IVC queues.

Bug 4999798

Change-Id: Ic8bcc44abb65f8e2d614f6734870e81a8d5ec03c
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306711
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:19:15 +00:00
Yuyuan Chen
d27873d84e kernel: nvidia-oot: Fix Static issues S2/5
Jira CAMERASW-31832

Change-Id: I67167abc5939569ab644a22cdf3ce494ee43f391
Signed-off-by: Yuyuan Chen <yuyuanc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3305725
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ryan Li <ryanli@nvidia.com>
2025-07-24 10:19:15 +00:00
Manish Bhardwaj
3ccccf0df8 nvidia-oot: mempool driver header file cert & misra error fixes
using this patch fixing below cert & misra errors:-
- misra_c_2012_rule_21_2_violation: "__UAPI_NVHVIVC_MEMPOOL_IOCTL_H__", an identifier or macro name beginning with an underscore, shall not be declared.
- misra_c_2012_rule_21_1_violation: Defining or undefining a reserved name "__UAPI_NVHVIVC_MEMPOOL_IOCTL_H__", which is an identifier or macro name beginning with an underscore.
- cert_dcl37_c_violation: The reserved identifier "__UAPI_NVHVIVC_MEMPOOL_IOCTL_H__", which is reserved for use as identifiers with file scope in both the ordinary and tag name spaces, is defined.

JIRA ESLC-8398

Change-Id: I82aca2a1c87ee4d2a145671ea0284fe739cb9b16
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297795
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:15 +00:00
Manish Bhardwaj
f204e3ae77 nvidia-oot: vcpu yield driver cert & misra fixes
using this patch fixing below cert & misra errors:-
- cert_dcl37_c_violation: The reserved identifier
  "_UAPI_TEGRA_HV_VCPU_YIELD_IOCTL_H_", which is reserved for use as
  identifiers with file scope in both the ordinary and tag name spaces,
  is defined.
- misra_c_2012_rule_21_1_violation: Defining or undefining a reserved
  name "_UAPI_TEGRA_HV_VCPU_YIELD_IOCTL_H_", which is an identifier or
  macro name beginning with an underscore.
- misra_c_2012_rule_21_2_violation: "_UAPI_TEGRA_HV_VCPU_YIELD_IOCTL_H_",
  an identifier or macro name beginning with an underscore, shall not be
  declared.

JIRA ESLC-8378

Change-Id: I1d8d5f437793a0b964b1ed195f70ab84c6104895
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3301267
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Manish Bhardwaj
72d65d819c nvidia-oot: pm ctl driver cert & misra fixes
using this patch fixing below cert & misra errors:-
- cert_dcl37_c_violation: The reserved identifier "_TEGRA_HV_PM_CTL_H",
  which is reserved for use as identifiers with file scope in both the
  ordinary and tag name spaces, is defined.
- misra_c_2012_rule_21_1_violation: Defining or undefining a reserved
  name "_TEGRA_HV_PM_CTL_H", which is an identifier or macro name
  beginning with an underscore.
- misra_c_2012_rule_21_2_violation: "_TEGRA_HV_PM_CTL_H", an identifier
  or macro name beginning with an underscore, shall not be declared.

JIRA ESLC-8381

Change-Id: Ib944855e143c34b3019f1f93ad9f6894ebf89085
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3301268
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
omar
590c2cab5b drivers: pva: boot from file in sim
In simulation, on VDK or SCSIM, force boot from file

Bug 4872880

Change-Id: Ifc594986f4470cc82ff54a21613c5a249bdea4ae
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3304778
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
omar
d3f9244dcb drivers: pva: enable boot from GSC
Bug 4872880

Change-Id: Ie3be16633e9ee1d53e582da74e157e786668172f
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3296454
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Mahesh Kumar
fb5f279667 platform:dce: Add a delay between ivc reset
Add a few microseconds delay between IVC channel reset retries.
This prevents kernel logs from flooding if dce bootstrapping takes
some time for any reason.

Based on logs below, DCE is taking around 10-30 microsecond for channel reset.
So, Keeping the delay of 10-20 microseconds.

20:26:46.637409: dce: dce_mailbox_set_full_interrupt:157  Intr bit set multiple times for MB : [0x5]
20:26:46.637421: message repeated 15 times: [ dce: dce_mailbox_set_full_interrupt:157  Intr bit set multiple times for MB : [0x5]]
---
20:26:46.637429: dce: dce_mailbox_set_full_interrupt:157  Intr bit set multiple times for MB : [0x1]
20:26:46.637458: message repeated 12 times: [ dce: dce_mailbox_set_full_interrupt:157  Intr bit set multiple times for MB : [0x1]]
----
20:26:46.637461: dce: dce_mailbox_set_full_interrupt:157  Intr bit set multiple times for MB : [0x2]
20:26:46.637471: message repeated 15 times: [ dce: dce_mailbox_set_full_interrupt:157  Intr bit set multiple times for MB : [0x2]]

Jira TDS-6381

Change-Id: I0f8d3c55058019df5a52edd232eae93b3bf84276
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3304216
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Nagaraj P N
965bd044c6 vse/cryptodev: add memory map/unmap interface
- add support for zero copy SHA/GMAC operations
- add support to read zero copy nodes in DT
- support memory buf map/unmap ioctl interfaces
- unmap all memory buffers when FD corresponding
  to device node is closed.
- support only one open call at a time for zero
  copy nodes.

Bug 4999798

Change-Id: If110108a73b24ca9f523a8c67a47c02b922c3fd8
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3292084
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:19:15 +00:00
Ketan Patil
268a87ecfa video: tegra: nvmap: Add DT based API disabling support
There are debug/duplicate APIs like NvRmMemGetIVCId,
NvRmMemHandleFromIVCId, NvRmMemWrite etc. which don't have corresponding
requirements in DriveOS 7.0 Linux NSR. We have taken sign-off from the
stakeholders to confirm that they are not using these APIs in T264 Linux
Prod NSR variant. But some of them are using these APIs in dev-nsr and
did not agree to remove it from dev-nsr, L4T, HOS etc. Hence we need to
make sure that they do not accidentally start using these APIs. Hence
add following DT based disabling support.

- Add disable-debug-support property in tegra-carveouts DT node in T264
prod nsr dts.
- Parse this DT node in nvmap and if the above property is present then
BUG_ON in the ioctl functions corresponding to these APIs.

Bug 4980348

Change-Id: Icdd5aadf3197d0649b61d285f433fa65ea69e806
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3298507
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:15 +00:00
Mainak Sen
b45d59c4a6 gpu: host1x: Enable VI syncpoint pool
Create VI specific syncpoint pool based on
PCT configured VI syncpoint range. VI module shall
allocate syncpoint only from this pool.

Jira HOSTX-5827

Change-Id: I2d6014de2033f0878492d0243010cc7ca507c383
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3290562
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: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:15 +00:00
Suneel Kumar Pemmineti
38d739c860 nvsciipc: Add UID member to Config structure
- Added UID member to nvsciipc_config_entry data
structure. this is needed for implementing
test_nvsciipc_cfgblob in linux.
- removed static from ioctl function to attach eBPF program
- add error-injection.h and ALLOW_ERROR_INJECTION macro to ioctl
  to use bpf_override_return()

JIRA NVIPC-2817

Change-Id: Ic27156e321368041f41fbabff9e6375140fe1d0e
Signed-off-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3301786
Tested-by: Joshua Cha <joshuac@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
2025-07-24 10:19:15 +00:00
Surbhi Singh
b1af9a0347 video: tegra: nvmap: Add checks for addition overflow
Add check for overflow when two unsigned integers are added and return
error in case of overflow condition.

CID 13772217
CID 13772356
CID 13772469
CID 13772634
CID 13772882
CID 13772995

JIRA: TMM-5724
Bug 4479044

Change-Id: Iaa04cc45bfe11a0cfb2e8124d9423e3a66e39f73
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3270465
Reviewed-by: Ajay Nandakumar Mannargudi <anandakumarm@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
saranyad
bb80a707cd KMD: Fix Misra-C:2012 Rule
- This patch fixes the following violations

  OVERRUN - 2 (CIDs 22827501, 22827481)
  - Added checks to validate boundries

  Rule: OVERRUN
  Rule Description: Out-of-bounds access to a buffer

JIRA TDS-15862

Change-Id: I94b19dc491583a63ec242c59cc288c5e32134cc0
Signed-off-by: saranyad <saranyad@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3299743
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Adithya Sanjeev Byalpi <abyalpi@nvidia.com>
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
2025-07-24 10:19:15 +00:00
Mallikarjun Kasoju
14d6946415 watchdog: Fix overflow error
Fixed unsigned int overflow error.

Bug 5083375

Change-Id: If8ddb802938e9ef811462a99023830e3370a00ab
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3296593
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:15 +00:00
amitabhd
090b44a9f1 host1x_emu: Enable event-service for Host1x-EMU
Add change to host1x-fence kernel module to support
its functionality over host1x-emu driver.

Jira HOSTX-5818

Change-Id: I09c7f2ee2059e0eeee11429b059c5152ffd855d5
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3285249
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:15 +00:00
Jukka Kaartinen
3e0be33037 rce: 2D Shmoo API
Add parameters for afe_hf_gain & edge_gain settings to be passed
from the user space to override prod values.
This used to tune these values.
Overriding is only enabled in the non-safety builds.

Jira CAMERASW-31125

Change-Id: I5df17d3530e59b239294acf1cfd4f2c7d3a2b9b2
Signed-off-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300110
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
2025-07-24 10:19:15 +00:00
Yuyuan Chen
3b31f76f27 kernel: nvidia-oot: Fix Static issues S2/5
Jira CAMERASW-31832

Change-Id: I4060480865bf3895fae22127bb3e0c915af8af9f
Signed-off-by: Yuyuan Chen <yuyuanc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297678
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Tested-by: Patrick Young <payoung@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ryan Li <ryanli@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
2025-07-24 10:19:15 +00:00
Mallikarjun Kasoju
5ee83509d5 spi: Fix overflow error
Fixed overflow errors that could be
caused by arithmetic operations.

Bug 5083347

Change-Id: I96779bfa5f106e058056f16c1fe94100308a6d59
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297615
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:15 +00:00
Sanjith T D
a86effcc71 vblk: Fix mapping of SECURE_ERASE to ERASE
In 6.1+ kernel, blk_queue_max_secure_erase_sectors()
has to be used to tell block layer that vblk supports
SECURE_ERASE operation.

Bug 5011844
Bug 4311184

Change-Id: Id61edee27f4ae0db9a92a4e2d331bb3f209fdd85
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300237
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:19:15 +00:00
Hongming Dong
ede67c712a kernel: nvidia-oot: Fix Linux KMD coverity defects
Fix INT30-C, INT08-C, and EXP34-C coverity defects for
cam_fsync.c and cam_cdi_tsc.c.

Jira CAMERASW-30847

Change-Id: I525ed2e0986c3987d062a9baeaefad048715c6c1
Signed-off-by: Hongming Dong <hongmingd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3280943
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
2025-07-24 10:19:15 +00:00
Vishal Thoke
c5fe909fd6 nvdla: kmd: add stub debugfs nodes for DVFS/LPWR
[1] add debugfs nodes for ctrl (clk, power, rail).
    and for dvfs as well.
[2] these nodes are stubbed and will be implemented
    along with features.

Jira DLA-7681
Jira DLA-7797

Signed-off-by: Vishal Thoke <vthoke@nvidia.com>
Change-Id: I534382e78548cde838a28b2a888a8231b5b16ff1
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3296913
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
2025-07-24 10:19:15 +00:00
Ketan Patil
afd5300c2b video: tegra: nvmap: Don't allow executable mapping
Don't allow executable mapping during mmap on the fd corresponding to
memory buffer to prevent security risks of code injection and execution
in kernel space.

JIRA TMM-5962

Change-Id: I3d756afdd1b51c8d651230f1a634ef0909d17cc7
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3298639
Reviewed-by: Ajay Nandakumar Mannargudi <anandakumarm@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:15 +00:00
Suneel Kumar Pemmineti
63a1d3e6e0 nvsciipc: Add nvsciipc_ioctl_get_db_by_idx
- Added nvsciipc_ioctl_get_db_by_idx to retrieve
the endpoint DB entry using index

JIRA: NVIPC-2818
Change-Id: I5651cf29b11dad0ff505f5f497a896572b893e94
Signed-off-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297838
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Nagarjuna Kristam
789e70d35e pci: tegra264: Add EP driver ICD documentation
JIRA NET-2663

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: I5855c28c7834fe6ca8f0571321b04a4997dc6185
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3293557
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:15 +00:00
Bob Zhang
9297cd7cfd kernel: nvidia-oot: Fix Linux KMD coverity defects
Fix INT32-C and INT08-C coverity defects for tegra-rtcpu-trace.c.

JIRA CAMERASW-31291

Change-Id: I2b80963663df440a38e39bdc3b15d240270f99a5
Signed-off-by: Bob Zhang <bozhang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297723
Reviewed-by: Xiaoming Xiang <xxiang@nvidia.com>
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Santosh BS
71c53e0ff0 drm/tegra: set CONFIG_TEGRA_DRM_NATIVE_DIS for emb-linux
Set export variable and build config flag, CONFIG_TEGRA_DRM_NATIVE_DIS,
based on emb-linux platform identifier flag NV_OOT_NVHOST_NATIVE_DIS.

Jira HOSTX-5885

Change-Id: I43d3c08a8494fb25524e4b4a91eb2eb68b3526f2
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297034
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:15 +00:00