Commit Graph

4323 Commits

Author SHA1 Message Date
Akhil R
a29b51cd58 crypto: tegra: Add Tegra SE driver for T264
Add Tegra Security Engine driver which supports AES-ECB/CBC/CTR/XTS
SHA1/SHA2/SHA3 AES-GCM, AES CCM, SM4, SM3 algorithms.

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I86be2fcc485c31988496395183cb44a386907668
2025-07-24 10:19:09 +00:00
Johnny Liu
897629c033 gpu: host1x-fence: share host1x compatible string
Same compatible string can be shared between host1x_next and
host1x_fence kernel modules so that those two modules will get
automatically loaded.

Bug 4291144

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I9901f4e094d1d6484f6d6cec6b9890c9a51ad1f6
2025-07-24 10:19:09 +00:00
jianjunm
a9701b22c1 gpu: host1x-fence: support for t264
host1x-fence driver is updated to support t264.

Bug 4132685

Change-Id: I239d12864d6336cc6acca2265dbec3cd05ee629b
Signed-off-by: jianjunm <jianjunm@nvidia.com>
2025-07-24 10:19:09 +00:00
Santosh BS
c508c47cfa gpu: host1x-nvhost: syncpoint shim support for t264
Update syncpoint shim base and page size for t264.

Bug 4132685

Change-Id: If66987245e0df7552059e0db61d33d952ec427b1
Signed-off-by: Santosh BS <santoshb@nvidia.com>
2025-07-24 10:19:09 +00:00
Santosh BS
26b1cb4a82 drm/tegra: nvhost support for t264
- VIC RISC-V EB boot support
- Programming sequence modification needed for Thor
- Reloc block linear addressing not needed for t264

Bug 4132685

Signed-off-by: Santosh BS <santoshb@nvidia.com>
Change-Id: I8ad47cce31cfd06020e33d3457a0d674a11e4d49
2025-07-24 10:19:09 +00:00
Santosh BS
340bd4418f gpu: host1x: add t264 hw specific nvhost changes
- Add chip specific nvhost files for t264
- Programming sequence modification needed for Thor
- Update the register addresses accordingly for
  mmio-vm, classid-vm, streamid base-limit, channel,
  gating registers .etc

Bug 4132685

Change-Id: I03e710c0941a68e0b6bc1352134eae6d6fd9c2b0
Signed-off-by: Santosh BS <santoshb@nvidia.com>
2025-07-24 10:19:09 +00:00
fraunak
47917521d4 kernel-oot: update pm register offsets
Added t264 specific pdata struct to
use r5_ctrl and pwr_status registers
values.

Jira CAMERASW-11038

Change-Id: I4ae6b3ffee48eff61a6b7a7309c251c38d68bf30
Signed-off-by: fraunak <fraunak@nvidia.com>
2025-07-24 10:19:09 +00:00
Johnny Liu
214da5fa51 platform: tegra: central actmon support for t264
Add new compatible string for t264.

Bug 4630271

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I6d175fef4f0f8789aae7520d91566ae7fab2ae90
2025-07-24 10:19:09 +00:00
Karthik SM
0590272184 drivers: pva: Add debug log buffer header
Jira PVAAS-15616

Change-Id: Ibc3af2b1c0b4ec5cef43efb5672f273da288c513
Signed-off-by: Karthik SM <kmaheshwarap@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176627
Reviewed-by: Bhushan Patil <bhushanp@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arvind Prasad <arvindp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3230149
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:09 +00:00
Karthik SM
4de9787bf1 drivers: pva: move debug log buf to the beginning
Currently, debug buffer is in the end of priv 2 segment address
space. In Safety prod, we only support debug buffer and hence
moving it to the beginning of priv 2 segment buffers

Jira PVAAS-15616

Change-Id: I090db61a7b1c387ca7df476af1f3cede53499e1e
Signed-off-by: Karthik SM <kmaheshwarap@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176293
Reviewed-by: Bhushan Patil <bhushanp@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
Reviewed-by: Arvind Prasad <arvindp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3230148
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:09 +00:00
Sanjith T D
89e53fde2f vblk: Handle SCSI IOCTL case when dxfer_direction is 0
Some user space applications set the dxfer_direction to 0 when
the dxfer_len is set to 0. The native SCSI driver (sg.c) handles this
by checking for both dxfer_direction and dxfer_len.
To be compatible with the native SCSI driver, set the dxfer_direction
to SG_DXFER_NONE when dxfer_len is <= 0.

