There is two implementation of the prod setting, legacy
where driver directly get the register offset/mask/value
and upstreamable where configuration come as property of the
respective field.
The legacy is supported till K5.15 and afterwards, the upstreamable
solution is supported.
Add the dummy header incase the core kernel have not implemented
the prods and organise the oot prod accordingly.
Bug 4097475
Change-Id: Idd0e8759342c1c4ffd88df046785595aa4fab52d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996588
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
In Linux v6.2, the Tegra IVC driver was updated to support iosys-map and
this breaks building some of the out-of-tree drivers for Linux v6.2+
kernels. In Linux v6.3, the GPIO OF APIs were removed and this breaks
building some of the out-of-tree drivers that use these legacy APIs. For
now the broken drivers are not built for these corresponding kernels.
Instead of checking the kernel version in the Makefile for the
corresponding broken driver, move the kernel version checking to the
top-level Makefile and add CONFIG definitions that can be used the
various Makefiles.
This is also needed for working with 3rd party Linux kernels that may
have upstream backports and need to set these CONFIG variables for their
Linux kernel.
Bug 4221847
Change-Id: I35ee59bccdcdb1be56e4680c453279b421692c6a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996215
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>