Commit Graph

281 Commits

Author SHA1 Message Date
Laxman Dewangan
4cf8c80669 nvmap: Copy drivers and headers from kernel/nvidia
Copy the driver and header sources of the nvmap to
kernel/nvidia-oot from kernel/nvidia as part of
removing the dependency of kernel/nvidia for OOT drivers.

The latest (few) git history of the files copied are
	b7a355916 video: tegra: nvmap: Fix type casting issue
	2128c5433 video: tegra: nvmap: Fix type casting issues
	0cd082559 video: tegra: nvmap: Change peer vm id data type
	4bd7ece67 tegra: nvmap: mark ivm carveout pages occupied
	e86f3630a video: tegra: nvmap: Fix type casting issue
	c43a23e58 video: tegra: nvmap: Fix type casting issue
	ca1dda22e video: tegra: nvmap: Fix type casting issue
	1f567abfe video: tegra: nvmap: Fix wrap up condition
	29db4d31c video: tegra: nvmap: Remove unnecessary debugfs
	fe72f1413 video: tegra: nvmap: Remove get_drv_data() call
	3b0fc79e7 video: tegra: nvmap: Fix coverity defect
	3cc0ce41b video: tegra: nvmap: Fix coverity defect
	6da39e966 video: tegra: nvmap: Fix WARN_ON condition
	a16351ff1 video: tegra: nvmap: Remove dead code
	9993f2d2d video: tegra: nvmap: Update print level
	6066a2077 video: tegra: nvmap: Remove nvmap_debug_lru_allocations_show
	3cdf2b7ba video: tegra: nvmap: Add kernel version check
	716ded4fc video: tegra: nvmap: Initialize the return value
	9b6c1b4ab video: tegra: nvmap: Correct debugfs code
	33e70118b video: tegra: nvmap: Fix Cert-C error handling bug
	7b960ed79 video: tegra: nvmap: Fix Cert-C error handling bug
	945dc1471 video: tegra: nvmap: Fix Cert-C error handling bug
	31e572de2 video: tegra: nvmap: Fix Cert-C error handling bug
	1f25cbf68 video: tegra: nvmap: Fix Cert-C error handling bug
	fa5428107 video: tegra: nvmap: Remove nvmap_handle_get_from_fd
	df73f2208 video: tegra: nvmap: Protect kmap/kunmap code
	9842e7c6a video: tegra: nvmap: Remove t19x dma_buf map/unmap
	06dff1a8d video: tegra: nvmap: Remove unnecessary export symbols
	6f097f86b video: tegra: nvmap: Fix Cert-C error handling bug
	f14171608 video: tegra: nvmap: load nvmap for T23x compatible platforms
	266812814 video: tegra: nvmap: Get rid of NVMAP_CONFIG_KSTABLE_KERNEL
	1b38c0887 nvmap: Don't use NV_BUILD_KERNEL_OPTIONS
	0ab8dc032 video: tegra: nvmap: Reintroduce NVMAP_CONFIG_VPR_RESIZE
	cc8db9797 driver: platform: tegra: Separate out vpr code
	28955d95c video/tegra: nvmap: Enable build as OOT module
	876d1fbb8 video: tegra: nvmap: Remove IS_ENABLED check
	5ea30867a nvmap: Add support to build as module from OOT kernel
	a71ad020e video: tegra: nvmap: Protect tegra_vpr args under config
	e70061cc1 video: tegra: nvmap: Do not export cvnas_dev
	d2a26ff36 video: tegra: nvmap: Include missing header
	692e4f682 video: tegra: nvmap: Update page coloring algo
	2b9dbb911 video: tegra: nvmap: Check for return value
	de8de12b6 video: tegra: nvmap: Enable legacy init support
	65d478158 video: tegra: nvmap: Remove dependency of cvnas
	38bdd6f05 video: tegra: nvmap: Make nvmap as loadable module
	9668e410b video: tegra: nvmap: Enable handle as ID
	11c6cbd23 tegra: nvmap: Fix build for Linux v5.18
	fbd95c3ab linux: nvmap: change ivm_handle to u32
	eb1e2c302 video: tegra: nvmap: Fix NVSCIIPC support
	022689b29 tegra: nvmap: return error if handle as ID enabled but id is fd
	19e5106ed video: tegra: nvmap: Don't treat ivm as reserved mem carveouts

