Commit Graph

71 Commits

Author SHA1 Message Date
Viswanath L
d5138e1c58 nvadsp: Fix build issues and enable
Fix build issues for nvadsp in OOT kernel and enable the build.

 - Below files copied from kernel/nvidia/include/linux/
    - tegra_nvadsp.h (72af3e78a6aff0fa250e9fd36b8414264d0e4c9a)
    - tegra-firmwares.h (700223e52f49f300664dd91335fa11111af733aa)
    - tegra-hsp.h (988be8f05033e1d728e046e918b506d829106082)
 - Below file copied from kernel/nvidia/include/uapi/misc/
    - adsp_console_ioctl.h (72af3e78a6aff0fa250e9fd36b8414264d0e4c9a)
 - Functions that needs additional AGIC APIs not supported in upstream
    are pushed under macro CONFIG_AGIC_EXT_APIS
 - T210 chip_data and references removed

Bug 4164138
Bug 3682950

Change-Id: I5dfb570e578ca3631896de7350cea66698612568
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2971924
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-26 12:09:57 -07:00
Sumit Gupta
c10e9dee5c drivers: nv-p2p: Move Nvidia Tegra P2P Driver to OOT
Make Nvidia Tegra P2P driver for RDMA as an OOT module.
The driver was earlier merged in Kernel-5.10 in the below cl.
 https://git-master.nvidia.com/r/c/linux-nvgpu/+/1821407

Bug 4142533

Change-Id: I6b24b44832d45fa5abedcd04c94d5d1e2576a6a3
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2978103
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-09-21 21:24:05 -07:00
Akhil R
3006e5b42f mfd: max77851: Enter SLEEP on suspend based on DT
Add option to disable entry to SLEEP when system is suspended.
There are systems where SW_SLP is not necessary on system suspend
as it could be managed differently. Provide an option not to enter
SLEEP state during suspend for such systems.

Bug 3643699

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I1600d0d053a15e18c7419a377962b76845bb92b5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2712396
(cherry picked from commit a83d4b50fdef4af7a9360224cad0357672bbd380)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2717492
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938654
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-14 13:25:17 -07:00
Shubhi Garg
1ab8a495fc mfd: add max77851 pmic MFD driver
Adding MAX77851 MFD driver provided by Maxim.
 - fix android warning/error for uninitialized variable return

Bug 200749982

Change-Id: I6ef82a6c06fe7bbd4df2c71991ec6c5c15e28474
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2591158
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938653
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-14 13:25:12 -07:00
Ketan Patil
1c2599bcba video: tegra: nvmap: Update carveout name
Compression carveout is not correct carveout name as it will be used
by gpu even for non-compression usecases. Hence rename it to gpu
carveout.

Bug 3956637

Change-Id: I802b91d58d9ca120e34655c21f56c0da8c8cf677
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2955536
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2023-08-16 18:47:35 -07:00
Laxman Dewangan
43c941e0f7 prod: Add OOT prod header
OOT drivers build against multiple kernel. All kernel
does not support the prod configurations. Add wrapper
header for prod header as oot-prod which can be used
by all OOT drivers for prod configurations.

This new header implement the prod APIs as success if
core kernel does not support the prod functionality.

This will help to avoid any build and run time error.

Bug 4165866

Change-Id: I1c313aad38a0b1b08f9acda0fa98d08cd0390baa
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2924919
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2925582
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-25 08:06:09 -07:00
Ketan Patil
a56b9fc61c mc-utils: Update driver so as to support multiple SOCs
Current mc-utils driver is specific to T234 without any support for
extending it to future SOCs. Add such support so that it can be easily
extended for future chips.
- Create a struct of function pointers of all present operations
- Set these function pointers as per SOCs

Bug 4090660

Change-Id: I93e9da987bce1e563eb03aeeb0ac8bcb9da48023
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2911894
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-02 11:03:17 -07:00
Jon Hunter
9a3174280f platform: tegra: Remove CVNAS driver
The CVNAS driver is not needed for Tegra234 and future devices. Remove
the CVNAS driver and support for CVNAS from DLA, NVMAP and PVA dirvers.

Bug 4037930