Bug 4617391
Bug 4318509

Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3133692
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
(cherry picked from commit 3fc4ded22141268c8a28bb40234899c042e49ce4)
Signed-off-by: Sanjith T D <std@nvidia.com>
Change-Id: Ie56128a84d21579de1c187c4bb5611ec33ae2f1b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237146
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:19:09 +00:00
Ishan Shah
ab3d2a477f nvidia-oot: cpuidle: Add module to disable cg
Adding a module that disables cg on t264 specifically. This is meant for
purely internal usage by the SSG and noise-characterization teams.
We are making use of some override signals that remain on a per-core
basis for this purpose.

Bug 4697511

Change-Id: I04093b97b10e1a87bfaa2615573b284a6f1ef4f3
Signed-off-by: Ishan Shah <ishah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237175
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:09 +00:00
Mahesh Kumar
99b291c567 platform: dce: remove unused parameter
This patch removes unused parameter w_type from dce_admin_ipc_wait
function.

Jira TDS-15438

Change-Id: Ida2bbca042a32b5aede32821157995b4aaa2db47
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3236783
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:09 +00:00
Laxman Dewangan
b4c6c5f2a4 tegra-pcie-dma: Disable CONFIG_PCIE_TEGRA_DMA for non-supported kernel
Disable CONFIG_PCIE_TEGRA_DMA for few kernel like jammy-src, stable and
rhivos-1 where PCIE_TEGRA_DMA is not supported.

Bug 4911768

Change-Id: I4c3a379a2bc9facff2744ae83300f3e12587ec17
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237170
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:09 +00:00
Manikanta Maddireddy
3b4ea40773 PCI: Define CONFIG_PCIE_TEGRA_DMA option
Enable CONFIG_PCIE_TEGRA_DMA to support Tegra PCIe generic DMA driver.

Bug 4712065

Change-Id: I061268d023234fe395ab01cd8a2cf523252dfd52
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237169
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:09 +00:00
Sheetal
2e000ca873 ASoC: tegra: Fix ASRC ratio restore issue
"alsactl restore" was not able to restore the value
goes beyond the signed int range for Ratio control.
As Ratio control expected 64bit Integer, change the
type and bits to 64 for "ASRC1 Ratio<x>" controls.

Bug 4870215

Change-Id: I96967968af151fa7b00d1d63bacade4c4d1ccce4
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221692
Reviewed-by: Hirak Biswas <hbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
2025-07-24 10:19:09 +00:00
Jon Hunter
ccdd799b54 misc: mods: Fix build for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update the MODS drivers as
necessary to fix this. Note that we can simply remove the mods_dmabuf
'remove' function because it does nothing.

Bug 4749580

Change-Id: I8ac05a7b713916b9aca1694ca828682808df3287
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3235514
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: Carl Dong <carld@nvidia.com>
2025-07-24 10:19:09 +00:00
Mahesh Kumar
9a1b69df09 platform: dce: Add t264 halify function support
This patch moves T264 files to nvidia-oot repo and adds support
to to Halify HSP functions for T239.

Jira TDS-15438

Change-Id: Ie42d15ab27f9a71312063a4067629030be6869c8
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233122
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:09 +00:00
Mahesh Kumar
2d2fc21cec platform: dce: move hw headers to soc folder
This patch moves HW headers to SOC-specific subfolder to avoid conflict.

Jira TDS-15438

Change-Id: I45796dbe445319dd5d71a304732e11c858135345
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3227902
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:09 +00:00
Mahesh Kumar
9a401f8077 platform: dce: Halify HSP functions
This patch Halify HSP access functions. SOC-specific HSP functions
are assigned during driver prob based on of_device_is_compatible check.

Jira TDS-15438

Change-Id: Ia8d68cd658eaa06dd5d06e8ba92f32907a31fd4f
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225858
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:09 +00:00
Mahesh Kumar
46b8dfe796 platform: dce: Pass hsp-id to the hsp smb functions
This patch modifies HSP SMB functions to use hsp-id as an input.
This is a prework to support multiple instances of DCE HSP.