Bug 4038415

Change-Id: I7108aec3b8532fe79c9423c2835744b1213719e8
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-04-11 05:47:21 +00:00
Gerrit Code Review
23e30b6908 Merge "nvsciipc: Merge headers from kernel/nvidia to kernel/nvidia-oot" into dev-main 2023-04-07 16:46:03 -07:00
Gerrit Code Review
44e857807a Merge "podgov: Merge podgov driver from kernel/nvidia to kernel/nvidia-oot" into dev-main 2023-04-07 00:11:31 -07:00
Simon Je
c6efef8f74 drivers: misc: Fix license in nvscierror.h
It is updated to be compatible with GPL license.

bug 3871403

Change-Id: I5a6a05b405d8eaa166d0f83d287fccc443a91115
Signed-off-by: Simon Je <sje@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2828259
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-07 05:31:26 +00:00
Joshua Cha
efcc11fc9c misc: nvsciipc: add get vmid cmd
Bug 3813532

Change-Id: I4caa286d4aff5f9d4361b1b34da9bf3257275add
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2787605
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
Reviewed-by: Kurt Yi <kyi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-07 05:31:26 +00:00
Joshua Cha
9766afdf51 misc: nvsciipc: support Inter-VM in auth APIs
1) nvsciipc KMD
* use IVC KMD to query peer VMID (ivc_cdev_get_peer_vmid).
* Support Inter-VM in NvSciIpcEndpointMapVuid().
* Added debugging ioctl cmds to debug in userspace level
- validate auth token
- map vuid
* Add peer_vmid to config entry and endpoint DB.
* Add IOCTL_GET_DB_SIZE cmd to return DB entry count

2) IVC KMD (ivc-cdev)
* Add ivc_cdev_get_peer_vmid() to return peer_vmid of qid.
* Add IOCTL_GET_VMID to return guest VM ID

JIRA NVIPC-390
JIRA NVIPC-394

Change-Id: I14634fd2d17c4a28b09b9a3f9f2d42c9169e0dfb
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2766220
Reviewed-by: Simon Je <sje@nvidia.com>
Reviewed-by: Kurt Yi <kyi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-07 05:31:26 +00:00
joshuac
ef59a0da4d misc: nvsciipc: update to support x86 build
Added missing fs.h to fix build error.
Added debug info for root user only.
Added alternative header path for x86 build.
Fixed NvSciIpcEndpointMapVuid() API.
remove mutex except for SET_DB IOCTL (lockless for read operation).
Added more ioctl commands.
 - NVSCIIPC_IOCTL_GET_DB_BY_NAME
 - NVSCIIPC_IOCTL_GET_DB_BY_VUID

JIRA NVIPC-227

Change-Id: I95fc6f9fff36c9c1df999b11109236b1b3481d62
Signed-off-by: joshuac <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2755193
Reviewed-by: Kurt Yi <kyi@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-07 05:31:26 +00:00
Suresh Venkatachalam
dadb881df5 misc: nvsciipc: increase endpt name max size to 64
Increase the endpoint name max size from 32 to 64
Increase the devname  max size from 32 to 64

Bug 3437754

Change-Id: Iaa0eef040fe8ad1ebca7309c0abd94a80f5fe42e
Signed-off-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2641680
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-07 05:31:26 +00:00
Abhijit
51ef39c2ab drivers: misc: Add nvsciipc kernel module
This patch adds nvsciipc kernel driver. At present its only use is to
support NvSciIpc secure buffer sharing use case across processes.

JIRA ESLC-4105

Change-Id: Ib2889d7c0c7a3928ad1e84c8dd58f3aa287c6185
Signed-off-by: Abhijit <abhijit@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2146877
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-07 05:31:26 +00:00
Laxman Dewangan
9670f38765 include: nvhost: Add nvhost header file
Add nvhost header file include/linux/nvhost.h
copied from the kernel/nvidia as part of removing
nvidia-oot dependency on the kernel/nvidia.

Bug 4038415