Change-Id: I5d1ae3c195485cb094f9b9b480f91d81fd04687c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903848
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-23 20:56:08 -07:00
Laxman Dewangan
a4136b7e63 platform: tegra: Remove firmware class and inventory drivers
Remove firmware class and firmware inventory modules drivers
as these are not used anymore.

Bug 4090910

Change-Id: Ibef41b6ba026a6d6f24ec79b4b7aaa47bc62632a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2905556
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-20 07:29:16 -07:00
Laxman Dewangan
6476bb40a4 cvnas: Drop license paragraphs
The cvnas files are having the SPDX license forma. Hence,
it is not required to have the license paragraphs.

Remove the non-required license paragraphs details.

Bug 4038415

Change-Id: I8f6212255cb9ce2cff3af5492599cf4f3946f04d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2904300
Reviewed-by: svcacv <svcacv@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-05-16 06:33:13 -07:00
Gerrit Code Review
5f8a0b1583 Merge "cvnas: Integrate drivers from kernel/nvidia to kernel/nvidia-oot" into dev-main 2023-05-16 06:33:08 -07:00
Ketan Patil
faa6040875 video: tegra: nvmap: Switch to configurable granule size
In compression carveout, granule size should be configurable via device
tree. Earlier code was written by considering granule size of 2MB,
update the code to use configurable granule size read from DT.

Bug 3956637

Change-Id: Ib1e966117b2bd9511cbcde37a6011c17f38f22e2
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2899865
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-15 01:18:01 -07:00
Bharat Nihalani
eda8327741 include: Fix cvnas build errors
Fix cvnas build errors when CONFIG_TEGRA_CVNAS is disabled.

The following build errors are fixed:

nvhost_buffer.c:134: undefined reference to `nvcvnas_get_cvsram_base'
nvhost_buffer.c:135: undefined reference to `nvcvnas_get_cvsram_size'

Bug 3633940

Change-Id: I3f42bb9a0f5d833a70fd05c494fdbbcaab60be1e
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2706940
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2023-05-15 06:12:53 +00:00
Ketan Patil
242600283f video: tegra: nvmap: Do not export cvnas_dev
By exporting cvnas_dev all the internal data of the driver is getting
exposed to any driver that uses it. This could allow drivers to corrupt
this driver data. Hence do not export cvnas_dev, use helper functions to
get it's required member elements from nvmap.

Bug 200722684
Bug 3528414

Change-Id: I17f6fa1e98c777a7ec9118dbc6f0c6359e949f22
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2704698
Reviewed-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2023-05-15 06:12:41 +00:00
Ketan Patil
3a87281353 video: tegra: nvmap: Remove dependency of cvnas
Handle dependencies between nvmap and cvnas driver:
- nvmap_register_cvsram_carveout function is called by cvnas driver
(builtin driver for 5.10) and it's definition is present in nvmap driver
(builtin driver for 5.10, but we are trying to make LKM). This is
resulting into build issues while making nvmap as LKM for 5.10
- One option to resolve this is by making cvnas driver as LKM for 5.10
But nvhost, nvdla, cbb are not LKM for 5.10 and are calling functions
defined in cvnas driver e.g. nvcvnas_get_cvsram_base, hence we can't
make cvnas as LKM for 5.10
- Second option is to get rid of the call nvmap_register_cvsram_carveout
from cvnas driver. This approach is implemented in this patch.
- Export cvnas_dev from cvnas driver, do not call the above function
from cvnas driver. During nvmap probe, nvmap itself would call the above
function, as cvnas_dev is exported , it's being used in nvmap driver to
get base, size etc. information, which is needed as argument to above
function, which will register the cvnas carveout in case of 5.10

Bug 200722684

