Commit Graph

3075 Commits

Author SHA1 Message Date
prafulls
66ed7619bf nvdisp serdes: first revision
This change includes
1. First version of nvdisp serdes driver.
2. Opcode parsing and implementation as per nvdisp serdes opcode specification.
3. ERRB generic interrupt handler with ERRB specific opcode parsing.
4. Suspend-Resume functionality.
5. Device tree binding documentation.

Verification:
* It is verified with MAX96851 DP serializer on P3710 and P3960.
* GMSL2 and GMSL3, MST like features verified.
* Suspend/Resume functionality verified.
* Internal and Remote video CRC error detection verified.

JIRA TDS-15967

Signed-off-by: prafulls <prafulls@nvidia.com>
Change-Id: I61b9c216b5a7d4bd402dfe55e31f652824c8cc43
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3175316
Reviewed-by: Shu Zhong <shuz@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Eric Funsten
ec5a4957aa drivers: uncore_pmu: fix event attr
- event attr should be bits 4-19

Bug 4813144

Change-Id: If0956c64ebb5c9de52e8f223ccab17aaf5f57405
Signed-off-by: Eric Funsten <efunsten@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3204405
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Besar Wicaksono <bwicaksono@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:07 +00:00
Mahesh Patil
ea427d0f7c nvethernet: ethtool to show 48 VDMA channels stats
Enable ethtool to show 48 channel tx/rx packets stats

Bug 4746911
Change-Id: I8ab615910903f3b3b6a21e1aa6a2d42d6552c5ed
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3178610
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Michael Hsu <mhsu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:07 +00:00
Ketan Patil
aed1fbf6cd video: tegra: nvmap: Move items to correct nvmap unit
- Move macro definitions from nvmap_priv.h to nvmap_alloc unit wherever
required.
- Cleanup unnecessary macros.
- Add function to cleanup the memory allocated for debugfs_info for
iovmm. This was missed in the previous patch where the allocation for
debugfs_info is moved to dynamic memory allocation.
- Move nvmap page pool related data structs from nvmap_priv to
nvmap_alloc unit.

JIRA TMM-5621

Change-Id: I3b668b2d6182da1bf0d2034c66834efc02d3179f
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3203118
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Pritesh Raithatha
db0a9ab702 video: tegra: nvmap: Add header file for nvmap_dmabuf unit
Refactor nvmap dmabuf code by creating header file for functions
exposed by the unit and make internal functions static.

JIRA TMM-5625

Change-Id: Ic5e99506a3362937dc5d1eb3bd05047c9ffdac6a
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3203525
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Nagarjuna Kristam
b55db09752 pci: epf: dma-test: Fix free_irq during remove
Issue: epf-dma-test driver uses MSI IRQ for CRC handling, however, different
IRQ is used when free the same.

Fix: Correct IRQ number to free. Correct ordering of free_irq and
platform MSI irq free.

Bug 4820157

Change-Id: Idbbaed61ddbd45a52e8e833e76c6b64f0fd3e48f
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3204910
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Nagarjuna Kristam
8d11854283 misc: dma-test: Fix free_irq during unbind
Issue: dma-test driver uses MSI IRQ for CRC handling, however, different
IRQ is used when free the same.

Fix: Correct IRQ to free

Bug 4820157

Change-Id: I8b1e5339e8f4e66f12666b0cf2faf4a3991d5129
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3204909
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2025-07-24 10:19:06 +00:00
Surbhi Singh
c150a9c18e video: tegra: nvmap: Add NULL and 0 checks
Fix for Rule: Misra-C 2012 Rule 10.1

- Data type of client is a pointer, hence compare it with NULL.

- Data type of co is a pointer, hence compare it with NULL.

- h is a pointer, hence compare with NULL.

- size is of data type size_t, hence compare it with OU.

- Data type of node is a pointer, hence compare it with NULL.

- Data type of priv, priv->handle is a pointer,
hence compare with NULL.

