Commit Graph

4323 Commits

Author SHA1 Message Date
N V S Abhishek
390f3cb907 tegra: nvmap: Add union for dma_coherent_mem types to fix SAST defects
When struct dma_coherent_mem* is typecasted to struct
dma_coherent_mem_replica* coverity complains with CERT EXP 39-C defect.
This defect says that we can not access a variable through a pointer of
an incompatible type.

Coverity is not able to detect that both the types essentially contain
the same members and also, we can not use struct dma_coherent_mem*
directly.

Add an union datatype to have both struct dma_coherent_mem* and struct
dma_coherent_mem_replica*. Union makes the coverity tool accept the
usage of both the types together.

Fix 4 CERT EXP39-C defects.

Bug 4479044

Change-Id: Ia29ede9b47b3e1e110450f365e125cc2b77d2ee7
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262832
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
36e3d424b8 Revert "nvsciipc: Include change for nvsciipc_ioctl.h"
This reverts commit ee72e995da1ee31177a06053b4c89f3ba6a1060a.

Reason for revert: This breaks building the OOT modules standalone without the GPU sources which are not public. Futhermore, this header
appears to be internal and so should not be included in sources that
are distributed publicly.

Jira: NVIPC-2817

Change-Id: I9a98056b004b7b6454473957f488020718eabfd4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263605
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Shobek Attupurath
ca13555cc5 rtl8852ce: Disable driver logging
Default logging is set to INFO, move this to NONE to reduce the
logs shown in kernel logs

Bug 4995363