Change-Id: I32e5694386de4a7fef65c3f67ffb9b5066f62ab3
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2678685
2023-05-15 06:12:33 +00:00
Jon Hunter
c920508259 platform: tegra: cvnas: Fix function declarations
Sparse generates the following warnings for the CVNAS driver ...

 drivers/platform/tegra/cvnas/cvnas.c:126:5: warning: symbol
 	'nvcvnas_busy' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:138:5: warning: symbol
 	'nvcvnas_idle' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:444:13: warning: symbol
 	'nvcvnas_get_cvsram_base' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:456:8: warning: symbol
 	'nvcvnas_get_cvsram_size' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:468:5: warning: symbol
 	'is_nvcvnas_probed' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:476:5: warning: symbol
 	'is_nvcvnas_clk_enabled' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:779:5: warning: symbol
 	'nvcvnas_busy_no_rpm' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:793:5: warning: symbol
 	'nvcvnas_idle_no_rpm' was not declared. Should it be static?

There are a few problems here which are:
1. The CVNAS driver does not include the 'cvnas.h' header file and so
   some of the declarations are not found.
2. Some of the CVNAS functions are not declared in the 'cvnas.h' header
   file and need to be added.
3. The Tegra19x CBB driver is a user of these CVNAS functions, but
   instead of including the 'cvnas.h' file it defines prototypes for
   these functions. This is not necessary and so we can remove these
   prototypes and simply include the 'cvnas.h' header file.
4. The function definition nvcvnas_idle_no_rpm() in the CVNAS driver is
   incorrect and this function should not have any arguments passed to
   it and currently does not match the prototype.

Bug 3528414

Change-Id: I7945f8c66ceb5ca5b158b7ed1b81a50f19c52bb7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2670149
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2023-05-15 06:12:09 +00:00
Damian Halas
04479abd45 t19x: cvnas: expose cvsram base and size to kernel
Add nvcvnas_get_cvsram_base and nvcvnas_get_cvsram_size,
Use them in pva_queue.c and nvhost_buffer.c
instead of hardcoded values.

JIRA EVLR-2273

Change-Id: I3fbec50a2c57220034b25b3a91569ba4aec319f6
Signed-off-by: Damian Halas <dhalas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1651414
Reviewed-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Nirav Patel <nipatel@nvidia.com>
2023-05-15 06:11:13 +00:00
Johnny Liu
d06443deae devfreq: Add tegra_wmark governor
The tegra_wmark governor can be used e.g. with DRM clients, such as VIC,
NVDEC, NVENC, and NVJPG. This governor tightly collaborates with the
actmon hardware used for monitoring the active time of the underlying
DRM clients.

Bug 3788919

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ie4d4c2b173615aa239436fbb1545118435629d38
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894529
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-09 22:27:14 -07:00
Jon Hunter
a809f2cfb5 i2c: nvvrs11: Remove header file
The header file for the NVIDIA I2C NVRS11 driver is only used by this
driver and so remove the header and include the necessary definitions in
the driver source. This avoids having to distribute a header file along
with the main source file.

Bug 4008099