- Data value of Kzalloc is pointer not a boolean, hence compare new with NULL.

- Data type of vma is a pointer, hence compare it with NULL.

- Data type of elem_size and count is unsigned long, hence compare it
with 0.

- Data type of nr is u32, hence compare it with 0U.

- Data type of ret is int, hence compare it with 0.

- Data type of heap is pointer, hence compare it with NULL.

CID 1675220
CID 1677129
CID 1680522
CID 1680855
CID 1682355
CID 1684748
CID 1685031
CID 1688104
CID 1691439
CID 1691492
CID 1697576
CID 1700206
CID 1703733
CID 1705732
CID 1713149
CID 1713881
CID 1715301
CID 1716395
CID 1718186
CID 1724356
CID 1736224
CID 1737251
CID 1742375
CID 1742507
CID 1743460
CID 1747820
CID 1751065
CID 1753197
CID 1754913
CID 1756020
CID 1758334
CID 1761585
CID 1762790
CID 1763725

JIRA TMM-5594

Change-Id: Iec045c45555b364b5869de856b9bb8a8586dfe02
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3201341
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:06 +00:00
Rakibul Hassan
20ce5d1519 capture: isp: add file ops
This change does the following:
 - Rename tegra194_isp5_ctrl_ops to isp_ctrl_ops
 - Add isp_ctrl_ops to structs that missed it

Without this change, we see errors from core_scf
when it attempts to open /dev/nvhost-ctrl-isp
and /dev/nvhost-ctrl-isp1

Jira CT26X-1679

Change-Id: Ief17d6a5e25efb9549f430bb41e3efd201e118db
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3168176
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
Tested-by: Shubham Chandra <shubhamc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2025-07-24 10:19:06 +00:00
Shobek Attupurath
b5fdfc6e7f rtl8822ce: Add Nvidia changes on v5.14.0.4-250
1. Add custom roam parameters
2. Add path for power file
3. Add source tree path for Makefile
4. Add section in Makefile for TEGRA platform
5. Update permissions from 0755 to 0644 for files
6. Move roaming debug prints to RTW_INFO
7. Remove pr_debug redefinition
8. Move LOG_LEVEL to 0

Bug 4556940

Change-Id: Ic6de0172e6e866c6e81fa84685a929b60051ffce
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3140409
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3202806
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:06 +00:00
Shobek Attupurath
b99dfab495 rtl8822ce: Add driver version v5.14.0.4-250
Release Notes:
1. Add extra queue to handle EAPOL
    Mark include/autoconf.h RTW_EAPOL_QUEUE to disable it
2. Use xmit_ext queue to TX eapol packet
3. Flush roam_buf_pkt after roaming is fail
4. Do NOT roam if previous roam does NOT finish
5. Report to WPS after all roam retries are failed
6. Support 11K beacon report fragmentation
7. Fix compile error on Kernel 5.19.2

Bug 4556940

Change-Id: I2137a24a1eadb1b5eac8e53126909863cec4747b
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3202805
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:06 +00:00
Ketan Patil
8971a981c5 video: tegra: nvmap: Add helper functions for nvmap_heap
- Move all data structures from nvmap_heap.h header file to
nvmap_alloc_int.h file as they are owned by nvmap_alloc unit.
- Provide getter and setter functions to get or set the members of these
data structures.
- Provide forward declaration of such data structures.
- Remove nvmap_heap.h header file as nvmap_heap is part of the
nvmap_alloc unit and nvmap_alloc unit exposes nvmap_alloc.h as header
file to other units.

JIRA TMM-5621

Change-Id: I2c4dd95a1a1011e4a7c1b425aa7521c6f13202da
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3201354
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:06 +00:00
Ketan Patil
98b0460f42 video: tegra: nvmap: Add header files for nvmap_alloc unit
As part of the nvmap_refactoring, add nvmap_alloc.h file which include
declaration for functions which are exposed by nvmap_alloc unit to other
units. Also, add nvmap_alloc_int.h file which include declaration for
functions which are internal to nvmap_alloc unit that can be called by
files within nvmap_alloc unit.