Jira TDS-15438

Change-Id: I046e456979b58c74bd39b91889b9cf12065646cb
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225857
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:09 +00:00
Mahesh Kumar
96b5772e6d platform: dce: Pass hsp-id to the hsp ss functions
This patch modifies HSP SS functions to use hsp-id a s input.
This is a prework to support multiple instances of DCE HSP.

Jira TDS-15438

Change-Id: Ie359032100fac593dc789fa2f3aefda6123dce7b
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225856
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:09 +00:00
Jon Hunter
5f0c2eed41 memory: tegra: Fix build for Linux v6.10+
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update the Tegra264 memory
drivers as necessary to ensure that they can be built for Linux v6.11+
kernels.

The mem-qual driver is missing the vmalloc.h header file and this also
causes the build to fail for Linux v6.10+ kernels to fail.

Finally, remove the version.h file from the mem-qual driver as this is
not needed.

Bug 4749580

Change-Id: I2f6273dff68fddf0d4eff4c2f4d57c445b3de291
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3235930
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:09 +00:00
Akhil R
f01dd75c1b crypto: tegra: Fix size of buffer allocated
Allocate the buffer based on the request instead of a fixed buffer
length. In operations which may require larger buffer size, a fixed
buffer may fail. Similar patch was added for AES algorithms. Fix the
same for HASH algorithms as well.

Bug 4908156

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: Idd2c1ceae1a85434a5a51154a17dce8c927bb66c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233718
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:09 +00:00
Evgeny Kornev
46e6c161b5 camera: firmware-api: add log and wrapped flag
Add log level as one of the trace header fields
RCE FW would use it to specify log level error strings
and so KMD could split them between such levels during parsing.

Add wrapped counter to signal the KMD of log wrapping around

Jira CAMERASW-27782

Change-Id: I1cd17331fb76ba422d56f8a8b6245ce2c2f4a9a8
Signed-off-by: Evgeny Kornev <ekornev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217717
(cherry picked from commit fcd3f87311866f1cc5fa1c362fe6860d4296c101)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228155
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-by: Mika Liljeberg <mliljeberg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:09 +00:00
Evgeny Kornev
83a23200ef rtcpu: adjust header len
Len for camrtc_event_header is reduced
to uint16_t so ajust casting to uint16_t

Jira CAMERASW-27782

Change-Id: I5da60c9eb4e1d82d1c9251942d5c51dae06fc374
Signed-off-by: Evgeny Kornev <ekornev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3218684
(cherry picked from commit 003f7f7e7a32341162c5b07b6fb1725b15859b75)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228154
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:09 +00:00
Khushi
c68a2ed191 vse: GCSE1/2 SHA Linux
JIRA ESSS-1400

Change-Id: Ie18857f05275cf8063d735526079d815b62c76fb
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221278
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:09 +00:00
Shobek Attupurath
04fa635c7d rtl8852ce: Add Nvidia changes to v1.19.16.1-0-g1fe335ba1.20240815_PC
1. Update makefiles to add Nvidia source path
2. Change file permissions to 0644
3. Delete files with .orig extensions
4. Fix compilation issue due to enum-int mismatch

Bug 4667769
Bug 4667981

Change-Id: I0df6f3073780daf6879c4165cd97fd62fd0a4b65
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3195602
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Tested-by: Shobek Attupurath <sattupurath@nvidia.com>
2025-07-24 10:19:09 +00:00
Shobek Attupurath
7dd632ff96 rtl8852ce: Add base driver v1.19.16.1-0-g1fe335ba1.20240815_PC
- support Android-14
- support Linux kernel 6.9
- support 6G regulation
- support Thermal protection
- support TX shortcut to reduce CPU loading
- fix some coverity issues
- Use RTW regulatory version rtk_8852CE_M.2_2230-67-52
- default enable con-current and MCC

Bug 4667769
Bug 4667981

Change-Id: Iee069ecdd1f00a0b78285d0a4ef5778ed9ace478
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3195601
Tested-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:08 +00:00
Shobek Attupurath
5220de6faa rtl8852ce: Disable realtek 8852CE build for RHIVOS-1 kernel
Disabling build of Realtek RTL8852CE for RHIVOS-1 kernel
as this is not required for RHIVOS-1.