Change-Id: I7ff0e426e74810e34e94ee9ffa28923f40485715
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2893965
(cherry picked from commit 6e467aeef7848ad55b55b176b89c7fd14c34586d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894562
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Shubhi Garg <shgarg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-01 23:45:14 -07:00
Richard Zhao
054f2a1a22 video: tegra: virt: separate dev and dt for init
The dt node that includes ivc properties and the dev does not have to be
same node. GPU could be PCIE endpoint device which does not have
corresponding dt node, so GPU driver uses PCIE controller node to store
ivc properties.

Jira GVSCI-15779

Change-Id: Ibf9c8f17eac1accceee5fe8d5eca3521cda934b9
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2884313
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Austin Tajiri <atajiri@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-01 00:25:01 -07:00
Laxman Dewangan
10e45ac4c8 video: gr_comm: Get rid of CONFIG_TEGRA_GR_VIRTUALIZATION
The config option CONFIG_TEGRA_GR_VIRTUALIZATION is passed
the driver s debug option to support the driver to build
as built-in or module.

As nvidia-oot drivers are only build as module, remove the
explicitly pass of the option of CONFIG_TEGRA_GR_VIRTUALIZATION
and related code.

Bug 4074863

Change-Id: I6f7dbe0c97c95f98bd010813d211fd196c88d585
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889983
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-26 20:06:29 -07:00
Jon Hunter
0f857d6cff gpu: host1x-nvhost: Remove unused argument
The integer argument returned by the NVHOST interrupt notifier has never
been supported by the host1x-nvhost driver. The DLA driver's
nvdla_queue_update() function that is called by this notifier has been
update so that it no longer uses this argument. Given that there are no
other users of this notifier for the host1x-nvhost driver, let's remove
this unused variable.

Bug 4059530

Change-Id: I04dda2ea7338f0c7ee55e6e968b46f063eecae90
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2892312
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-24 15:38:02 -07:00
Laxman Dewangan
e8b7a5ca26 nvmap: Use SPDX license GPL 2.0 format
Use SPDX license GPL-V2.0 format and change Nvidia
copyright year to include 2023.

Bug 4078035

Change-Id: I4db6577ddb806690f6ec04f5eaf1364578102d14
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2890635
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-22 09:59:20 -07:00
Laxman Dewangan
5358e6f54e video: virt: gr_comm: Use SPDX license GPL 2.0 format
Use SPDX license GPL-V2.0 format.

Bug 4078035

Change-Id: I5e64abc24987a811e0518809de54baaedea1badb
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891212
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-22 04:22:45 -07:00
Laxman Dewangan
5535897d3d include: Use SPDX license GPL 2.0 format
Use SPDX license GPL-V2.0 format and change Nvidia
copyright year to include 2023.

Bug 4078035

Change-Id: I73edd8699dc7298ecb6efc991bc74c1b1e089d0d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891236
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-21 11:42:53 -07:00
Laxman Dewangan
cafcc24336 include: nvhost: Use SPDX license GPL 2.0 format
Use SPDX license GPL-V2.0 format and change Nvidia
copyright year to include 2023.

Bug 4078035

Change-Id: I0baf1b4d579ac7414e0936c99ba0861abee241e6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891215
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-21 11:42:48 -07:00
Laxman Dewangan
b20c5f57e3 dce: Use SPDX license GPL 2.0-only format
Use SPDX license GPL-V2.0 format and change Nvidia
copyright year to include 2023.

Bug 4078035

Change-Id: Icc0060431eb8d9c470a44f4cee50913cc1d8048a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2890656
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-21 11:41:56 -07:00
Laxman Dewangan
5469e6aaf3 nvsciipc: Use SPDX license GPL 2.0 format
Use SPDX license GPL-V2.0 format and change Nvidia
copyright year to include 2023.

Bug 4078035

Change-Id: I422a02eb30ba96dc63b96ee901023d8f90ff201b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891211
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-21 11:40:34 -07:00
Ketan Patil
30e3826bc4 video: tegra: nvmap: Update carveout name
CBC carveout is not the correct carveout name, rather compression
carveout is the correct name. Compresssion carveout is used to store the
gpu compressible buffers. While the comptags and other metadata related
to these buffers will be stored in CBC carveout which is a GSC carveout
not created/maintained by nvmap. Hence update carveout naming.

Bug 3956637

Change-Id: I50e01a6a8d8bda66960bdee378a12fde176b682a
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2888397
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-17 07:10:02 -07:00
Mahesh Kumar
9764cf5370 tegra: dce: Add IPC event notification support
- This change adds support for new IPC type
DCE_IPC_TYPE_RM_NOTIFY wrt event notification from
DCE RM

JIRA TDS-6643

Change-Id: I54b22e3fa86a1dab552f78d609c374d14ce619ad
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t23x/+/2409904
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Santosh Galma <galmar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Santosh Galma <galmar@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 19:23:43 +00:00
Arun Swain
606f03fbf2 platform: tegra: dce: add dce kernel driver
For T23x, we have a separate R5 based cluster
named as Display Controller Engine(DCE) to run
our Display RM code. This driver will run on CPU
with the following functionality:

Via debugfs for test and bring-up purposes:
1. Reads the DCE firmware image into DRAM.
2. Sets up DCE AST to cover the DCE firmware image.
3. Sets up R5 reset vector to point to DCE firmware
entry point
4. Brings DCE out of reset
5. Dumps various regsiters for debug

In production env:
1. Manages interrupts to CPU from DCE
2. Uses bootstrap command interface to define Admin
IPC
3. Locks down bootstrap command interface
4. Uses Admin IPC to define message IPC
5. Uses Admin IPC to define message IPC payload area
6. Uses Admin IPC to set IPC channels
6. Uses Admin IPC to define crashdump area
(optional)
7. Provides IPC interfaces for any DCE Client running
on CCPLEX including Display RM.
8. Uses Admin IPC to set logging level (optional)

This patch puts a framework in place with the
following features :
1. Firmware Loading
2. AST Configuration
3. DCE Reset with EVP Programming
4. Logging Infra
5. Debugfs Support
6. Interrupt Handling
7. Mailbox Programming
8. IPC Programming
9. DCE Client Interface
10. Ftrace Support for debug purposes

Change-Id: Idd28cd9254706c7313f531fcadaa7024a5b344e7
Signed-off-by: Arun Swain <arswain@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t23x/+/2289865
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Santosh Galma <galmar@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Mahesh Kumar <mahkumar@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 19:23:43 +00:00
Ketan Patil
6937db210f video: tegra: nvmap: Add CBC carveout support
- Add CBC carveout suport in nvmap.
- Chunk size for CBC is 2MB, hence each bit from bitmap for CBC carveout
indicate 2MB physically contiguous chunk.
- In case of allocation from CBC, first try to allocate the entire chunk
in physically contiguous manner, if it's not possible then allocate in
chunks of 2MB. All page pointers to these chunks will be stored in
nvmap_handle struct.
- Modify all other operations like vmap, kmap, mmap as per the above
restrictions.

Bug 3956637

Change-Id: I7c304b0127c8fef028e135a4662ab3ad3dc1d1f6
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2880662
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2885806
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-04-12 04:32:35 -07:00
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
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
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
Gerrit Code Review
e257be9884 Merge "tegra_gr_comm: Integrate drivers from kernel/nvidia" into dev-main 2023-04-04 21:57:24 -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
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
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
Nagarjuna Kristam
b3bfce4122 PCI: edma_test: Fix Coverity issues
Validate num_chans before using for division

Bug 3956683

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: I8abca2a251748711f07ffc14d71b1601fa73806f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2876298
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-31 04:17:26 -07:00
Jon Hunter
4630f1b6d9 rtcpu: capture-ivc: Disable for Linux v6.2+
Upstream Linux commit 4c1e0a97351a ("firmware: tegra: bpmp: Use
iosys-map helpers") updated the Tegra IVC driver to use the
iosys-map helpers for Linux v6.2. This causes the Tegra capture-ivc
driver build to fail. Temporarily disable the building of this driver
while this build issue is fixed. Stub functions are added to permit
other drivers that use this driver to build.

Bug 3936429
Bug 3974855

Change-Id: I7a381fa90d92f11ee01d37f0ee7ab230162c5a62
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2861312
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com>
Tested-by: Rohit Khanna <rokhanna@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-28 01:58:45 -08:00
Frank Chen
92ac7bc35a media: camera: Build tegra-camera as OOT module
Port camera drivers below from /kenrel/nvidia to
/kernel/nvidia-oot as OOT modules:
- Fusa-capture driver
- Tegra V4L2 framework driver
- vi/csi driver
- tegra camera platform driver

Change-Id: I390af27096425bb11e0934201dd1a90f001bb3fa
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2780698
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-13 06:15:42 -08:00
Dipen Patel
e7c8a70f65 drivers: Add GTE support
The CL adds GTE driver support in OOT. The driver is copied from nvidia
directory in dev-main with below changes.
- Added removable module support

This driver as module is needed as per the oot development requirement.

Bug 3583612

Change-Id: I2772078fb96e1b172e45befe643b4c7c569866d9
Signed-off-by: Dipen Patel <dipenp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2706260
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-07 23:57:14 -08:00
Matti Ryttylainen
dd109353df video: camera: Modify rtcpu modules for OOT tree
This patch modifies rtcpu modules to use new ivc headers,
resolves cyclic dependencies between the modules,
reduces the amount of modules built by linking them together
and fixes other minor issues encountered with K5.15

Change-Id: I9cf2672df08ffe6c4b8aea9ac21d6cc50a92bb4e
Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2787121
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-01 11:00:42 -08:00