Commit Graph

769 Commits

Author SHA1 Message Date
Ketan Patil
f650780b9f video: tegra: nvmap: Avoid double updation of RSS counter
The RSS counter is updated during buffer allocation as well as mmap,
which is leading to double updation. Fix this by decrementing the RSS
counter during page fault while increment it back during unmap flow.

Bug 5222690

Change-Id: I77972185f20d9d710571cc07ae1c5188060bfa1f
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3447073
(cherry picked from commit 5ef68aa58f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3458548
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Amulya Yarlagadda <ayarlagadda@nvidia.com>
Reviewed-by: Amulya Yarlagadda <ayarlagadda@nvidia.com>
2025-09-25 14:36:08 -07:00
Ketan Patil
9148f21496 video: tegra: nvmap: Account NvMap memory for OOM Decisions
Account NvMap allocated memory into both RSS and CG tracking to make
efficient OOM kill decisions during memory pressure.

NvMap allocates memory via kernel APIs like alloc_pages, the kernel
memory is not accounted on behalf of process who requests the
allocation. Hence in case OOM, the OOM killer never kills the process
who has allocated memory via NvMap even though this process might be
holding most of the memory.

Solve this issue using following approach:
- Use __GFP_ACCOUNT and __GFP_NORETRY flag
-  __GFP_NORETRY will not let the current allocation flow to go into OOM
path, so that it will never trigger OOM.
- __GFP_ACCOUNT causes the allocation to be accounted to kmemcg. So any
allocation done by NvMap will be definitely accounted to kmemcg and
cgroups can be used to define memory limits.
- Add RSS counting for the process which allocates by NvMap, so that OOM
score for that process will get updated and OOM killer can pick this
process based upon the OOM score.
- Every process that has a reference to NvMap Handle would have the
memory size accounted into its RSS. On releasing the reference to
handle, the RSS would be reduced.

Bug 5222690

Change-Id: I3fa9b76ec9fc8d7f805111cb96e11e2ab1db42ce
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3447072
(cherry picked from commit 858d73775a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3458546
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Amulya Yarlagadda <ayarlagadda@nvidia.com>
Reviewed-by: Amulya Yarlagadda <ayarlagadda@nvidia.com>
2025-09-25 14:35:59 -07:00
nanwa
11f63191e9 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit b284345610ceb ("pva: fix static defects...")

No changes since last deployment.

Change-Id: I56211cf375961730f67e246f4103217b33893286
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3428161
Reviewed-by: Rohit Goel <rogoel@nvidia.com>
Tested-by: Rohit Goel <rogoel@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3433644
Reviewed-by: Amulya Yarlagadda <ayarlagadda@nvidia.com>
2025-08-15 17:25:39 -07:00
Ketan Patil
55bd49a633 video: tegra: nvmap: Reduce log level to avoid spews
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. Then it fallbacks to follow_pfn or
follow_pfnmap_start functions to obtain pfn from the VA and then obtain
page pointer from it. But as get_user_pages fails, the corresponding
error prints are getting generated even when not required. Hence reduce
the log level to debug to avoid these unnecessary spews.

Bug 5383624

Change-Id: Idbd3cfe93ce3fac6e27efc5c3bb7a200fc183d26
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3425552
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-08-07 03:57:08 -07:00
nanwa
d756afd6a7 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit b0d3faac3c446 ("Fix syncpt mapping crash in Li...")

Changes since last deployment:

- Fix syncpt mapping crash in Linux KMD

Change-Id: I75429bd652f31ac50b9ddd2deb53c7b455658320
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3423360
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-08-05 10:44:59 -07:00
spatki
4a68689610 tsec: add support for s2idle state
TSEC from t26x onwards is booted by PSC. Since s2idle PSC
never resets tsec, there is no need to handle streamid programming
form KMD side.

Moreover this change also fixes a bug wherein tsec KMD would
poweroff the clocks of TSEC in suspend case.

Bug 5407465

Change-Id: Idb648e2f0e7226bb779bd1a801796fa28c415419
Signed-off-by: spatki <spatki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3420250
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-08-04 04:27:14 -07:00
spatki
9a57665a0f tsec: Add support for t264 fw init
This change adds the support for programming streamids to
allow tsec fw on t264 to access PA at a low privilege level.
It also includes the synchronization logic to communicate
with the fw regarding completion of stream id programming
so that the fw can go ahead and initialize itself.

In addition to this, the mailbox used for communicating init done
from tsec fw to ccplex is changed from NV_PTSEC_FALCON_MAILBOX0 to
NV_PTSEC_MAILBOX1 since CCPLEX does not have access to the former from
t26x onwards. Hence falcon based mailboxes are used for tsec-psc comms
and non-falcon ones for tsec-ccplex comms (stream id comms and init done).

Jira TSEC-14

Change-Id: I2871a52222cd69786a8cc3f53162a80486611bb5
Signed-off-by: Sahil Patki <spatki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3366343
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
(cherry picked from commit db54fde9c4d786b22b7f8694753de3ec80649b17)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3400219
2025-07-24 10:20:36 +00:00
Ketan Patil
93fde3b573 video: tegra: nvmap: Add numa checks
Android builds don't have CONFIG_NUMA enabled hence
/sys/devices/system/node/node0/meminfo is not present on android.
While nvscibuf calls the QueryHeapParams to check presence of the
hugetlbfs based carveout, the error prints will be seen due to absence
of the above sysfs file. Hence first check whethere there are multiple
numa nodes are not. If not, then use /proc/meminfo file to retrieve the
hugetlbfs size otherwise use the meminfo sysfs node from the
corresponding numa node.

Bug 5200644

Change-Id: I5495de91726d323210807e86f22757b798226fca
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338255
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Jian-Min Liu <jianminl@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Armandeep Singh
cb108984e1 Merge remote-tracking branch 'origin/dev-t256' into HEAD
Change-Id: I171cfd58fdb25c5ec158a0db11d97ada5603c578
Signed-off-by: Armandeep Singh <armandeeps@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3365262
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Mayuresh Kulkarni
2aa72a2701 tsec: Return SoC specific offsets
Since the offsets for the tsec engine registers have changed with t264,
this change adds the support to use SoC specific register offsets.

Jira TSEC-14

Change-Id: I37afc076809008b0948239f5e9555dfa5c763ba8
Signed-off-by: spatki <spatki@nvidia.com>
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3360321
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:20:35 +00:00
Hitesh Khode
cb4010130d SerDes: BHSI-16, BHSI-10: Add Read after write opcode
Bug 5218749

Change-Id: Iaca83d0c201b746d5e70a4e3717781d0273c55ab
Signed-off-by: Hitesh Khode <hkhode@nvidia.com>
(cherry picked from commit 6ac5c42e80f80f1defb9e8d3f2803f143da4f506)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341500
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
55e777b5cd nvdla: kmd: enable current voltage, power knobs
The following knobs are enabled with this commit.
- power_mW
- voltage_mV
- vftable_mV_kHz (Supported in command list v1.3 and above)

Additionally, the implementation for setting MCU and core frequencies
are accidentally swapped. This commit fixes the issue.

Bug 5185298
Jira DLA-7905

Change-Id: I0e7ec2a7d1d07e7da103f6fe70ee09247f532cfa
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337804
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit 4804a2da70eee29ade79153fac15998d287a5ab1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3340409
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
3850099bf5 nvdla: kmd: support autosuspend, lpwr telemetries
[1] BUG_ON -> WARN_ON as per the recommendation from svcacv.
[2] Updated the power management interface
    - Setting delay for rail, power and clock gating is easier to
        manage with separate API.
    - delay_us has been removed from the gating.
    - New stat interface has been exposed for any stats related
        to the power management operations.
[3] Supports autosuspend feature.
[4] Supports lpwr telemetries for the rail, power, and clock.
    - idle time in us
    - active time in us
    - idle count
    - active count
    - entry and exit latencies in us (max, min and total)

Bug 5185298
Jira DLA-7905

Change-Id: I81267d7c3e9c35c81d29a19efe9192d436322ee9
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3318099
(cherry picked from commit c7cf5bb3b24dd9ed58e55a3fec56c8b1503c7e01)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338010
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Tested-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
3f7a9abe07 nvdla: kmd: support power management with HFRP
Jira DLA-7800

Change-Id: If02567cb5a30a6fbeae7d5256ba612317605fb48
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3303252
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
Signed-off-by: Arvind M <am@nvidia.com>
(cherry picked from commit c71198a1ef7cc7715401da08c24ef2bbc4b44de0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337347
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
3ed7b12ef5 nvdla: kmd: update riscv offsets with firewall
With the registers remapped to the DLA KMD accessible area, the riscv
register offsets are updated to point to the remapped offsets.

Bug 5080056
Jira DLA-7802

Change-Id: Id7558bb032e1702eb17d55e1fc87a2d8dcd3ba30
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300041
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit cccd927a215c370c7297a256901dd93ffdf3d4fa)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337346
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Vishal Thoke
e0a8ac6edf nvdla: kmd: implement dvfs_statdump & set_mcu_freq
[1] connected dvfs_statdump and clk_mcu_freq
    from debugfs to FW interface end to end.

Jira DLA-7799

Change-Id: Ic4871b3acafcd9acf1901a72f5ba3465fb7c252b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306119
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit 8417d0c3c1f68760f4c6427863aba75b9586d86c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337345
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
c27930b9db nvmap: kmd: Add support for ACPI
Bug 5011465

Change-Id: I77ba3d5dcbee602859766db079d2b9a579730bce
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3277542
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit 905368c55e4ae51c01b5d7d4ed8caa022ec73261)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3277546
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
7f006193a3 nvdla: kmd: add support for ACPI
Bug 4988970
Jira DLA-7673

Change-Id: I8d611932cf7b7af107f135e9ae44caad9032a6c0
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3272418
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit e01c86ebdf123d6e9a40986c16f7f3ccbb989cc1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3270720
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:19 +00:00
nanwa
2314d54174 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit 689815042dacd ("Fix syncpt related crash durin...")

Changes since last deployment:

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

Change-Id: I781ac9379787adb9dbdde55cd3fdec5729b08a95
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3358344
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
2025-07-24 10:19:19 +00:00
nanwa
1e36fa1086 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit 52e76e5680447 ("Map only PVA's syncpoints as R...")

Changes since last deployment:

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

Change-Id: Ife641b1a27580e6f74f2b6e806eebc6750f3f846
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3354736
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:19 +00:00
spatki
3b9dbf3106 tsec: Changes to the tsec kmd wrt t264
This change makes the following changes to the tsec kmd to get it
working on t264.

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

Jira TSEC-14

Change-Id: If9fe7498f38018a2fed461281aa02865e6db5e7d
Signed-off-by: spatki <spatki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341847
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-by: Byungkuk Seo <bseo@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2025-07-24 10:19:19 +00:00
Saravanan Ponnuswamy
45b9d2ed87 nvdisp_serdes: Fix CERT ARR30-C
- This patch fixes the following CERT violation
   CERT ARR30-C - 3
     (CID - 6388489)

   - Passed the priv->client directly

 - JIRA TDS-15862

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

Change-Id: If513c6d718019d50d9a19bdd864650be9ed45bfd
Signed-off-by: Saravanan Ponnuswamy <saravananp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3344668
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
2025-07-24 10:19:18 +00:00
Mainak Sen
d3e0d8bb36 nvdla: Replace deprecated syncpt API in EMU driver
This commit replaces the deprecated nvhost_syncpt_unit_interface_init()
and other related deprecated nvhost syncpoint functions
in nvdla_sync_syncpt_emu.c with direct implementations
using the host1x API

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

Bug 4921461

Jira HOSTX-5971

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

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

Bug 3790154

Change-Id: Iad742dfc75430a9b74bf9d03bf5e89c0912eeab1
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313179
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:18 +00:00
Ketan Patil
816ad75551 video: tegra: nvmap: Enable VPR feature
VPR feature is needed for N1-auto on embedded, while this feature is not
required on 7.0. Hence enable this feature to unblock the VPR testing.
Later on in 7.0.4.0 branch create a patch to disable this feature. Once
we have a uniform solution for handling this from program team, we will
switch to that approach.

Bug 5240456

Change-Id: Ib3773bff8b44525f4a1c3b68cc134d96f5c45ee3
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348574
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:18 +00:00
abhinayaa
63f6f2f159 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit a307885246be7 ("umd: port intf tests to umd - ...")

Changes since last deployment:

- umd: port intf tests to umd - add NegativeTest_MaxContextCreate_Single...
- Remove VPU auth default macro
- kmd: Add a null check to fix static defect
- tests: Fix sync unregistration test
- fw: Handle DMA error when fetching chunk
- umd_tests: add requirements tests
- Fix error path of Linux KMD memory API
- Add kernel code style check script
- address review comments for access flag feat
- fix memory leak in access buffer tests
- kmd: use correct formatting
- fw: update license and use macro
- tests: add tests for buffer access type
- feat: respect buffer access flags
- Update deployment document
- Add a default fence wait timeout
- Fix error path of KMD sync ops submit
- Move recovery state check to pva_kmd_device_busy
- Fix error path of profiling level update
- Increase max CCQ FIFO depth to 14
- kmd: zero initialize all commands
- Make KMD robust against firmware abort
- Add multi user stress tests
- Conditional VMEM Clear Check
- Conditional VMEM Clear Check
- Fix static defects in KMD
- Reading auth for all the PVA devices
- Add support for VPU Device Tree authentication
- UMD: Add Null and range checks
- Remove assert and propogate error
- Add error injection tests
- Bug fix - 5207608
- Update CUPVA tests in CI to 2.7.0 rc3
- tests: add register_exec_noop_with_bit_flip
- fw: Fix static defects
- kmd: freeze PVA before freeing code/data memory
- Add missing test_mode parameter for run_test_plan
- deploy: allow deploying to different branches
- pva kmd: linux: handle test mode dt entry
- fw: baremetal: bound breaklink params
- coverity: Set expiry for code quality report
- kmd: Remove PVA_IS_DEBUG from native timeout calc
- Reduce iterations of long duration UMD tests
- Fix IOVA leak in Linux KMD
- fw:common: fix order of enable/disable virt
- umd_test: add missing requirement test specs
- umd_test: add test for perf spikes
- Fix nsight fence logging
- deploy: fix GVS build failure
- Add FSP Abort Hook
- Execution timeout
- Trace fences for NSIGHT
- Fix shared buffer handling during suspend/resume
- tests: add more tests for resource unregistration
- Add MODS test support
- KMD:Fix static defect
- umd: fix double free in cuextend
- umd: Free pva_memory object on free()
- Unify VPU and PPE syscall ID
- Clean up public API
- cuextend: Cleanup implementation
- cuextend: Add API to get stream payload
- compat: Fix missing flushes of event fences
- cuExtend: Unified code path for stream submit
- cuExtend: Implementation of cuExtend Stream Submit
- cuExtend: Stream submit API definitions
- cuExtend: Sync to new cuExtend header
- Set test mode default through macro
- fw: Add PPE error codes
- Use zalloc when allocating resource record
- Allocate Temporary Buffers for DMA Config Loading
- Fix fast reset failure test
- Add DMA config allocator
- kmd: Add unsafe API for block allocator
- Add missing warning for Linux kernel build
- Set err cmd idx to zero if there's no error
- ci: Run tests for MODS test mode
- Use 1K command buffer chunk size in MODS test mode
- Allow developer to provide its own target lease
- tests: add nvsci prefence_postfence_test
- kmd: Sha calculation static defects fix
- kmd: fix INT30-c static defect
- Fix command index logging for PVA_FW_EVENT_RUN_VPU
- Enable vpucfg_destroy_after_submit
- tests: add tests spec for deterministic test
- test: add cpu_signaller_pva_waiter_deterministic
- tests: add cpu_waiter_pva_signaller_deterministic
- Disable verbosity control of FW log
- Ops free API should accept NULL ptr
- Report TCM usage for t26x as well
- Support non-contiguous syncpoints
- umd: fix new top 25 CWE
- License header update
- L2SRAM flush command changes
- debugfs: disable tests for broken nodes
- debugfs: handle 0 input size for allowlist path
- Move pva_kmd_device_idle to context destroy
- Refactor interrupt handler binding in PVA KMD
- Fix DMA registration error path
- debugfs: Add read support for fw log level
- Add stress test suites to CI
- Fix error path for context init
- Add stress test suites
- umd: add NULL checks
- ci: Perf Test Updates
- ci: perf test updates
- Enable boot from GSC in L4T GVS
- Updating comment

Change-Id: I98be7ec270ba5f6fd5bc0978d084d731a88e70b6
Signed-off-by: abhinayaa <abhinayaa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348508
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
2025-07-24 10:19:18 +00:00
Surbhi Singh
9bf1a3723f drivers: video: tegra: Add inline macro for FP
Adding a inline annotation macro to suppress the false positive defect.

Bug 4479044
JIRA TMM-6053

Change-Id: I898f3b2f69b010e73766a82dd5e0c33e2c748437
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338901
Reviewed-by: svcacv <svcacv@nvidia.com>
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:18 +00:00
Vamsee Vardhan Thummala
6b5d0b8383 gpu: host1x: Remove PM ops from DLA host1x bus-side driver
Remove power management ops from the host1x bus-side DLA driver. The host1x
bus-side driver is a virtual device and should not directly access hardware.
PM ops should only be used in the platform device driver.

This fixes suspend/resume test failure when tegra-drm is loaded without any
enabled engines under host1x node.

Bug 5055946

Change-Id: I2e07f759e1d92b4c5a92739e1b5439d39800773f
Signed-off-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337661
Reviewed-by: Sourab Gupta <sourabg@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Mainak Sen <msen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Joshua Widen
7ae5bc1873 host: isp: Correct log level of debug print
A debug print was left at an incorrect level. Spamming the kernel
log and causing high CPU utilization.

Bug 4921461
Jira CAMERASW-32858

Change-Id: I0037d5bc96f3ec3925eee3b565637b2d2a2fa91d
Signed-off-by: Joshua Widen <jwiden@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3335947
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinmay Mahajan <cmahajan@nvidia.com>
2025-07-24 10:19:18 +00:00
Akihiro Mizusawa
dd5c4b741f host: nvcsi: Deprecate nvhost_module_pm_ops
Deprecate the usage of nvhost_module_pm_ops as part of the wider
nvhost API deprecation while maintaining equivalent functionality.

The NVCSI driver does not register prepare_poweroff, poweron_reset,
finalize_poweron callbacks nor set the clock gating regs with nvhost,
so the runtime operations will only call clk APIs.

Bug 4921620

Change-Id: I22a75c9f58ec0980aa97997b674c26a9bb62d47b
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321086
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
Tested-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:18 +00:00
Akihiro Mizusawa
c2dd36f33c host: capture-support: Deprecate nvhost_module_pm_ops
Deprecate the usage of nvhost_module_pm_ops as part of the wider
nvhost API deprecation while maintaining equivalent functionality.

The capture-support driver does not register prepare_poweroff,
poweron_reset, finalize_poweron callbacks nor set the clock gating
regs with nvhost, so the runtime operations will only call clk APIs.

Bug 4921620

Change-Id: I438621258378bb6e81fc7a82e3334dcbfa180dc9
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321085
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: FNU Raunak <fraunak@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:18 +00:00
Akihiro Mizusawa
c555e49cf1 host: isp: Deprecate nvhost_module_pm_ops
Deprecate the usage of nvhost_module_pm_ops as part of the wider
nvhost API deprecation while maintaining equivalent functionality.

The ISP driver does not register prepare_poweroff, poweron_reset,
finalize_poweron callbacks nor set the clock gating regs with nvhost,
so the runtime operations will only call clk APIs.

Bug 4921620

Change-Id: Iadf7b4104f622507e8b2e82fe054151e6318d747
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321084
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: FNU Raunak <fraunak@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:18 +00:00
Akihiro Mizusawa
c84bc1ebe7 host: vi: Deprecate nvhost_module_pm_ops
Deprecate the usage of nvhost_module_pm_ops as part of the wider
nvhost API deprecation while maintaining equivalent functionality.

The VI driver does not register prepare_poweroff, poweron_reset,
finalize_poweron callbacks nor set the clock gating regs with nvhost,
so the runtime operations will only call clk APIs.

Bug 4921620

Change-Id: I639d428f5ea1ed1071d4502a877841b7049b9cd2
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3320983
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: FNU Raunak <fraunak@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
2025-07-24 10:19:18 +00:00
Ketan Patil
6e5aec9ce4 video: tegra: nvmap: Add new heap for VI mempool
- The VI is allowed to access the whole of the Guest VM currently as it
is a stage-2 SMMU device. Hence it can read and write to any memory.
This may lead to breach of confidentiality and integrity. In order to
restrict the VI from accessing the whole VM, a mempool is being created
by HV that would restrict access to VI to just the mempool memory.
- In nvmap, we have some special rules for IVM carveout like if user
specify IVM carveout to allocate from, then if first IVM carveout does
not have sufficient memory then nvmap tries to allocate from next IVM
carveout. We don't want these rules applicable for VI mempool heap,
hence only carveout initialization part would remain similar to IVM
carveouts but rest of the operations would be performed normally like
any other carveout.
- Add DT binding doc for VI-carveout.

Bug 4648721

Change-Id: Ib40415a4c80da908654c86162c1cd4b50b33ef31
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196238
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
2025-07-24 10:19:18 +00:00
Jon Hunter
7a6b9bbadb pva: Fix mixed declarations and code
When building the PVA driver with the compiler option
'-Werror=declaration-after-statement' the build fails with the following
error ...

 drivers/video/tegra/host/pva/./src/kmd/common/pva_kmd_shared_buffer.c:
  In function ‘shared_buffer_process_msg’:
 drivers/video/tegra/host/pva/./src/kmd/common/pva_kmd_shared_buffer.c:
  error: ISO C90 forbids mixed declarations and code
  [-Werror=declaration-after-statement]
  187 |    uint32_t msg_size = safe_subu32(header.size, sizeof(header));
      |    ^~~~~~~~

Fix this build issue by ensuring the variable 'msg_size' is defined at
the start of the shared_buffer_process_msg() function.

Change-Id: Ibd4a51caae06bfda2e11dfc6e3f1cf2f26d618c7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330348
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
Reviewed-by: Nan Wang <nanwa@nvidia.com>
2025-07-24 10:19:17 +00:00
Ketan Patil
838bb12196 video: tegra: nvmap: Gather pages and then flush cache
After a deeper analysis, it was found that multithreaded cache flush is
not required. Only gathering the pages and then doing cache flush is
enough to get the perf improvement, the cache flush time of each page is
almost half in this case as compared with not gathering the pages. So it
means there is continuous cache eviction is happening. So, while
allocating big pages from allocator, instead of allocating one big page
and flushing it, allocate all required big pages and then flush pages
at last.

Bug 4628529

Change-Id: I4d8113010a8c82a1cab124e26b14e8a3f5791cd1
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3325002
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ajay Nandakumar Mannargudi <anandakumarm@nvidia.com>
2025-07-24 10:19:17 +00:00
Ketan Patil
5bb431b8df Revert "video: tegra: nvmap: Add multithreaded cache flush support"
This reverts commit b90900fdece2eb002b5061681aead4a74401b484.
After a deeper analysis, it was found that multithreaded cache flush is
not required. Only gathering the pages and then doing cache flush is
enough to get the perf improvement, the cache flush time of each page is
almost half in this case as compared with not gathering the pages. So it
means there is continuous cache eviction is happening. Hence revert the
multithreaded cache flush support to simply the code and patch 3325002
adds gathering of pages support.

Bug 4628529

Change-Id: Ieb9237c6c2935cbf88036bc3ab83c33dc4d5e38d
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3325001
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
2025-07-24 10:19:17 +00:00
Hitesh Khode
c90336041c SerDes: EPL error reporting on irq
Add EPL reporting support in interrupt handling

JIRA TDS-17145

Change-Id: I3f7257ecbbc66880c65327cfdde52d2de5a3042a
Signed-off-by: Hitesh Khode <hkhode@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322971
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
2025-07-24 10:19:17 +00:00
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
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
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
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
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
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
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
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
Nan Wang
ad2fd77097 pva: mirror from gitlab cv/pva-sys-sw
This commit has below list of fixes:
- kmd: Remove unnecessary checks
- kmd: Fix DMA validation bug
 - Add macros for verbosity controlled logging apis
- Add back pva_dbg_printf
- update copyrights for the modified files
- cleanup and fixes in nvlog support
- Implement debugfs node for setting fw debug log level
- Implement set debug log level cmd
- Add debug log verbosity level control support
- Implement circular buffer for debug logs
- kmd: fix error handling while creating context

Gitlab commit: a6acc89929f69d3aedff442068ee8e5725f03d5d

Change-Id: Ib0fc058324f19c076c3de7990b41c7415707ff28
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3318294
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Nan Wang <nanwa@nvidia.com>
Reviewed-by: Nan Wang <nanwa@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
2025-07-24 10:19:16 +00:00