Bug 4667769

Change-Id: I2ac2ac84a3e2efdba5461816b02e92a17e2a6167
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186855
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Kirill Artamonov
de16c140ff video: tegra: isp: Add T264 nvhost client support
Extends ISP5 nvhost client driver to support T264 ISP device
instances.

Jira: CT26X-464

Signed-off-by: Kirill Artamonov <kartamonov@nvidia.com>
Change-Id: I14eb6812b9af0f1c748a9683940478104d75841a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3006537
Tested-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3232409
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:08 +00:00
Amruta Bhamidipati
7ce3d4734a drivers: pva: Update HW Sequencer Validation
- Update HW Sequencer Validation checks to
  accommodate Tensor Data Flow

Jira PVAAS-16700

Change-Id: Ia9f599a59af45c168d6c480f6686a0051dc78d2c
Signed-off-by: Amruta Bhamidipati <abhamidipati@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3229698
Reviewed-by: Michael Chen (SW-TEGRA) <michaelch@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
2025-07-24 10:19:08 +00:00
Nagaraj P N
71ccb24bdc vse: hmac-sha: return error for hash mismatch
Jira ESSS-1632

Change-Id: Ib879b67f360750ca7a3961aee6740d8dcb411513
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3231084
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Jon Hunter
a813cd8c7f PCI: tegra264: Don't initialise core_init_notifier
The 'core_init_notifier' has been removed from the pci_epc_features
structure in Linux v6.10. Given that this is a static structure and it
is initialised as 'false', we don't need to explicitly initialise this
because it will always be initialised as 'false' by default for kernels
that support this.

Bug 4787193
Bug 4593750

Change-Id: Ic2abaa3d2ab1a5c766a805936fd8ab394214bf42
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233999
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Ashish Mhetre
124386b140 video: tegra: nvmap: Refactor nvmap_handle unit
Move the data-structures and functions/declarations belonging to
nvmap_handle into it's header file.

JIRA TMM-5693

Change-Id: I8a19a22512ae7932d645bd306b663fcd437d74d0
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226562
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
e023efadf0 video: tegra: nvmap: Update NvRmMemQueryHandleParams for foreign fd
Add support to query handle parameters For a foreign fd pointing to a
buffer created by OpenRM. Protect the code inside a config. Minimal info
is provided like buffer size and alignment. Other info is not required
as per the discussion with VIC and NvMM team.

Bug 4699600

Change-Id: I286a7f13d5ce33290b72748c9a745164fdff78ea
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3181574
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Jon Hunter
7ca94a27fa PCI: tegra264: Use conftest
Building the Tegra264 PCI Endpoint driver fails with certain kernel
versions such as Linux v6.7. Use the existing conftest definitions for
detecting differences between kernel versions instead of relying on
kernel version itself.

Bug 4911768

Change-Id: I1a755c9f2bc4a58e15c6caf1ecde261faebd57bb
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3234750
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Jon Hunter
cded4cedac PCI: tegra264: Add missing module.h header
The Tegra264 PCIe Endpoint driver is missing the module.h header and
when compiling on some Linux kernel versions the build fails because
the various module functions and macros prototypes are not defined.

Bug 4911768

Change-Id: I4bd83bd1bb8049ad7828aa4ce452fe2ecbbc6be7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3234210
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Jon Hunter
87799bf046 PCI: tegra264: Fix build for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update the Tegra264 PCI drivers
as necessary to ensure that they can be built for Linux v6.11+ kernels.

Bug 4749580
Bug 4911768

Change-Id: I9081f7cb61e9020ec8c1462a3c1b21118d7025bc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233981
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Jon Hunter
f01227d4ea drivers: Drop inline from driver remove wrapper
The driver remove function is a function pointer and therefore, it does
not make sense to define the function as an 'inline'. Update the
coccinelle script and drivers to remove the inline statement.

Bug 4749580

Change-Id: Ia03691b75c4edffe609f27468b911a92a5ddbd68
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233980
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Laxman Dewangan
96dd1cf2ee memory: use conftest test for class_create
In Linux v6.4, the module pointer argument is removed from the
class_create() function. Add a test to the conftest script that checks
if this argument for the class_create() function has been removed and
use the definition created by conftest to select which version of the
function is used.