Change-Id: I758f95f1295507ed57d89ea13d67877de6bf9bce
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2882788
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-06 00:43:08 -07:00
Ankur Pawar
2a2ce69017 media: add imx318 sensor driver
Add imx318 camera sensor driver code,
mode tables and makefile changes.

Bug 3583587

Change-Id: I9854909823b67856edc50c2364e519e853134178
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2870729
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-06 00:42:04 -07:00
Gerrit Code Review
e257be9884 Merge "tegra_gr_comm: Integrate drivers from kernel/nvidia" into dev-main 2023-04-04 21:57:24 -07:00
Mobile Promotions
f32cb60c46 Merge branch 'promotion_rebase' into promotion_build 2023-04-04 21:57:04 -07:00
Gerrit Code Review
197d2ed9eb Merge "host1x-nvhost: Integrate host1x-nvhost drivers from kernel/nvidia" into dev-main 2023-04-04 21:56:39 -07:00
Laxman Dewangan
cf15a1f3df i2c: buses: nvvrs11: Copy driver from kernel/nvidia
Make the copy of drivers of i2c/busses/i2c-nvvrs11
from kernel/nvidia to kernel/nvidia-oot.
This will remove the dependency of the OOT drivers
with kernel/nvidia-oot repo.

Bug 4038415

Change-Id: I3353f2744915763c3e5f14164746fc540cd585dc
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2881573
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 21:56:16 -07:00
Akhilesh Reddy Khumbum
a2163680aa nvidia-oot: Add aon kmd module
- This patch includes AON-KMD module as part of OOT kernel.

Bug 3583580

Change-Id: I531731136189d76ebb4d3f2880e8f46913f390f4
Signed-off-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2870990
Reviewed-by: Robert Collins <rcollins@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-04 21:43:50 -07:00
Peng Liu
216ab9426c devfreq: podgov: use cycles/sec to estimate load
GPU clock may change within the period of time defined by smooth. Thus
the result of averaging load percentages within smooth window has less
meanning. New method keeps track of active GPU cycle count per time
unit, and average load is average active cycle count divided by
current GPU clock (total cycle count per time unit).

Bug 1963732

Change-Id: I88cfb998f9bcfa0d6d0397f653f8e3096d4b3eed
Signed-off-by: Peng Liu <pengliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2033266
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Konsta Holtta
294c447b83 video: tegra: host: podgov: add trace events
Add the trace events header for the POD devfrqe governor used when
CONFIG_DEVFREQ_GOV_POD_SCALING=y.

This file is copied from linux 4.4; the original consists of these three
commits:

5e6afca7aef06a7e9df9c0cc91ee3a19f279349f drivers: video: tegra: 3d
scaling uses devfreq

122a4c533b13711363e94b27ca13d7af5c04675a video: tegra: host: add 3dfs
user space control

9ee601182294d82e2273710640798c7fbc145c79 video: tegra: host: podgov: Add
dev to trace events

Bug 1853519

Change-Id: Idcf5a67443c698cc0740452ccb130550f12d1b3f
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1454590
(cherry picked from linux-4.9 commit e981a42830212e5924296505e133dedf630b65ec)
Reviewed-on: https://git-master.nvidia.com/r/1772234
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Richard Zhao
5fb49dd72a video: tegra: virt: remove virt_ctx from tegra_gr_comm
queue index can already index the queues. It also help make the api more
common.

Jira EVLR-2364

Change-Id: I5ba8f03bf8ae9cc8d1a51a6d5c48eef969276ed0
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1646195
Reviewed-by: Damian Halas <dhalas@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Aingara Paramakuru <aparamakuru@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nirav Patel <nipatel@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 17:41:13 +00:00
Shridhar Rasal
e651d2e8dd video: tegra: virt: add virt include file
This copies virtualization interface include file in kernel-next

[b99549f] <Aingara Paramakuru> video: tegra: virt: update comm framework
[e0c27a2] <Aingara Paramakuru> video: tegra: virt: add virtualization interfaces