JIRA TMM-5621

Change-Id: Ie30e5e8a4f87591eb9c49a0a349f837a22726fa5
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3198546
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:06 +00:00
Ketan Patil
26287ab7ab video: tegra: nvmap: Correct handle alignment
For the handle allocated from GPU heap, the alignment should be 2MB, as
nvmap allocates huge pages for GPU heap. Make an update for this.

Bug 4510173

Change-Id: I94e11fae2452853be2f3e0a430ee474ff88544f4
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3199230
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:06 +00:00
N V S Abhishek
fcd1fdd03e nvmap: Update license info for Nvmap
Update license info for NvMap with SPDX-FileCopyrightText and latest
year.

Change-Id: I9f000d842a37e607d647d01e0439d2537192cec1
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3117889
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:06 +00:00
Viswanath L
83dded8dd6 nvadsp: Access MSGQ ptrs via pointer increment
Accessing queue and payload fields of MSGQ via array index
causes out-of-bound warnings in new kernel version as they
are initialized as arrays of size 1:
  index 53 is out of range for type 'int32_t [1]'
  index 2045 is out of range for type 'int32_t [1]'

Addressing this by accessing the fields via pointer
increment instead of array index.

Bug 4420795

Change-Id: I873dbe08a894d1eea8866bb8a16018816d0e4db3
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3199294
Reviewed-by: Asha T <atalambedu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:06 +00:00
Surbhi Singh
056a1e6459 video: tegra: nvmap: Add NULL check
Fix for Rule: Misra-C 2012 Rule 10.1

-In nvmap_alloc.c h is of type pointer, hence compare with NULL.

-In nvmap_handle.c
    -the return type of kzalloc is pointer, hence compare it with NULL.

    -Client is a pointer, hence compare it with NULL.

-In nvmap_ioctl.c vaddr is a pointer, hence compare it with NULL.

-In nvmap_pp.c
    - the data type of nvmap_root is pointer, hence compare with NULL.

    - the data type of page is pointer, hence compare with NULL.

-In  nvmap_dmabuf.c
    -  the return type of kzalloc is pointer, hence compare it with NULL.

    - the data type of dev is a pointer, hence compare with NULL.

-In nvmap_priv.c pages are pointer, hence compare it with NULL.

-In nvmap_dev.c dev is a pointer, hence compare it with NULL.

CID 1634656
CID 1637713
CID 1647382
CID 1654006
CID 1657629
CID 1668126
CID 1668779
CID 1671917
CID 1672384
CID 1672959
CID 1653291

JIRA TMM-5627

Change-Id: I2ca971d7957040bf0fbef60b58497c509ca1153f
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3198648
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:06 +00:00
Santosh BS
98a6db4289 gpu: host1x-fence: fence support for multi-instance host1x
Update host1x-fence driver for handling fences for
multi-instance host1x

Bug 4793553
Jira HOSTX-5413

Signed-off-by: Santosh BS <santoshb@nvidia.com>
Change-Id: Ice32d6f7ffe5bced50e2d50abe71530a5c75928f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3198410
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:06 +00:00
Omar Nemri
edf6adc357 gpu: host1x-nvhost: export nvhost_get_host1x_device API
Export the API, that can be used by other modules, for retrieving
the host1x platform_device data for the right host1x instance.

Bug 4793553
Jira HOSTX-5414

Signed-off-by: Santosh BS <santoshb@nvidia.com>
Change-Id: Iadfb9f1f28468a4ff470ea505512a27f9092e2f2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196481
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:06 +00:00
Akhil R
d789effad6 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.

Bug 4798264

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I0eac3e04aed89b07f5674cf69828d3ac0801a6c7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3194058
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:06 +00:00
Surbhi Singh
9d96826773 video: tegra: nvmap: Add Check for NULL & 0 Value
Fix for Rule: Misra-C 2012 Rule 10.1

