Commit Graph

4010 Commits

Author SHA1 Message Date
Amruta Bhamidipati
fb031a3ea6 drivers: pva: Disable carveout for T264 by default
GSC path has not yet been enabled on T264, use carveout disabled
settings by default for T264.

Signed-off-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
Change-Id: I44abc2ebb13f4c28bd641d44bbcf9ea0dece647f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2942352
Reviewed-by: Abhinaya Agrawal <abhinayaa@nvidia.com>
Reviewed-by: Krish Agarwal <krisha@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
abhamidipati
d85e055a1e drivers: pva: Add support for T264
- Programming sequence and Driver private data modification for T264
- Add chip specific defines for number of context devices and
context device name length
- Update the VMEM start and end region addresses for T264

JIRA PVAAS-13227

Change-Id: Ib4512e5690d006f8a5139e37c680e74d7d566492
Signed-off-by: abhamidipati<abhamidipati@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2927484
Reviewed-by: Sreehari Mohan <sreeharim@nvidia.com>
Reviewed-by: Krish Agarwal <krisha@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Laxman Dewangan
9037910a40 pva: Remove makefile to prepare for T264 patch apply
To apply the T264 PVA drivers cleanly, remove the Makefile
of PVA as the content will be provided from patch.

Bug 4911768

Change-Id: Iafdc13f79a851076279c248e5ca9a0a9e9a0128e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:07 +00:00
Pritesh Raithatha
36d513f3cd video: tegra: nvmap: refactor nvmap debug unit
-Created nvmap_debug.c and nvmap_debug.h with moving debug related
code from nvmap_dev to nvmap_debug.
-Refactor code to have all debugfs creation in one function and
call it from nvmap_dev. Same for debugfs removal.
-Build nvmap_debug only when CONFIG_DEBUG_FS is enabled.

JIRA TMM-5721

Change-Id: Ib6482be63bdd56c7ff09804c7b1edaa6e4cf2f21
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226784
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:07 +00:00
Jon Hunter
5a54d4161a drivers: Fix build for Linux v6.12
In Linux v6.12 the definition 'no_llseek' was finally removed. Since
Linux v6.0 it had been redefined as NULL. Add a test to conftest to
determine if 'no_llseek' is present and if not then it is no longer
necessary to populate this and we can leave as NULL.

Bug 4876974

Change-Id: I051fdb285b32260b5913dad89cabe0be04253f67
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3222106
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
fraunak
cc49f73763 nvidia-oot: add tracing support to identify isp
This change adds the isp logging to identify which isp instance is being
run in the rtcpu traces.

Jira CT26X-1790

Change-Id: I87744fd15629bb9faa96f5970b5f5ecea4b59937
Signed-off-by: fraunak <fraunak@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221517
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
2025-07-24 10:19:07 +00:00
Johnny Liu
d21ee3b3a8 devfreq: nvhost_podgov: fix build issue for K519+
Since K519+, frequency table and max_state information is stored in the
devfreq struct directly, not in the devfreq_dev_profile struct. Use
nvidia conftest to conditionally build the governor and choose the
correct data structure for accessing the information.

Kernel build won't complain anything when build the governor, but when
the devfreq driver (e.g. nvgpu) trying to add the devfreq device
with the nvhost_pogdov governor, it will fail to add the devfreq
device since the frequency table information is NULL in the
devfreq_dev_profile and the governor use the wrong information.

Bug 4883576

Change-Id: I885bc4ceac885eea5644416b6eacefbbea523a2b
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3229870
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-07-24 10:19:07 +00:00
Viswanath L
a2c75bcda2 nvadsp: Add flag for always ON operation
Add flag 'is_always_on' in driver state that will be set
if DSP CPU is already in running state at driver probe.

Bug 4777122

Change-Id: I99e255266f12f8cc0655f78e269e95ea303c1233
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3223695
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
2025-07-24 10:19:07 +00:00
Ankur Pawar
ea7b98682a media: i2c: fix IMX390 SDR mode corruption
Bottom two lines in IMX390 SDR mode are completely
black. Fix issue in SDR mode table. Also change the
image resolution to 1936x1096.