Change-Id: Ib386a0bc8ba82d45dd0ba333733e4b14e9970b8d
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262102
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
ed9db43d54 drivers: gpu: Fix IOMMU support for Linux v6.13
In Linux v6.13, commit f6440fcc9c7b ("iommu: Remove
iommu_domain_alloc()") removed iommu_domain_alloc() and was replaced by
iommu_paging_domain_alloc(). Use conftest to detect if the function
iommu_paging_domain_alloc() is supported by the kernel and update the
Tegra DRM and Host1x drivers accordingly.

Bug 4991705

Change-Id: I86221d96232396fdb6bdccf40c412e029881c513
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261695
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
eb7a615b59 drm/tegra: Fix genpd support for Linux v6.13
In Linux v6.13, commit d6caca30a548 ("OPP: Drop redundant
*_opp_attach|detach_genpd()") removed devm_pm_opp_attach_genpd(). This
has been replaced by devm_pm_domain_attach_list(). Use conftest to
detect the presence of devm_pm_domain_attach_list() and update the Tegra
DRM driver accordingly.

Bug 4991705

Change-Id: I5a3bd258d3fce5b09fd4ba84adad166e4cf47cfb
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261693
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:11 +00:00
N V S Abhishek
329cbf5ff0 tegra: nvmap: Fix overflow defects in nvmap_dev.c
Fix subtraction and addition overflow defects in nvmap_dev.c using
overflow.h APIs. Add fix for 1 INT 08-C and 1 INT 30-C defect.

Bug 4479044

Change-Id: I5dbd4d66b661c61967847c155f4e03fd9140087c
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262873
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
df3b6e37ff video: tegra: nvmap: Replace IS_ERR with IS_ERR_OR_NULL
-  Replace IS_ERR with IS_ERR_OR_NULL as the pointer is getting
derefrenced. Derefrencing a null pointer can lead to errors.

JIRA: TMM-5724
Bug 4479044

Change-Id: Ia432dc4bd4b7b5db89548c99b9873c3f34471ae4
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261658
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Manish Bhardwaj
f666d39d4d nvidia: timed out wait for userspace response
Using this patch we are waiting for 5secs for
response from userspace else we are returning
error.

Bug 3712829

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I43ee139d4c2f737851ec1cf375e463d7c7c7d6f7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2760068
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Preetham Chandru <pchandru@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261630
Tested-by: Bhavesh Parekh <bparekh@nvidia.com>
Reviewed-by: Bhavesh Parekh <bparekh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svc-bootloader-acv <svc-bootloader-acv@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
cdefe42278 video: tegra: nvmap: Fix INT30-C overflow defects
Add check for overflow in nvmap_debug.c when two unsigned integers are
 added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I4f051ed6db7bfee6eb49e4f818f46f15961037ea
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3235335
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00
Suneel Kumar Pemmineti
936e6687ef nvsciipc: Include change for nvsciipc_ioctl.h
- KMD to refer nvsciipc_ioctl.h from
$TEGRA_TOP/gpu/drv/drivers/nvsci/nvsciipc/inc-linux

Jira: NVIPC-2817
Change-Id: Ic8d86c1320759bf9260d5bb9b4ee82441b0bbb71
Signed-off-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3252263
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:11 +00:00
Laxman Dewangan
9eaa638dfe nvidia-oot: fix the logic of path of makefile
The current makefile path is identified by the lastword of
MAKEFILE_LIST. This works fine till none of the makefile is
included before using the MAKEFILE_LIST, else the value of
the MAKEFILE_LIST get changed with new included makefile path
as last word.

Fix this by getting the path of current makefile at beginning
before including any new makefile path.

JIRA TMM-5842

Change-Id: I9d59e0b2f589dfa036d1f43850a05bc71f84aa48
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262527
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00
Ketan Patil
6af855f1d0 video: tegra: nvmap: Don't expose non-embedded code in embedded builds
The following functions are exported from nvmap code and being used by
nvgpu in non-DriveOS code like L4T. Hence we should not include these
functions in embedded builds.
- nvmap_get_vpr_dev
- nvmap_get_vpr1_dev

The following functions get used in DriveOS as well by nvmap, but no
need to export to nvgpu, as they are not supposed to be used on DrivOS
by other modules. Hence do not export this in embedded builds.
- nvmap_dma_alloc_attrs
- nvmap_dma_free_attrs

In order to achieve this, define a new config file for embedded-linux
and define config and ccflag which can be used in any OOT driver to
differentiate between embedded-linux and non embedded-linux builds.

JIRA TMM-5842

Change-Id: Ic52106709723910e03362977472fb3597dc255f0
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258866
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Arvind M
47b40e9b56 nvdla: kmd: enable syncpoint emulator dependency
- Adds syncpt emulator wrapper class for axi-nvdla.ko module
- Fixes minor bugs
    - The behavior of SHIM write differs between the nvhost
      syncpoint and nvhost-emu. The DLA KMD accommodates the
      same.
    - For the simulator, there is no proper management for loading
      and unloading the firmware. This will lead to a undefined
      behavior. This commit fixes the issue through use of refcnt.
    - The RISCV will be in halted state and will continue from where
      it left off. Due to a security configuration, the DLA cannot
      reload the firmware again and again after booting the system.
      As a WAR, the simulator avoids reloading the IMEM and DMEM.
      Raised a Bug 4960393 to provide a proper fix and work around
      is protected using macro BUG_4960393=1
    - The FPGA is always considered on. Raised a Bug 4972382 to
      enable power management and work around to skip the power
      operation through macro BUG_4972382=1

Bug 4942853

Change-Id: I0bf0262d6fde3b3da47f040c493d915ae6a1f98a
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248734
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
2025-07-24 10:19:11 +00:00
Vikram Kanigiri
873e573464 vblk: use interrupted wait API instead of normal wait
Currently vblk driver uses wait_for_completion() for the requests from block layer or responses from Storage Server.  wait_for_completion() make the current waiter to be un-interrutable. But linux top utility loadavg metric includes the processes both in running state and uninterruptable sate.

Replace wait_for_completion() with wait_for_completion_interruptible()  in driver, so that vblk wait will not be included in loadavg.
This changes is made as per customer request. It is for only cosmetic or for accounting purposes and no effect in functionality.

Bug 4767390

Change-Id: I2b885a1623b7d2d3a7af00951c5421dacf9d3d26
Signed-off-by: Vikram Kanigiri <vkanigiri@nvidia.com>
(cherry picked from commit ff34c49236bf57542eae09a7e7f7189ac8bddd13)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3219307
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
(cherry picked from commit 2784d7b651cea6eb22195443d2cf43593084324b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262249
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Tested-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
2025-07-24 10:19:11 +00:00
gokull
e41e3efcb8 [Vblk]: Get vcpu affinity from the DT node
mpidr will not give the correct HRO VPU
when it is floorswept.

The Change contains:
 [1] Get the VCPU affinity from the DT rather
from mpidr.
 [2] Remove the Mpidr Logic

Bug 4856912

Change-Id: I4d21ed90a8effc94fd3b12a977752b56b3915548
Signed-off-by: Gokul Vasan L J <gokull@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3213689
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Gokul Vasan L J <gokull@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262165
Tested-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
2025-07-24 10:19:11 +00:00
Manish Bhardwaj
06c3fe671a storage: use single core for init request
storage server has restriction to send the init request
also on core 2. So send the connection establishment request
and config request on core 2.

Bug 4619213

Change-Id: I157b5c9d3a4b39129be66235b593a648642cd7cc
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3144043
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262173
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
2025-07-24 10:19:11 +00:00
Manish Bhardwaj
efe8229d72 vblk: use normal wait API instead of io wait
Since thread is waiting for request to come
from filesystem layer instead of actual IO request
to process.So use normal wait API in thread instead
of IO wait API.

Bug 4553019

Change-Id: Ib72bca088b555353ebd3dc6362cd0e24de0a570f
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3100480
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Tested-by: Zuyu Liao <zuyul@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260664
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
2025-07-24 10:19:11 +00:00
Manish Bhardwaj
dc071fdd4c VSC: fix lcpu to vcpu conversion logic
-fix lcpu to vcpu conversion logic by
 considering the missing cluster or holes also.
-if the conversion is not successful then we are
 not pinning the VSCD threads to lcpu.
-populate lcpu to vcpu table once.

Bug 4372079

Change-Id: I8379496da1b7f85d984e1bac1680f830740fea09
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3015784
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260665
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Manish Bhardwaj
b918dd5111 vsc: pin vsc thread to default core
pin the vsc thread to default logical core 2
if the lcpu_affinity dts property is missing

Bug 4231381

Change-Id: I6d9787ae26d5b6562c8379df6d05b9218a02b0b3
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3011514
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260488
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Manish Bhardwaj
c1e81c594f nvidia: protect the vsc driver initialisation path
Using this patch we flashing the below crash issue by
protecting the initialisation path.
05:00:08: [   12.819857] Call trace:
05:00:08: [   12.820282]  swake_up_locked.part.0+0x24/0x60
05:00:08: [   12.820581]  swake_up_locked+0x38/0x50
05:00:08: [   12.820841]  complete+0x50/0x80
05:00:08: [   12.820937] tegra_hv_vblk tegra_virt_storage3: send config cmd to ivc #111
05:00:08: [   12.821000]  0xffff8000012f1714
05:00:08: [   12.821388] tegra_hv_vblk tegra_virt_storage20: allocate drvdata buffer
05:00:08: [   12.821455]  irq_forced_thread_fn+0x48/0xf0
05:00:08: [   12.822010]  irq_thread+0x198/0x2d0
05:00:08: [   12.822244]  kthread+0x198/0x1c0
05:00:08: [   12.822476]  ret_from_fork+0x10/0x20

Bug 4231381
Bug 4365516

Change-Id: I6de423edb18097f29c9983b23fd154b8ffc5f6e2
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3009693
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3010050
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Manish Bhardwaj
16324a47de vblk: create partition specific threads.
create kernel thread for every partition to handle
bio requested based on the partition priority.

Bug 4231381

Change-Id: I4e0b6398bdcc14a204c2de8136d66e09521cd4df
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2998760
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Bhavesh Parekh <bparekh@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2980340
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:11 +00:00
Mallikarjun Kasoju
15244dd468 ufs: Enable mphy power change clock boost for T264
Enable mphy power change clock boost for T264.

Bug 4757621

Change-Id: I714b10f40026296dfd769a066e1413eec933361f
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262100
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:11 +00:00
Jon Hunter
f521823831 thermal: tegra-oc-event: Fix build for Linux v6.13
When compiling the tegra-oc-event driver with Linux v6.13 the build
fails with the following error:

 drivers/thermal/tegra234-oc-event.c:127:48: error: missing braces around
  initialiser [-Werror=missing-braces]
  127 | static const struct attribute_group oc1_data = {
      |                                                ^

The 'NULL' initialiser is not needed in the above structure because it
is not any array. Fix the build for Linux v6.13 by removing the NULL
initialisers from the appropriate structure declarations.

Bug 4991705

Change-Id: I2ddb99a316aa0124e9a4c1850ba1ea87d16abcbc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261689
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Yi-Wei Wang <yiweiw@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
b34e2f9554 video: tegra: nvmap: Fix f_count for Linux v6.13
In Linux v6.13, 'f_count' has been replaced by 'f_ref' in the 'file'
structure. Use conftest to detect if 'f_ref' is present and update the
NVMAP driver accordingly.

Please note that in most cases we can simply use the 'file_count' macro
for getting the count and this has been supported since Linux v2.6.

Bug 4991705

Change-Id: I3ccaf88bd6c3dca5b364205cf03a577945f62092
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260939
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
cb2e183b22 nvmap: Fix incorrect deallocator SAST defect
Deallocator vfree is used when kfree should be used. Use nvmap_altfree
earlier and set pages to NULL, to use appropriate deallocator function
and fix 1 ALLOC_FREE_MISMATCH SAST defect.

Bug 4479044

Change-Id: I0257107fcef31271f14775bc3f6354390caf08f0
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3118540
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
efeecacbd1 tegra: rtcpu: 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: Idc0f5eff6f95f404a24b6d795f6a9460b99639e4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261670
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pushpesh Pranjal <ppranjal@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
52a4903b87 ASoC: tegra: Fix build for Linux v6.13
In Linux v6.13, commit 1bd775da9ba9 ("ASoC: add symmetric_ prefix for
dai->rate/channels/sample_bits") added a 'symmetric_' prefix to some
member of the 'snd_soc_dai' structure. Use conftest to determine if
these structure members have the 'symmetric_' prefix and update the
Tegra Mixer Control driver accordingly.

Bug 4991705

Change-Id: I366595f31932caaa447033c0d0e3b1d2b8dba6e3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261697
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
c9d5d23a33 cpuidle: Fix build for Linux v6.13
Commit ef4c675dc296 ("genirq: Unexport nr_irqs") unexported 'nr_irqs' in
Linux v6.13 and this breaks the build for the cpuidle-debugfs driver.
For Linux v6.13 the number of IRQs can be queried by using the function
irq_get_nr_irqs() instead. Fix the build by using conftest to detect if
the function irq_get_nr_irqs() and use this function if it is present.

Bug 4991705

Change-Id: I98d477896fcf9e8d2e1afa21e2f7ba4d071ab442
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261690
Reviewed-by: Ishan Shah <ishah@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Preetham Chandru R <pchandru@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
4b5bdb9393 nvadsp: t264: Add missing bits.h header
With Linux v6.13, the Tegra264 NVADSP driver fails to build and the
following errors are observed:

 In file included from drivers/platform/tegra/nvadsp/dev-t264.c:4:
  include/linux/reset.h:30:49: error: implicit declaration of function
  ‘BIT’ [-Werror=implicit-function-declaration]
   30 | #define RESET_CONTROL_FLAGS_BIT_ACQUIRED        BIT(2)
      |                                                 ^~~

 In file included from drivers/platform/tegra/nvadsp/dev-t264-aon.c:4:
  /include/linux/reset.h:30:49: error: implicit declaration of function
  ‘BIT’ [-Werror=implicit-function-declaration]
   30 | #define RESET_CONTROL_FLAGS_BIT_ACQUIRED        BIT(2)
      |                                                 ^~~

Fix this by adding the missing 'bits.h' header.

Bug 4991705

Change-Id: I08a6cb59339f8e5221fdc3f39b2a7323cae0cd1f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261688
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
1bdabd6286 ASoC: tegra-virt-alt: Fix build for Linux v6.13
Building the tegra-virt-alt driver with Linux v6.13 fails because some
of the header files are not found ...

 sound/soc/tegra-virt-alt/tegra210_virt_alt_admaif.c:17:10: fatal error:
  tegra_pcm_alt.h: No such file or directory
   17 | #include "tegra_pcm_alt.h"
      |          ^~~~~~~~~~~~~~~~~

The 'tegra_pcm_alt.h' header is located in a 'include' sub-directory and
although the cflags add this path for find headers, the header is not
found because the '#include' of the file uses double-quotes and not
"<>". This could be fixed by simply updating the file with
'#include <tegra_pcm_alt.h>'. However, reviewing the code it simplifies
the Makefile to remove the 'include' sub-directory and directly include
the header files. Similarly, we can remove the search path of the
'nvaudio_ivc' headers and directly include these.

Bug 4991705

Change-Id: I1993d1f619698f33fc9edab05ad9235334fd3b5b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260938
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
1ab9257209 video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for multiplication overflow and return error in case of
overflow condition.

No. of defects fixed - 4 INT30-C and INT 08-C.

JIRA: TMM-5724
Bug 4479044

Change-Id: I00d4a65787a2c516f5c2c410729dfc2a89f65e25
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258030
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: N V S Abhishek <nabhishek@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
447103907c bt: realtek: Fix build for Linux v6.12
In Linux v6.12, commit 5f60d5f6bbc1 ("move asm/unaligned.h to
linux/unaligned.h") moved the 'unaligned.h' header file. The 'rtk_bt.c'
source file does not need this header and so it can be removed. It is
needed in the 'rtk_misc.c' header and so fix this accordingly.

Bug 4876974

Change-Id: Iabeb6d8a95e131a8b6bc2d1e2b97e8539babf19f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3252433
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Pushpesh Pranjal
007a357ab1 kernel: nvidia-oot: fix GVS build issue
- fix for no prototype issue
- class_create failure
- ISO C90 mixed declarations

Jira CAMERASW-29337

Change-Id: I16cc1b6f36df1e1f59acc6add927f30e5a963302
Signed-off-by: Pushpesh Pranjal <ppranjal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248722
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Pushpesh Pranjal
cbf1e15fdc kernel: nvidia-oot: adding use case to discard existing traces
- Add usecase to discard existing traces, using a write call,
that sets last read event index to header's next event index.

Jira CAMERASW-29336

Change-Id: Ibfc94cf5f5484b5a4ad9c2cc6f9eaeb4937ac564
Signed-off-by: Pushpesh Pranjal <ppranjal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242168
(cherry picked from commit 148495ac64e645aff04abdf1d0334e7ea6400982)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248850
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
2025-07-24 10:19:11 +00:00
Pushpesh Pranjal
1ad8bfcf97 kernel: nvidia-oot: adding non-blocking use case
- adding non-blocking use case for fetching raw traces

Jira CAMERASW-27488

Change-Id: Ic60ceb08e9d3e68bf5db20c0da9325c3c183169e
Signed-off-by: Pushpesh Pranjal <ppranjal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3227561
(cherry picked from commit 04b0de1c19db16fb6cfc9b8057d395000c9f6011)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3241812
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Pushpesh Pranjal
2ac9b955e8 tegra: rtcpu : add device node for fetching raw traces
- added a device node to fetch the raw traces
- keeping both option available: existing worker method,
  using device node to fetch raw traces
- both blocking & non-blocking call support,
  user can decide it
- multiple file open support, each file descriptor
  context have its own read pointer of trace memory

Jira CAMERASW-27486
Jira CAMERASW-27487
Jira CAMERASW-27774

Change-Id: I93942d273570857b0073e0e863e41c221c36ebb7
Signed-off-by: Pushpesh Pranjal <ppranjal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3215749
(cherry picked from commit 21a9c245ea4be51117c379d77c45de1ddc3a167c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3241811
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
a44ed47cf4 video: tegra: nvmap: Fix INT30-C overflow defects
Add check for overflow in nvmap_handle.c when two unsigned integers are added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I0f9075796d944cc0c28db15cc611df8a2da780d4
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3250694
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
a50f7f6fc9 video: tegra: nvmap: Fix MISRA C-2012 Rule 19.1
MISRA C-2012 Rule 19.1:
An object shall not be assigned or copied to an overlapping object.

JIRA: TMM-5724
Bug 4479044

Change-Id: I3d5d0cee2bea8ffb79bccb75fd3af1b7bc5b4e36
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258136
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Shubhi Garg
0b75e99ebf oot: fix mutex unlocking in vrs rtc
Kernel throws a dump trace upon setting wakealarm time on VRS RTC.
We are unlocking mutex twice in a single API call. Delete one instance
which is not required.

[  590.301592] Call trace:
[  590.304035]  __mutex_unlock_slowpath.isra.0+0x1d4/0x2d0
[  590.309274]  mutex_unlock+0x60/0x80
[  590.312766]  0xffff80007ce0e6ec
[  590.315909]  __rtc_set_alarm+0x100/0x200
[  590.319751]  rtc_timer_enqueue+0x168/0x2e8
[  590.331275]  dev_attr_store+0x20/0x601e8
[  590.335117]  sysfs_kf_write+0x4c/0x88
[  590.338609]  kernfs_fop_write_iter+0x144/0x1d8
[  590.343149]  vfs_write+0x254/0x398
[  590.353626]  invoke_syscall+0x50/0x14040
[  590.357468]  el0_svc_common.constprop.0+0x48/0x100
[  590.362357]  do_el0_svc+0x24/0x40
[  590.365501]  el0_svc+0x34/0xc8
[  590.372835]  el0t_64_sync+0x194/0x19830/0x140
[  590.376679] ---[ end trace 0000000000000000 ]---

Bug 4715238

Change-Id: I7e070772c81474eb22859f2a00934211e6dad834
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258911
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
1993b57947 video: tegra: nvmap: Fix INT32-C overflow defects
-dupes variable is decremented within the while loop after each call to nvmap_handle_put(ref->handle).

-This prevents an infinite loop scenario where dupes remains greater than 0.

JIRA: TMM-5724
Bug 4479044

Change-Id: Ideea8e05be4d175c5e78895eb5d76fed4b655968
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258081
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
ba177f2f7d video: tegra: nvmap: Fix CERT EXP39-C defects
CERT EXP39-C:
Do not access a variable through a pointer of an incompatible type.

- Typecast &h->vaddr to (void *) and then to atomic_long_t *.

JIRA: TMM-5724
Bug 4479044

Change-Id: I50ae755026924fe3795bbc488a72a325b703d36f
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3256925
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:10 +00:00
Akihiro Mizusawa
627f4ff832 nv-oot: camrtc: Add channel error codes
Add additional CamRTCChannelErrors error codes.

Jira CAMERASW-27854

Change-Id: I01ee983b3834e1ef006a2ac4ade14ba6fceda58f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228740
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
(cherry picked from commit cedd502e4d11becf7f76873b04d89fcccc3ae238)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242222
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:10 +00:00
Akihiro Mizusawa
1b9fe868bc nv-oot: Add early boot HSP commands
Add HSP commands related to RCE early boot logging.

Jira CAMERASW-27443

Change-Id: Ib80a5e5157474119663a010d2b6aa476cd17cdd7
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228077
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3239621
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
2025-07-24 10:19:10 +00:00
Akihiro Mizusawa
1656f9c566 nv-oot: rtcpu: Check early boot logs
- Define boot log related HSP message ID's.
- Call camrtc_hsp_vm_read_boot_log as the first step during the HSP
handshake.
- The read_boot_log function will wait for 2000 ms for a boot log
message. If the RCE has hung during boot, this will timeout, and return
with error.
- Move dev_set_drvdata to before camrtc_hsp_probe in camrtc_hsp_create.
Explanation: The RCE, during a normal boot sequence, will boot before
the RTCPU KMD starts probing, so the mailbox will already be full
when the HSP driver is initializing. The RTCPU HSP full interrupt
handler will be called immediately after the handlers are registered
by the mailbox driver. The interrupt handler will reference the HSP
device's drvdata, and it was a race condition as to whether the
interrupt handler would be called before the drvdata was set.
Thus, this change sets drvdata before the interrupt handlers are
installed to prevent this race condition.
- Update the full interrupt handler to return if camhsp is null.

Jira CAMERASW-27443

Change-Id: Ibb7ed41771d2178e0d06adb94ae1955db61b9d92
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3239620
Reviewed-by: Chinniah Poosapadi <cpoosapadi@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:10 +00:00
ayush
e22e088b96 oot: Fix error handling in isp_capture_setup
This patch implements the following improvements:
1. Add proper NULL pointer checks to prevent dereferencing
   NULL pointers
2. Break down the isp_capture_setup function into smaller, more
   manageable chunks to improve readability and error handling
3. Consistently set error codes before jumping to failure handling
4. Standardize the use of goto statements for error cases
5. Improve error logging using dev_err() to provide more context
   for debugging

Bug 4778298
Jira CAMERASW-27054

Change-Id: I62ff4868b81107ac41e8561729cf1b9bede6c909
Signed-off-by: ayush <ajef@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220092

(cherry picked from commit 905ff68fe62a42685a97402e58a1fa3cbcab28f4)

Change-Id: I7ec8f31ce058f2658d776080c62e44dd5b190463
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3250557
Tested-by: Ayush Jef <ajef@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:10 +00:00
Akhil R
a49c68b4e2 crypto: tegra: Use separate buffer for each host1x command
Allocate separate buffer for each host1x command. The single buffer used
for host1x commands can get corrupted when independent crypto operations
overlap.

Bug 4883011

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I43029364c8e65e5014a5b7068cb45225c039aaf8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3251597
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Mikko Perttunen
adaf80c7df conftest: Add test for of_property_read_reg
Add test for of_property_read_reg function presence, used by
the host1x driver.

Change-Id: I2f735dece273cae6bc3c75f40704be6d08eb213d
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3253531
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2025-07-24 10:19:10 +00:00
Mikko Perttunen
5f7d8f89c6 drm/tegra: Add syncpoint memory export interface
Add a userspace interface for providing access to the memory syncpoint
shim through dma-buf file descriptors. Applications can pass references
to syncpoints to other devices that only support memory semaphores to
facilitate synchronization with syncpoints.

Only syncpoints allocated through the DRM file descriptor ("owned" by
the application) can be exported read-write. All syncpoints can be
exported read-only.

Jira HOSTX-5722
Bug 4919132

Change-Id: I4f5c007b7f9ba65780c418b4e22c5f59a11ef84d
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3252026
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:10 +00:00
Mikko Perttunen
af2a177038 gpu: host1x: Retrieve syncpoint shim information
Retrieve information for the memory syncpoint shim from the device tree
and add an interface to provide the information to other drivers.

The memory syncpoint shim is a special area on the data backbone,
where each memory page corresponds to a host1x syncpoint. Reading
the page returns the value of the syncpoint, and writing to it
increments the syncpoint by one.

Jira HOSTX-5722
Bug 4919132

Change-Id: Ie892abd754f7543fbc56844dcc40cab3f837e305
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3252025
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2025-07-24 10:19:10 +00:00
Mohit Ingale
62c37911c9 tegra: cam_fsync: fix precise freq add extra ticks for all generators
Extra ticks must be added for all generator

Bug 4951965

Change-Id: Ie3a7bdb52fd2f06188b32a1c90896c6ba4aa12cc
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3249235
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3251915
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
Reviewed-by: Ian Kaszubski <ikaszubski@nvidia.com>
2025-07-24 10:19:10 +00:00