Change-Id: Ie51931ff2fd5c80d430591bba057d123d10c8b7b
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/1127824
(cherry picked from commit 39df7d7844fba18e69a317628235570d9b8ed4a5)
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1314848
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2023-04-03 17:41:13 +00:00
Mahesh Kumar
88028eda4b gpu: host1x-nvhost: Align syncpt interface APIs
The syncpt interface APIs in the host1x-nvhost driver slightly differ
from those in the legacy nvhost driver because instead of passing the
platform device structure for the host1x device, the platform device
structure for the host1x client device is passed.

By aligning the APIs so that we pass the platform device structure for
the host1x in all implementations, we can simplify the PVA driver and
directly use the APIs in the NVIDIA display driver.

The NVIDIA display driver requires some additional syncpt interface APIs
and so implement these as well.

Bug 3713048

Change-Id: I507e6fd066e6e22c0c47c20ba0dd3be5fa033c59
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2813827
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 14:06:51 +00:00
Jon Hunter
2e94a90e1d gpu: host1x-nvhost: Update syncpt helper functions
- add get aperture API
- add get syncpt offset api

Bug 3768126

Change-Id: I95ae6a149e8a362317f4f1c89e7a1eac3c596fe4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2782259
Tested-by: Omar Nemri <onemri@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 14:06:51 +00:00
Arvind M
f16d677563 nvdla: kmd: add support for stride signal action
NVDEV_FENCE_SIGNAL_STRIDE fence action translates to
ACTION_INCREMENT_SEM firmware action.

Jira DLA-4445

Change-Id: Idb537ea784614d031f66c570359dbc7dd74374af
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2548309
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Anup Mahindre <amahindre@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 14:06:51 +00:00
Arvind M
831cb47c60 video: tegra: host: restores sof/eof, TS feature
This commit restores the following,
[1] 890be46 video: tegra: host: dla: refactor and cleanup code
[2] 109f8e8 video: tegra: host: add prefence signal support
[3] 6f683c8 video: tegra: host: add sof/eof taskstatus support
[4] a9cb0c9 video: tegra: host: add sof/eof timestamp support
[5] dcdb0d6 video: tegra: host: increase fw minor version

Jira DLA-1992
Jira DLA-1993

Change-Id: I9844b141b72fc553ba7d886e706e340160586129
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2135092
Tested-by: Mitch Harwell <mharwell@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 14:06:51 +00:00
Sachin Jadhav
8a803afc52 Revert "video: tegra: host: add prefence signal support"
This reverts commit 109f8e8c53e5296ea8c782086500c2e78d99cfbd.

Change-Id: I4fd6f37e271c52f4a1c1b6870c0b1355118a301d
Signed-off-by: Sachin Jadhav <sachinj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2133502
2023-04-03 14:06:51 +00:00
Arvind M
c165791a7b video: tegra: host: add prefence signal support
[1] Adds support for prefence signal support
[2] Facilitates handling of SOF feature request from higher
    levels
[3] Update ioctl structure for emu_submit to allow prefence
    with signal action

Jira DLA-1992
Jira DLA-1993

Change-Id: Id0fe8a7a3ff46227121ec5342197b1da2a3f346d
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2121530
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 14:06:51 +00:00
Dmitry Antipov
a03ddacc0d eventlib: unify NVDLA/PVA fence types and add fence recording
Bug 2170736

Change-Id: If4fdeda140bf2474a08beb2a0d7c3fc1737a1a66
Signed-off-by: Dmitry Antipov <dantipov@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1750906
Reviewed-by: Saleh Dindar <sdindar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Colin Tracey <ctracey@nvidia.com>
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 14:06:51 +00:00
Deepak Nibade
fd1ad24e14 video: tegra: host: move exported APIs to public header
Exported APIs like below are defined in private header file
nvhost_syncpt_unit_interface.h
nvhost_syncpt_unit_interface_get_aperture()
nvhost_syncpt_unit_interface_get_byte_offset()

This causes linking problems if these functions are needed
by some other driver outside nvhost

Hence move these exported APIs into a new public
header in include/linux/nvhost_t194.h

Change-Id: Ib70177da71c2cc6aee1c6da2668b0a92ea01ccf7
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1480588
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2023-04-03 14:06:51 +00:00
Chris Dragan
cb0c45b6dd misc: mods: update from Perforce
Bug 3992588