Last two line are removed by disabling SMPG(Safety Mechanism Pattern Generator) using register 0x2DFC, 0x2E24.

Bug 4505240

Change-Id: I92047ea83d20f1b4ca4e712718051a9c6e69cfcb
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3147214
(cherry picked from commit 3c87c18fcf)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228151
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Addarsh Srivastava <addarshs@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:07 +00:00
Sheetal Tigadoli
d5575a5915 drivers:nvpps:Add PTP-TSC HW Locking suport on T26X
Add PTP-TSC HW Locking suport on T26X based platforms.

Bug 4791366

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: Ib285ca3d945ca93ab3cc0e8473c9fe07f88d0589
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3219460
Reviewed-by: Vijay Mishra <vijaym@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:07 +00:00
Shubham Chandra
7b1b8e17b5 nv_hawk_owl: add error check for reading gpio prop
Add error checks for reading GPIO properties from
device-tree nodes in nv_hawk_owl driver.

Bug 4715132

Change-Id: I6f539d04430883ab839aeaab957809ebb6049238
Signed-off-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3168601
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2025-07-24 10:19:07 +00:00
Shubham Chandra
f6fab5cebe drivers: cam_cdi_tsc: update driver for T264
Update cam_cdi_tsc driver to support TSC - 1ns
per tick for T264.

Bug 4715132

Change-Id: I4c38cde4f8b959ec3c3f5310d1467e18b7d104bd
Signed-off-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3184213
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:07 +00:00
Sanjith T D
7dca31ebf6 vblk: Add access control for FFU and Device management.
Jira SSV-11935

Change-Id: I3cd0e22cdc57ffa3833e9d2710f3c3b1a521d4f8
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3202276
(cherry picked from commit 1fbb9cb8033a76fcda190968436b51d42819d929)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221220
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
kevixie
2cb9cb0925 sipl: add Linux FSYNC driver reconfiguration support
Align Linux FSYNC functionality to QNX non-safety by
adding two non-safety public interfaces to the FSYNC
Kernel Driver to stop and reconfigure FSYNC groups and
their generators.

Also removes individual nodes exposed for each fsync
group and instead accepts group ID as a parameter to
align with QNX functionality and allow configurability
for default group

The design of this feature is documented in Confluence:
CAMERA/FSYNC Reconfiguration for Crosstraffic Cameras

Jira CAMERASW-22038