Bug 4183168
Bug 4221847

Change-Id: Ic1aef0216eae64b32273dc085b8b8306d1235d9b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3234808
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ashish Mhetre
01b31bbabb memory: tegra: Update allowlist of PERFMUX registers
Add few PERFMUX register offsets to allowlist for SOC-HWPM to access.

Bug 4704678

Change-Id: Ica7c6d2a7fc47699abf0969eef1b4b4a518a5b78
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3221623
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:08 +00:00
Ashish Mhetre
6d78ed22c7 memory: tegra: Restrict access to non-PERMUX registers
SOC-HWPM shouldn't request read/write to non-PERMUX registers of
MC-Channels or MSS-HUB. If it does, restrict the access and return
error.

Bug 4704678

Change-Id: I03bae82dfcf4bb9b63e135132b03b5b1e67632f1
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3198241
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:08 +00:00
Ashish Mhetre
ba80679071 memory: tegra: Add driver or smmu-hwpm interface
Bug 4704679

Change-Id: If02ceec6c4b147fe76f578eba678c35500e381ba
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3186439
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:08 +00:00
Ketan Patil
80cc12def2 drivers: tegra: Add mem-qual driver
Add a loadable module for mem-qual STG IP client.
- This driver exposes following device nodes under /dev.
qualdev-0, qualdev-1, qualdev-2, qualdev-3, qualdev-4
- This driver provides 2 ioctls, one is to alloc a buffer and create
IOVA for it by mapping the buffer into the IOVA space of the respective
device.
- Second ioctl is to free the IOVA mapping and pages associated with the
buffer.
- Users of this driver will open the mem qual device node and then call
the first ioctl with size of the buffer as input during init time and
receive the IOVA.
- During deinit time, users will call the second ioctl with the IOVA as
input and the ioctl will free the IOVA mapping and buffer.

Bug 4546339

Change-Id: Idc7279ecf5118de5dbde100d40877150fef29ca5
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3145175
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ashish Mhetre
45eab8b2ae memory: tegra: mc-t26x: Fix ioremap on MCB aperture
MCB aperture is already ioremapped in MC driver using
devm_ioremap_resource(). This doesn't allow other driver to ioremap
this aperture using devm_ioremap* calls.
mc-t26x driver need to access MCB aperture to get carveout info.
So, fix this by using just ioremap on aperture without using devm*
APIs.
Also, fix the carveout apertures.

Bug 4707077

Change-Id: Ie7426ad3519306dd4dffdf54e4c58e81f3c8fb34
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3158697
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
a76cf2b65e memory: tegra: Remove downstream loadable mc-err driver
Downstream mc-err loadable module won't be able to print mc-err during
boot. Hence we are making this a static driver in kernel-oot.
Later on we need to update the upstream mc driver to incorporate the
changes.

Bug 4345191

Change-Id: I97eeb6804234f97d7a8209037f8ad5e7dea4d6c1
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3154336
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Tested-by: Ashish Mhetre <amhetre@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
c549b0894f platform: tegra: mc-utils: Update compatible string
Update compatible string in mc-utils driver to use
nvidia,tegra264-mc-utils instead of nvidia,tegra-t26x-mc, as we want a
separate DT node for mc-utils and dram_channels property would be added
in that DT node, which is required for HV+L case.

Bug 4090660

Change-Id: I9f988da4b264738d66b329d478b231bf36e71a18
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3138031
Tested-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
2b75cb208d memory: tegra: Update mc-err driver as per latest flow
Update mc-err driver for t264 as per the latest flow provided by HW
team.
- Correct register offsets.
- Add mc-error handling flow for MCF, HUB, HUBC, SBS and MC Channel.
- Register interrupt handlers for interrupts from these different
MSS components.

Bug 4345191

Change-Id: Ic0746949a92bebd545bf69f585d48b5c5818cd13
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3131096
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
1cfbb80f3c platform: tegra: mc-utils: Enable debugfs node
Enable debugfs node of mc-utils number of mc channels for t264.
Due to this change, we don't have to enable debug logs while verifying
mc-utils. This will save our time during bringup.

Bug 4090660

Change-Id: I1cf15d182ddeed7f2c93dc5bc65cebdc16590d2b
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3104229
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00