Change-Id: I04aad94aebef7a48d9afac528347fc50c219d888
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2872373
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Carl Dong <carld@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 13:27:53 +00:00
Sudeep Surendra
b2f9fe02de Add FFA command MODS_FFA_CMD_C2C_TEST.
Signed-off-by: Sudeep Surendra <sudeeps@nvidia.com>
Change-Id: I40714fcac3e9c15c6f9aa1fd79f8ba3529dad71c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2864435
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2023-04-03 13:27:53 +00:00
dongqiang
9ac86753e5 Add FFA Cmd MODS_FFA_CMD_HSS_TEST for HSS test
Added new FFA cmd for running HSS in MODS SP

JIRA TM-617

Signed-off-by: Carl Dong <carld@nvidia.com>
Change-Id: If1eabd112c19e7fcafb41aeed9e1eb51ee2f325d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2860682
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 13:27:53 +00:00
Chris Dragan
4f0b7852df misc: mods: update from Perforce
Change-Id: I2c38de4b6471211fb417284cae7c52702a1ef7a5
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2846196
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 13:27:53 +00:00
koenz
0e7a054913 drivers/misc/mods: Add mods_bpmpipc component
- Add mods_bpmpipc component for support BPMP MRQ comunication on
  "product_security" fused chips
- Add ioctl "MODS_ESC_BPMP_UPHY_LANE_EOM_SCAN" for uphy eom read

DVS: https://builds4u.nvidia.com/dvs/#/change/3220339765791234.2?showTab=DVS

JIRA TM-949
Bug 3846090

Change-Id: I1aebf99b7516d55cd84e01a6ba36801546bbb1ed
Signed-off-by: koenz <koenz@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2828417
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 13:27:53 +00:00
Sudeep Surendra
9265e42093 misc: mods: add ioctl to communicate with SP
JIRA TM-617

Change-Id: I9c786048cf9bec07233bbed38edbf11fe6c555c0
Signed-off-by: Sudeep Surendra <sudeeps@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2730674
Tested-by: Carl Dong <carld@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 13:27:53 +00:00
Chris Dragan
8061cf233b misc: mods: fix offset for large allocations
Fix MODS_VIRTUAL_TO_PHYSICAL for allocations exceeding 4GB

It's unlikely for us to support such large allocations,
but if we ever did, integer overflow would truncate the
allocation offset, resulting in the incorrect PA being
returned.

This change also brings the driver up to date with
the Perforce copy and fixes the version.

CID 421846

Change-Id: Ia9328dd91743631f39a16dfc3077261656384f2c
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2810261
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 13:27:53 +00:00
Ian Grissom
83d81ef365 misc: mods: add IPI ioctls
* Added ioctl for triggering IPIs
 * Added handler to invoke ASM wfe,wfi commands or NOP

Change-Id: I907b6a27f3a7f3ff5b507e9f91066d8695dadbb4
Signed-off-by: Ian Grissom <igrissom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2730675
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 13:27:53 +00:00
Chris Dragan
e01a6e01a0 misc: mods: add new ioctls
Add ioctls to read device properties and map proximity id to NUMA node.

Bug 3538850

Change-Id: I65b6decbdfbe12de7d1f1eb3edbb71b9fd56fb8a
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2786128
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 13:27:53 +00:00
andersm
8aad6c65fc MODS: add mods_tegra_dma platform driver
For upstream dma engine slave_id in <struct dma_slave_config> is obsolete.
The Correct way to specify slave_id is
to call dma_request_chan API along with device name defined in dts node.

mods_tegra_dma: mods_tegra_dma {
    compatible = "nvidia,mods_tegra_dma";
    dmas = <&gpcdma 15>, <&gpcdma 16>;
    dma-names = "spi1_rx", "spi2_tx";
    status = "okay";
};

To keep kernel ABI compatibility,
add a new ioctl cmd MODS_ESC_DMA_REQUEST_HANDLE_2.
A new struct MODS_DMA_HANDLE_2 is used together with it.
A new function esc_mods_dma_request_channel_2 is implemented accordingly.

JIRA:TM-728