Change-Id: I3570cd11f62f807464589677c449e899a49f98fc
Signed-off-by: kevixie <kevixie@nvidia.com>
(cherry picked from commit cca0c2364824b025daf2cabc393878907abe03e4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196632
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3202934
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
2025-07-24 10:19:07 +00:00
Janardhan Reddy
cfaad9cd6d nvscic2c-pcie: Add Buffer limts per endpoint
Address security ARR: DOS60-REQ-7169 in streaming mode.
Add per endpoint streaming mode buffer limits.

Bug 4883175
JIRA NVIPC-2453

Change-Id: I31edb2bacf4a8af560e7e6da7d378da874d105bd
Signed-off-by: Janardhan Reddy <jreddya@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196300
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Ankur Pawar
6c9bba8912 media: i2c: enable IMX390 WDR mode
Enable WDR(wide dynamic range) mode for IMX390.
The following modification and addition are done:
1 Add WDR mode table
2 Restructure IMX390 driver for WDR gain and framerate
3 Use common driver to configure serializer(max9295) and
  deserializer(max9296)

Bug 4505240

Change-Id: I52fc3f03a66fe4e2446d7b41f409ed4154c42f02
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3105249
(cherry picked from commit adc35280cb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3117215
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:07 +00:00
Ketan Patil
f384316969 video: tegra: nvmap: Refactor nvmap_dev unit
- Add nvmap_dev.h file which include declaration for functions and data
structs which are exposed by nvmap_dev unit to other units.
- Also, add nvmap_dev_int.h file which include declaration for
functions which are internal to nvmap_dev unit that can be called by
files within nvmap_dev unit.
- Move definition of nvmap_handle_get_from_id, nvmap_install_fd,
find_range_of_handles to nvmap_handle.c as they belong to nvmap_handle
unit.
- Cleanup nvmap_priv.h by moving all relevant items for nvmap_dev unit
to nvmap_dev unit.
- Remove nvmap_mm.c file as nvmap_zap_handle is the only function
present; move it to nvmap_cache.c where it's being called.
- Remove function declarations whose definition are not present.

JIRA TMM-5694
JIRA TMM-5730

Change-Id: Ifd45235076da2ef0c628f3179d828c0ccadf6df2
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3223994
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Mainak Sen
da4fcf255a gpu: host1x: Remove spin loop from Host1x Syncpoint Wait Path
CL 2916412 added a spin loop in Host1x Syncpoint Wait driver to detect
syncpoint threshold expiry condition for the tasks expected
to be completed in a very short time. The objective of this change
was to avoid the creation of Host1x dma fence for very short syncpoint
waits. The downside of this change is adding an extra 5usec penalty
for unexpired syncpoint wait causing perf regression.

This reverts CL 2916412.

Bug 4803002

Change-Id: Ib543a06f4bc3c56123c19375d332b58da650680d
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217067
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:07 +00:00
Pekka Pessi
b53b1d832a rtcpu: validate trace event length
Add checks for trace event length.

A trace event with too small or too large len value could cause a
crash and kernel panic.

Bug 4446545

Change-Id: I404a4e3ba1a4dad04d05583b6ea8126556d0753b
Signed-off-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3126815
(cherry picked from commit 01e1c1b3b3fabd28375aa6ef214ea759175c01f1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3132086
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Tested-by: Evgeny Kornev <ekornev@nvidia.com>
2025-07-24 10:19:07 +00:00
Deepak Badgaiyan
ee10f0e501 nvscic2c: common DMA integration
Integrate with common PCIe eDMA calls.
Common PCIe eDMA will support same calls between
T234 and T264.

Fix pci_epc_set_msi() failure. Initialize msi count.

Jira NVIPC-2448
Jira NVIPC-2708
Change-Id: I860fd2ee86950e558d2b6a362c05dba7988368e9
Signed-off-by: Deepak Badgaiyan <dbadgaiyan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197105
Reviewed-by: Sivagamy Govindasamy <sivagamyg@nvidia.com>
Reviewed-by: Janardhan Reddy AnnapuReddy <jreddya@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:07 +00:00
ruppala
ea972737f0 r8168: Enable CONFIG_SOC_LAN
Enable CONFIG_SOC_LAN for ethernet to support pcie_bus_perf
kernel command line option.

Bug 4607316

Change-Id: I724364a5804d796c13f837f73254e686f59dc0b4
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3162196
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:07 +00:00
Johnny Liu
5b3ba584c3 devfreq: use conftest for conditional module build
Some distros might use old kernel source but with some latest upstream
kernel patches backported to their kernel source tree. To deal with this
scenario and avoid kernel compilation failure, use conftest to check the
existence of features against the kernel source tree which the OOT
modules are built upon and do the conditional build based on the test
result generated with the conftest tool.

Use NV_DEVFREQ_HAS_FREQ_TABLE to determine whether freq_table field is
there in struct devfreq data strcuture, and choose the correct path for
building the module.

Use tegra_wmark-specific devfreq_get_freq_range always to avoid kernel
version check and conftest check. Since devfreq_get_freq_range exists in
the devfreq-specific governor.h (e.g. drivers/devfreq/governor.h) file
instead of globabl linux kernel include header files
(e.g. include/linux/devfreq.h), conftest cannot be used to the existence
of devfreq_get_freq_range kernel function.

Bug 4884092

Change-Id: I5bde4c712f59f38de74c1d8d95135c9b25d621b1
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220896
(cherry picked from commit c580fd0d06)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220970
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Yi-Wei Wang
e049967a27 i2c: nvvrs11: Report power in milliWatts
The unit of the voltage is in milliVolts and the current is in Amperes
for VRS11. So, the power can be reported in milliWatts which provides
higher resolution for better profiling.

Bug 200718059

Change-Id: I0ae52dafa4c7dcc751d9c65b410205163a4fbc45
Signed-off-by: Yi-Wei Wang <yiweiw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3223011
(cherry picked from commit 3741667390)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3223041
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Jon Hunter
7adb4caf5b misc: nvsciipc: Fix build for Linux v6.12
In Linux v6.12, commit 88a2f6468d01 ("struct fd: representation change")
removed the 'struct file' pointer from 'struct fd'. This breaks building
the NVSCIIPC driver that tries to directly access the 'file' pointer
from the 'fd' structure. Fix this by using the helper macros 'fd_empty'
and 'fd_file' as necessary to fix the build.

Bug 4593750

Change-Id: I0f84736b408f533a732476175a8745091bc8542f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217429
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Jon Hunter
c69cddda5d video: tegra: nvmap: Fix build for Linux v6.12
In Linux v6.12, commit ("4ffca5a96678 mm: support only one page_type per
page") removed the definition PAGE_MAPCOUNT_RESERVE and this breaks the
build for NVMAP. The function 'page_has_type()' was added in Linux v5.0
and performs the necessary check and so use this instead to fix the
build.

Bug 4593750

Change-Id: Iaa7393ae11de9730b4ec876a971223e62a7f3f7d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217428
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Jon Hunter
68321dfd20 video: tegra: dc: Correct GPIO definitions
In Linux v6.12, commit 8c045ca534d0 ("gpiolib: legacy: Kill GPIOF_DIR_*
definitions") removed the GPIOF_DIR_* definitions and updated drivers to
use the equivalent GPIOF_* definitions instead. The GPIOF_* definitions
were added in Linux v3.0 and so update the appropriate drivers to use
these definitions.

Note that when calling devm_gpio_request_one() with GPIOF_DIR_OUT for
the flags, then because no explicit output level is specified, the GPIO
driver core defaults to low. Hence, in this case we replace
GPIOF_DIR_OUT with GPIOF_OUT_INIT_LOW.

Bug 4593750

Change-Id: I05664fd4e0abf5755c9514dffe64b239266c92fa
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217397
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Jon Hunter
e3be40a73f pwm: tegra-tachometer: Fix build for Linux v6.12
In Linux v6.12, commit f9ecc2febf6f ("pwm: Don't export pwm_capture()")
made pwm_capture an internal function and this broke the build for the
Tegra Tachometer driver. The pwm_capture() function simply calls the
drivers '.capture' callback and so fix this by directly calling the
function pwm_tegra_tacho_capture() instead. Note that the rpm_show()
function is also moved to after the declaration of the
pwm_tegra_tacho_capture() function.

Bug 4876974

Change-Id: Idf7fbc16382a9077c651755d9907ded7652610cc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217391
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Yi-Wei Wang <yiweiw@nvidia.com>
2025-07-24 10:19:07 +00:00
Ketan Patil
46cb2cd937 video: tegra: nvmap: Move Alloc related code to Alloc Unit
- Query heap functionality belongs to nvmap_alloc unit, as heap is
managed by it. Hence move the function to query the heap to nvmap_alloc
unit.
- Move nvmap_get_user_pages function to nvmap_alloc unit as it is
relevant for nvmap_alloc unit.
- Move nvmap_dma_alloc_attrs/free_attrs functions to nvmap_alloc unit
as they are more relevant for nvmap_alloc unit.
- Move dma_coherent_mem_replica, nvmap_carveout_node structs to
nvmap_alloc unit.
- Cleanup unused macros from nvmap_priv.h

JIRA TMM-5694

Change-Id: I8884831771443de7db0e95c3b2dfc43c03f7c48e
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3214196
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Mahesh Patil
0cca8547a9 nvethernet: Add PCS BASE-R FEC sysfs
Adding PCS BASE-R FEC setting using sysfs node

Bug 4674473

Change-Id: I8f65d66f928c8288218bd404390e9b8117eaef15
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3201972
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:19:07 +00:00
Aki Niemi
4c71b3d40d camera/capture: Fix NULL checks on channel release
Make cure the channel is non-NULL when releasing and unpinning
the VI channel and capture descriptor buffers, respectively.

Bug 4623451

Change-Id: Ieb7f48b2d69a08fb00f7dd8f57fba376d66f9dcd
Signed-off-by: Aki Niemi <aniemi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192587
(cherry picked from commit 99b3c9be9c85b2fb2f06aa1551d893fe11134afe)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3219712
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Ganesh Ram Savithri Sreenivas Murthy <ganeshrams@nvidia.com>
2025-07-24 10:19:07 +00:00
Aki Niemi
462a2ca50f camera: Fix ISP channel release and reset
ISP channels are not released cleanly if the IVC send for
CAPTURE_CHANNEL_ISP_RELEASE_REQ were to fail, leaving the
rest of the release steps undone, including unregistering
the capture and control callbacks. This will prevent any
new channel setups, e.g., after an app restart, because
the channel is deemed busy.

Another problem with ISP channel release is that were the
aforementioned IVC sends to fail, the driver will not
attempt an RCE reboot to recover the IVC communications.

Similarly, if the channel reset IVC request fails or
returns an error, the pending capture and program buffers
won't be unpinned and their related waits won't be
completed.

This fix always performs the cleanups regardless of the
fate of the control channel requests.

Bug 4623451
Bug 4765177

Change-Id: I41ada4bc7dcc72676170d3d30515b5e741120252
Signed-off-by: Aki Niemi <aniemi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192586
(cherry picked from commit feb2be84d1077bec942825bf3cbffc58729f0560)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3219711
Reviewed-by: Ganesh Ram Savithri Sreenivas Murthy <ganeshrams@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: Mohit Ingale <mohiti@nvidia.com>
2025-07-24 10:19:07 +00:00
Sanjith T D
bcb56180c8 vblk: Update the max size for IOCTL.
Jira SSV-11935
Bug 4809400

Change-Id: I4daa668a6744c7015596305cb4616da55e416f54
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3188733
(cherry picked from commit 791b821b984f1fcfe9a4b00817db9e82d3bb73d8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221206
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Mainak Sen
7afa86700c drm/tegra: Add sysfs to trigger SOC power mode change.
For Sentry Mode SHR, Host1x client engine clock needs to configured
to a lower rate or clock-gated. a new IVC comand is added to send
power mode change notification to NvHost Server to perform the clock
rate update.

Jira HOSTX-5373

Change-Id: I9039c5243d5fd40f1da2f11e4449ea2e9b0dfc42
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3181703
(cherry picked from commit dab7c0e0537cf1c18697f69fe9eba8a150b2245a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220776
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
Reviewed-by: Sourab Gupta <sourabg@nvidia.com>
2025-07-24 10:19:07 +00:00
Yash Bhatt
49d30a84cc nvidia-oot: Make fuzzing build similar to kernel-oot
Make fuzzing build similar to oot by adding required config support to
skip building oot drivers from nvidia-oot repo and start building with
oot kernel as inbuilt driver.

Bug 4615347

Change-Id: Ib4121d177f1b4de52ad04fa2923ca24518962816
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220762
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
2025-07-24 10:19:07 +00:00
Sheetal
7d06982db7 ASoC: tegra: Fix Mixer fade status control
"MIXER1 Fade Status" was listing 30 entries but
MIXER has only 10 streams, hence it should show
10 entries. Update the control.

JIRA TAS-2467

Change-Id: I87eeeb64b4a32221ee630ad49c266972501fef96
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220158
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
2025-07-24 10:19:07 +00:00
Nagaraj P N
bc6885d338 vse: allocate dma buffers during driver init
Use dma_alloc_coherent to allocate DMA buffers during probe
instead of on per request basis for SHA/AES requests.

Bug 4637856

Change-Id: I1321b224c61d2f0cda559525b7806504943a81d7
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
(cherry picked from commit ef746fdaec135d114ce04cb7418230c86c8746c1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3213894
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Tested-by: Khushi . <khushi@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
2025-07-24 10:19:07 +00:00
Manish Bhardwaj
56127d0d9b nvidia-oot: add support to use upstream ivc driver
add conftest support to use upstream ivc driver
if tegra_ivc_empty API is exported by kernel.

Bug 4551265

Change-Id: I030bf0c4012aedf4ec623fba2b397869972061a1
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3214054
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:07 +00:00
Manish Bhardwaj
1c3c34f33f nvidia-oot: tegra_bpmp: add dummy driver support
For some of the kernel tegra_bpmp is part of core kernel and
hence it is nto required to use the OOT tegra_bpmp driver.

However, some packaging still expect the tegra_bpmp.ko from
the OOT path. To trick the packaging file, add dummy tegra_bpmp
driver which does not have anything other than module_init/module_exit.

Bug 4551265

Change-Id: Ifae52acb63be009029c820b0ba7b15da6ea7a12e
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3198304
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Manish Bhardwaj
150beca335 nvidia-oot: tegra_hv: add dummy driver support
For some of the kernel tegra_hv is part of core kernel and
hence it is nto required to use the OOT tegra_hv driver.

However, some packaging still expect the tegra_hv.ko from
the OOT path. To trick the packaging file, add dummy tegra_hv
driver which does not have anything other than module_init/module_exit.

Bug 4551265

Change-Id: I59f6233705e2cfb510470ae3b9c1ce7d39618330
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197802
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2025-07-24 10:19:07 +00:00
Manish Bhardwaj
2d8579274a nvidia-oot: use ivc APIs based on conftest flag
Bug 4551265

Change-Id: I75809a5c112b9e3cd5da570c2d9641bd89cfe07e
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217450
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:07 +00:00
Manish Bhardwaj
65d85c5c16 nvidia-oot: ivc_ext: add dummy driver support
For some of the kernel ivc_ext is part of core kernel and
hence it is nto required to use the OOT ivc_ext driver.

However, some packaging still expect the ivc_ext.ko from
the OOT path. To trick the packaging file, add dummy ivc_ext
driver which does not have anything other than module_init/module_exit.

Bug 4551265

Change-Id: I315c9f302e65b4cdc1376815a7bc23e4b7ca3e00
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3214053
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Mahesh Patil
4a4aaf586f nvethernet: Set dma chan bit mask for MC/BC chan
Set the default MC/BC channel mask for packet duplicate

Bug 4844451

Change-Id: I9cfc6eb745dd3fedbf7220c77e30e79bcf91eeb8
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3209202
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Bharat Nihalani
3361d37248 tegra_bl_debug: Read USC_TIMER base from DT
The physical address of Tegra Microsecond Timer USEC_CNTR_USECCVR_0
is currently hard-coded with the address from T234.

The address of this register changes with newer chips. Hence, read
this address from device tree.

Get rid of hard-coded values of address and size.

Change-Id: I416166f6f01cdb6009d4c53717e19f61cebe92e3
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3213600
Reviewed-by: Bhavesh Parekh <bparekh@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svc-bootloader-acv <svc-bootloader-acv@nvidia.com>
2025-07-24 10:19:07 +00:00
Johnny Liu
727ee719a2 conftest: update tests for devfreq and thermal
Introduce the following three tests:
1. devfreq_dev_profile_has_is_cooling_device
2. devfreq_has_freq_table
3. thermal_zone_for_each_trip

Bug 4854967

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I5fe2f7102f667a31d61550487a153590584ed638
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3213844
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Surbhi Singh
8a471e9088 video: tegra: nvmap: Make function static
Fix for: Sparse defects

Sparse defect stated that "symbol 'debug_free_size_fops' was not declared. Should it be static?"

-Since carveouts also have free_size debugfs and it is directly using
 the field from heap struct.
-So to make free_size_fops static we are changing DEBUGFS_OPEN_FOPS to DEBUGFS_OPEN_FOPS_STATIC

Bug 4513982

Change-Id: I296bf95a421a9c751cc11266a896d2806bfc82b4
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3205061
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:07 +00:00
Sanath Kumar Gampa
bba351803a nvethernet:Update CAR programming for MACSec
Issue: 1. Not able to launch supplicant on second VF
2. When launching supplicant on VF1, MACSec link on VF0 is getting lost

Fix: Do not program CAR registers as part of OSD as the same is being
taken care by Server and also do not register for MACSec interrupts.
Same is being handled in Server
2. Enabled packet duplication for MultiCast frames when launching
supplicant

Bug 4824402

Change-Id: I7b26298da8c94df2da823e36476bc37acf6123cd
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3201116
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:07 +00:00
ruppala
cf9a462531 nvethernet: Modify Wframe-larger-than flag for KASAN
KASAN increases the stack usage and that causes a build error for
crossing the stack-frame limits. Increase the frame-larger-than limit
for KASAN from 2048 to 4096 bytes.

Bug 4625047

Change-Id: I77550e524722af377745d47c6a0255e9341f8414
Signed-off-by: ruppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166783
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:07 +00:00
Ashish Mhetre
d2d52d6786 video: tegra: nvmap: Refactor nvmap_handle unit
- Files for nvmap_handle unit: nvmap_handle.c, nvmap_sci_ipc.c,
  nvmap_id_array.c.
- Define external header for nvmap_handle unit as nvmap_handle.h and
  move declarations of all external APIs of nvmap_handle unit to this
  header.
- Define internal header for nvmap_handle unit as nvmap_handle_int.h and
  move declarations of all internally called APIs to this header.

JIRA TMM-5651

Change-Id: Ie4922c0839070491f9893f23744eb700cabb9828
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3211591
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Ketan Patil
ebabca3f65 video: tegra: nvmap: Fix data race between create and destroy client
nvmap uses pid of group_leader task to indicate a client process. During
create_client operation, whenever any client with the same group_leader
pid already exists in clients list of nvmap_device, then nvmap
increments the count field of nvmap_client struct. Otherwise, create a
new nvmap_client. Both of the operations i.e. checking the list for
client and incrementing the counter happen inside lock. On the other
hand, during nvmap_release, first the counter is decremented and checked
if it's zero or not. If it's zero then the lock is taken and client is
removed from client list of nvmap_device. As both the operations i.e.
decrementing the counter value and removing client from list (if the
counter becomes 0) are not happening inside a lock, it's resulting into
the following data race scenario.
1) nvmap_release on existing client process 1
   - decrement client's counter
   - counter value has become zero
   - client is yet to be removed from the dev->clients list
   - context switch happen to __nvmap_create_client as another
namespace/thread with same with same group_leader pid is created.
2) __nvmap_create_client
   - as the client with same pid exists in dev->client list, it
increments counter value to 1, instead of creating a new client struct.
   - context switch happen to nvmap_release from step 1
3) nvmap_release
   - It calls destroy_client and remove the client from dev->client
list.
   - Completes rest of the operations in destroy_client and returns.
   - Context switch to remaining operations from step 2
4) nvmap_release
   - Now, when the nvmap_release will be called for the thread/namespace
which was created in step 2, then list_del operation would fail as the
client struct was already removed from dev->client list.

Fix the above issue by doing both operations i.e. decrementing the
counter value and removing the client struct from dev->client list in a
single lock.

Bug 4829958

Change-Id: I87ebbcb45b18114d0ec75520443bee010f88d59e
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3209794
(cherry picked from commit cc74d1fe1b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3207520
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:07 +00:00
Matti Ryttylainen
5f010bd073 camera: Fix ISP prefence address calculation
If syncpoint_info is on page boundary the address
calculation for where to write syncpoint address
wraps to beginning of the page. Fix ISP prefence
syncpoint address calculation on page boundary.

Bug 4811006

Change-Id: I8b5b39c9ad55ff5b7c4d365588e27282258191d9
Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3199341
Reviewed-by: Akihiro Mizusawa <amizusawa@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:07 +00:00