-In nvmap_pp.c return type of non_zero_cnt is integer not boolean, hence
compare it with 0.

-In nvmap_dmabuf.c the result for & operation would be 0 or 1, hence
compare it with 0.

-In nvmap_core.c the return type of kzalloc is pointer, hence compare it
with NULL.

-In nvmap_dev.c priv is a pointer, hence compare it with NULL.

CID 1608945
CID 1617267
CID 1622229
CID 1625991
CID 1630899

JIRA TMM-5627

Change-Id: Ib40286f852cdade2e115384d18f615ae52134bdd
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197795
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:06 +00:00
Yash Bhatt
4a1b0df1df crypto: Fix stack frame size exceeded error in fuzzing build
Enabling KASAN is causing stack frame size exceeded error in crypto
driver, Fix this by allocating struct get_ivc_db dynamically while
enabling KASAN for fuzzing build.

Bug 4615347

Change-Id: Ie1959b3c79c8ca2f31f79ea76aeb55490bd9917b
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196965
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:06 +00:00
amitabhd
872cead7b6 host1x: Emulated Syncpoint KMD Driver
1. Update Host1x-Syncpt
   - add syncpt-list in syncpoint-pool structure.
   - add exported "host1x-syncpt-*" interface and supporting private interface.
2. Update Host1x-NvHost
   - add support for nvhost-syncpt and nvhost-client interface and supporting private interface.
   - falcon and pm interface not supported
3. Update Host1x-Fence
   - add exported "host1x-fence-*" interface and supporting private interface.
4. Add Host1x-Poll
   - Per Pool polling workequeue created
   - add poll supporting private interface.
5. Add new IOCTL

Jira HOSTX-5514

Change-Id: I187fa7ed89a3479e51b79f9d8d438ede75e1a36a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3136834
Tested-by: Amitabh Dutta <amitabhd@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Amitabh Dutta <amitabhd@nvidia.com>
2025-07-24 10:18:57 +00:00
Ketan Patil
644d35281a Revert "video: tegra: nvmap: Add flag to skip cache cleaning at alloc"
This reverts commit fcb299a9cd.

Reason for revert: The zeroed memory may not reflect in case of non-coherent devices

Bug 4628529

Change-Id: I6bb0c10ebf273a912e71b8252a5ddfd33c70e1fe
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197357
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2024-08-22 05:11:30 -07:00
Shawn Bai
612482b7df [MODS]Check return value of dma_request_chan
Bug 4766784

Change-Id: Ib82eaa709717a43b34066f52fcf47fd5bdd07c72
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192131
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Shawn Bai <xueyuanb@nvidia.com>
Reviewed-by: Shawn Bai <xueyuanb@nvidia.com>
Reviewed-by: Akhil R <akhilrajeev@nvidia.com>
2024-08-22 04:59:50 -07:00
Sanath Kumar Gampa
564d844a70 nvethernet:Fix the negative values in MACSec mmc
Bug 4802208

Change-Id: I4bd975efa4e2668597068910eccc7e98e23de822
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3187063
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2024-08-22 04:50:43 -07:00
Praveen AC
d2fcc70dca camera: Fix v4l2-compliance test fails
Fix following test cases:
1.test invalid ioctls test
2.test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF

return proper error value from the driver.

Bug 4587577