Change-Id: Ic84f294e2248d800b9aacd597a7ce0a84fc94a1d
Signed-off-by: andersm <andersm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2711537
Signed-off-by: xueyuanb <xueyuanb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2753148
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 13:27:53 +00:00
Chris Dragan
b25e80150e misc: mods: update from Perforce
Change-Id: I50cacf7e5f16a8d0a087becf984c28a2ba516d43
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2747397
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Jason Li (SW-TEGRA)
aa01c9a907 misc: mods: Add OP-TEE TA communication support
This patch adds OP-TEE TA support in the mods driver
using Linux kernel TEE API.

Jira OPTEE-40

Signed-off-by: Jason Li (SW-TEGRA) <jasl@nvidia.com>
Change-Id: I75338f3b6941419acc0745b374c79035a58c98c7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2708753
(cherry picked from commit 33520bc012e8e0b5cfb5de341ff8ff488df8a68f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2709426
Reviewed-by: Rohith Talluri <sitalluri@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Rohith Talluri <sitalluri@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Chris Dragan
4974a781b6 misc: mods: fix compilation with kernel 5.18
Integrates CL 31407382.

Bug 3680536

Change-Id: I5a50dc1c5af1dfcc52aa112269f6802e447206d4
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2729243
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Chris Dragan
13ac7c137c misc: mods: update MODS kernel driver
Bug 3461002

Change-Id: I9f577323cd8034a4464953031398c39a409ad69c
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2658852
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Anshul Goel
aa915e1412 MODS Online IST SMC support
Summary: This change adds support in mods kernel
driver to send messages to ATF using SMC interface in
order to fetch the Online IST test results.

JIRA TM-206

Change-Id: Iafa397287d7af63d77c51308345a9dc93d3a922f
Signed-off-by: Anshul Goel <ansgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2630148
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Ellis
1658071414 misc: mods: Add ioctl to pass messages to tz app
Summary: This change adds support in mods kernel
driver to send messages to Trusty in order to
run tests trust zone side

Signed-off-by: Ellis Roberts <ellisr@nvidia.com>
Change-Id: I5cd0a1dcc4d1ac5543df5fb3ebec4427c1145e10
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2567469
Tested-by: Rohith Talluri <sitalluri@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Stephen Wolfe <swolfe@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
koenz
7af9118d0a mods-kernel-driver: BPMP Uphy driver support
JIRA: TM-127

- Adding ioctl commands for setting PCIE state and initialize PCIE EP PLL;
- Sync some code from perforce;

DVS: http://ausdvs.nvidia.com/Build_Results?virtualId=1000859480

Signed-off-by: Koen Zhao <koenz@nvidia.com>
Change-Id: I4f9024f5037060a7c78f337148b202a078cbc4ba
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2461698
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
koenz
d711403132 misc: mods: synchronize with Perforce
Change-Id: Icfce1a3aa22d84cbd4825ab4fbce86970e2261f4
Signed-off-by: Koen Zhao <koenz@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2474042
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 13:27:52 +00:00
Chris Dragan
a51241efac misc: mods: update MODS kernel driver to 4.1
Change-Id: I56377b85ff0909dba419c8e3f6df16c9302d6dc5
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2456573
Reviewed-by: svcguardwords <svcguardwords@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Chris Dragan
125e88df0a misc: mods: update MODS kernel driver to 3.99
Change-Id: I7ca22718af4e4f897ec0d410949fa1c14022eec1
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2422786
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 13:27:52 +00:00
Chris Dragan
966250e623 misc: mods: bump MODS driver version
Change-Id: If404de1e058d9ef4db9dc6c12017f422436c31fa
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2355636
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 13:27:52 +00:00
ellisr
ad434b8d0e misc: mods: Update reset framework in mods driver
Summary: Previously mods stored handles for both
clocks and resets in the same list. This meant
reset signals that didn't have a corresponding
clock signal could not be toggled. This change
adds a separate list of structures to handle
resets and decouple it from the clock handling.

Change-Id: I2a83dd5cb7b7fe412acf7ae1815b18b747ad2cac
Signed-off-by: Ellis Roberts <ellisr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2225415
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 13:27:52 +00:00