Change-Id: Iee1114d4cc74ba27c3bef30190f936f69cbc32ac
Signed-off-by: Praveen AC <pac@nvidia.com>
(cherry picked from commit 7373b7bc0b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3195935
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2024-08-20 17:51:39 -07:00
Surbhi Singh
5e61dccf81 video: tegra: nvmap: Add NULL Check
Fix for Rule: Misra-C 2012 Rule 10.1

Return value of Kzalloc is pointer not a boolean,
hence compare it with NULL.

CID 1606979

JIRA TMM-5594

Change-Id: I8a275ad38031067045bad6ac4c4cb0199f8f0e12
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3195085
Reviewed-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
2024-08-20 17:47:48 -07:00
Ketan Patil
fcb299a9cd video: tegra: nvmap: Add flag to skip cache cleaning at alloc
For bigger buffer allocation (e.g. 4GB, 5GB etc) from IOMMU heap, 70% of
the total time is consumed in cache cleaning. CUDA team confirmed that,
it is not always necessary to clean the CPU cache during allocation
flow. Hence provide an option to users of libnvrm_mem to skip cache
cleaning whenever required.

Bug 4628529

Change-Id: I9f4cdc930fcc673b69344f0167c8bc1378ec8d61
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192376
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-20 17:44:16 -07:00
Mohit Ingale
3dfd89c75e vi: Don't create debugfs node if base addr is NULL
A crash is observed when trying to access ch1 debugfs register in vi0
and vi1 folder. This is because the base reg address is not defined in
DT. This seems like an old legacy code which is ported over. The
registers accessed by this debugfs node are not longer directly
accessible using CCPLEX. While we wait on confirmation for this, adding
this check to not create debugfs node, if register base address is not
defined.

Bug 4626339

Change-Id: Ife714fa7e989bcaf187956920d757870e5fd9701
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3184450
(cherry picked from commit 1fb6c087c924a540b151183cb5be13311f2c4af1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3185971
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-17 15:07:16 -07:00
Robert Kelly
98be04181c rtcpu: set op point via sysfs
Create and register set and get operating point sysfs functions.

The operating point notification will contain the requested
operating point.

The nvcap resource manager will extract the operating point
from the notfication and send it to rce via the hsp command
interface.

In turn, rce will apply the operating point by adjusting the
functional clock frequencies for the following camera ip:

- rce hardware
- vi hardware
- isp hardware
- nvcsi

Jira CAMERASW-26378

Signed-off-by: Robert Kelly <rkelly@nvidia.com>
Change-Id: Ia814b2716d3738efb3cbc37307a267140b555f42
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3179593
(cherry picked from commit d259727a57ecf4b9463030b3418715891b3b1209)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3189078
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-17 10:38:56 -07:00
vinodg
d7a9c5b734 dce: update for mods test
DCE FW will run the dma test using 512 bytes of transfer
between dram and tcm for 400 iterations and alu test
generating 100 prime numbers for 200 iterations.
DCE running above 600Mhz will take nearly 50msec
for each test.

Jira TDS-16211

Change-Id: I34570acd4db6b8103bd2451833b280dc8e32131a
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192552
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-16 11:01:46 -07:00
Nagaraj P N
ff7c18fc0b vse: add mempool support for GCM decryption
Jira ESSS-359

Change-Id: I1e49b331ec5be2bde208ae0fcac40d7af2fd082a
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3132632
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3191163
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-16 10:52:17 -07:00
Mikko Perttunen
e594972dd7 drm/tegra: virt: Fix nvenc usage measurement
Communication with BPMP attempted to use 'msenc' as engine name.
Correct this to use 'nvenc' while keeping userspace debugfs directory
as 'msenc'.

Bug 4559545

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I4fef852dd3312c763c5845bf8b43fac082863bad
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141443
(cherry picked from commit f2543128b14fb5df7764df7bfa3456bf0df4f945)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3193472
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-15 16:57:04 -07:00
Nagaraj P N
97434deea4 vse: add support for SM4 GMAC
Jira ESSS-1417

Change-Id: Ica5cdb08f04e75fba50badb9bd3342f2cd2004b9
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3172038
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-14 17:48:41 -07:00
Prashant Parihar
afb2145beb nvvse: Enable SM4 CMAC support
Jira ESSS-1409

Change-Id: Ib13b2901cbec8e4b9670fbe43960514e614a60c0
Signed-off-by: Prashant Parihar <pparihar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3170104
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-14 17:48:31 -07:00
jianjunm
783f728b32 Restore "host1x-fence:Free the kzalloc mem"
Restore the memory leak fix that was reverted
due to it caused[k6.8/l4t/]ap_compute_level1_test
to fail in GVS.

New fix is intended to ensure that the fence
and callback cannot be referenced after release.

This reverts commit 42645ad049.

Bug 4779016

Change-Id: Ie2845e1830bb00cb49e7a3c03a91129b28ca62e9
Signed-off-by: jianjunm <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3188619
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-13 23:46:48 -07:00
Jason Mei
9d2dcd5e46 host1x-fence: Remove callback and cancel fence
Issue: [k6.8/l4t/] ap_compute_level1_test is failing in GVS
[ 2720.076010] Call trace:
[ 2720.078520]  kmalloc_trace+0xa8/0x270
[ 2720.082275]  0xffffcb8bdce9f9ac
[ 2720.085497]  __arm64_sys_ioctl+0xa8/0x100
[ 2720.089618]  invoke_syscall+0x44/0x128
[ 2720.093466]  el0_svc_common.constprop.0+0x3c/0xec
[ 2720.098290]  do_el0_svc+0x1c/0x2c
[ 2720.101690]  el0_svc+0x30/0xbc
[ 2720.104831]  el0t_64_sync_handler+0x13c/0x158
[ 2720.109304]  el0t_64_sync+0x16c/0x170
[ 2720.113060] Code: aa1403e1 f9405e64 8b000282 dac00c42 (f8606a95)
[ 2720.119320] ---[ end trace 0000000000000000 ]---
[ 2720.212951] Kernel panic - not syncing: Oops: Fatal exception

Fix: Remove callback and cancel fence in poll

Bug 4779016

Change-Id: I49f2a67cdcb7e8882664fa203fcc90adf8c9341a
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3187581
(cherry picked from commit ae8e0690e8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3188581
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2024-08-13 23:46:39 -07:00
Sheetal Tigadoli
f83d436f52 drivers:nvpps:add support for t26x support
add support for t26x support

Bug 4715145

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: Ide5dc1b0de05e0948bd604f4c709df260888470a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3191794
(cherry picked from commit 97ce1021b4be9450cfbd325c29c0b7e2421f49fd)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192841
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2024-08-13 23:42:33 -07:00
Santosh BS
8ad09fb980 gpu: host1x: utility for local<->global syncpt id conversion
Expose utilities for converting:
- Local syncpoint id to global syncpoint id
- Gobal syncpoint id to local syncpoint id

Bug 4793553
Jira HOSTX-5413

Change-Id: I956ef05a929547aaad4ecf0d1627a6e061618856
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3191230
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-13 10:55:47 -07:00
Krishna Yarlagadda
9dc14f1027 tegra: prod: use legacy prod settings
Remove references to upstream prod settings and use legacy prod.

Bug 4765671

Change-Id: Iafe36bdeab027ae121a99bfda665cc28089907c6
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186209
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-13 10:46:51 -07:00
N V S Abhishek
3fdb84d2c8 tegra: nvmap: Reduce reported freemem from QueryHeapParams
Reduce free memory reported by QueryHeapParams by 0.1% to avoid
OOM issues for Iovmm_heap. For the overall free memory reported
by the query heap params api, page align it to the previous page
to avoid any failures in allocattr due to page align of requested
size, when requested size is equal to reported free size. Update
allocattr api as well so that it checks the available free memory
before allocating.

Bug 4719292

Change-Id: I7ecd69216d58c36ee5d0750107546601400e722d
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3165599
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2024-08-12 21:25:09 -07:00
Bitan Biswas
4593cff331 platform: tegra: rtcpu: fix Mem abort
Fix k6.8 Mem abort after dma_sync_sg_for_cpu
call when running ap_bringup -> camera tests including
test_isp_debugfs_isp6_ob
 - Add pointer NULL check and pass same arguments
   to dma_sync_sg_for_cpu as dma_map_sg

Bug 4396374
Bug 3879036

Change-Id: I8dcad3d3fb21c1bed096d89a879a3343a0358400
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3191329
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-08-12 14:11:25 -07:00
Sheetal Tigadoli
a20117f5c2 nvpps: read TSC timestamp from arm generic timer
read TSC timestamp from arm generic timer in
NVPPS_GETTIMESTAMP ioctl instead of using kernel
maintained software monotonic time. As there is
difference b/w timestamps provided by these methods

Bug 4640166

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: I458dd97198fcf5e7677a6347956c21a1e2f10020
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3133646
(cherry picked from commit 2731b361a3b2380749e623f5d88107c12cf65c0b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3188880
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-11 17:28:10 -07:00
Jon Hunter
951b2423a8 drivers: Fix platform_driver remove for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update all the impacted drivers
as necessary to fix this.

Bug 4749580

Change-Id: I3bb5c549777f7ccad0e3f870373fdd25726ad7ed
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3182878
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-11 17:20:34 -07:00
Mahesh Patil
939e786e16 nvethernet: T264 Fix eqos clk and mgbe gbe mode
- Set eqos app clk speed as IAS for 1G speed
- Update mgbe speed correctly for gbe mode 25G in set speed retry

Bug 4713751

Change-Id: Iebdaecdb47193e6bb50b579223fc411d7b6939f7
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3187408
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Michael Hsu <mhsu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-08 05:00:34 -07:00
Mikko Perttunen
e19e56a251 gpu: host1x: Remove mid-job CDMA flushes
The current code can issue CDMA flushes (DMAPUT bumps) in the middle
of a job, before all opcodes have been written into the pushbuffer.
This can happen when pushbuffer fills up. Presumably this made sense
at some point in the past, but it doesn't anymore, as it cannot lead
to more space appearing in the pushbuffer as it is only cleaned full
jobs at a time.

Mid-job flushes can also cause problems, as in an extreme situation
(seen in practice), the hardware can run through the entire pushbuffer
including the prefix of a partially written job without the driver
being able to process any CDMA updates. This can cause the engine
MLOCK to be taken and held for extended periods as the tail of the
job is not yet available to hardware.

Bug 4606343

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I68ca317150e917428d757d4ee8a68c2c15eaf8de
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186138
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2024-08-06 15:51:12 -07:00
Jon Hunter
b0ff4f1358 pci: endpoint: Update drivers for Linux v6.11
For Linux v6.11, the 'pci_epc_event_ops' structure 'core_init' callback
was renamed to 'epc_init' and a new 'epc_deinit' callback was added.

Update the PCI endpoint drivers for Linux v6.11 by:

 1. Adding tests to conftest to detect the presence of 'epc_init' and
    'epc_deinit'.
 2. Update the drivers as necessary to use the appropriate callback
    depending upon what is present in the kernel.

Bug 4749580

Change-Id: Ife7e2d5d18332bf84f22142c9727dc1ece913c49
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186686
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-05 12:28:50 -07:00
Nagarjuna Kristam
6a29330225 pci: epf: dma-test: Use predefined macros for MSI
Use pre-defined  MSI interrupt numbers for read, write and CRC.

Bug 4779415

Change-Id: I03fd5c9d5f955c2aeefdf26b2fb7d10a2b080d5b
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186459
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2024-08-05 12:27:32 -07:00
Nagarjuna Kristam
9b979e7516 misc: dma-test: Use predefined macros for MSI
Use pre-defined  MSI interrupt numbers for read, write and CRC.

Bug 4779415
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>

Change-Id: I2a7f02abe43703ceff5c471fbb3b77a07d35ddd2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186458
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Tested-by: Nagarjuna Kristam <nkristam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
2024-08-05 12:27:28 -07:00