291 Commits

Author SHA1 Message Date
Mohit Ingale
8df7cfbf9f tegra: cam fsync driver with start time support
Camera fsync signal Driver provides following features.
 - Configures and runs TSC generator to provide fsync signal to the
   camera module
 - FSYNC signal is programmed as specified in DT for freq and offset
 - Start time of fsync signal can be specified or default
   value can be used
 - Default value used will be 10ms in future
 - If start time is provided, value must be provided in TSC ticks unit
 - Read DT, if tsc-gen-groups are specified, init &  expose node for
   each group
 - Each generator in group is configured
 - IOCTL interface is exposed to accept start time and start the generator
 - Sanity check is done to ensure, no generator is part of multiple groups
 - Backward compatibility is maintained

JIRA CAMERASW-11902
Bug 3799488

Change-Id: I4f278eb95b8f85edb2d5e7664c9f2dd694437263
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2898373
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-09 22:29:35 -07: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
Vincent Chung
be01df015d media: tegra: cdi-mgr: support interrupt timeouts
Add support for configurable interrupt timers and event notification
queues to SIPL Device Block to mirror the CDAC (QNX) pulse channel
interface.

The CDI_MGR_IOCTL_INTR_CONFIG IOCTL is added to set the timeout
duration at initialization, and existing GPIO interrupt code is
refactored.

Also removes the GPIO index limitation to the range of [0,31] by
returning the complete indices one at a time instead of a bit flag.

Jira CAMERASW-11100
Jira CAMERASW-11385
Jira CAMERASW-9366

Bug 3902416
Bug 3792904

Signed-off-by: Vincent Chung <vincentc@nvidia.com>
Change-Id: I62b6c0bd8be18922ab1fe5d40485a69274f2a18e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2893327
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-28 16:37:36 -07:00
Chris Dragan
5dcd80a533 misc: mods: update from Perforce
Change-Id: I65dc43cae65946cce09fdd060627a5817127cfcf
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2895269
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-28 08:11:58 -07:00
Johnny Liu
85c4d41d99 devfreq: Get rid of unused CONFIGs
Remove the config variables as there is no Kconfig to define
these configs:
   CONFIG_DEVFREQ_GOV_WMARK_SIMPLE
   CONFIG_DEVFREQ_GOV_WMARK_ACTIVE

Remove the handling of non-module build as devfreq is always
build as module.

Remove the wmark-related devfreq governors as we plan to keep
them under drivers/gpu/drm/tegra. They are tightly bound with
the actmon and drm drivers.

Bug 4074863

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Iba8f5da770d86ddcfb6315f72fd74fc9a781ab39
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2893701
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-28 08:10:27 -07:00
Kartik
c95fa541d2 soc/tegra: fuse-helper: Add platform helper functions
Various downstream drivers needs platform information i.e. if it is
running on silicon or simulation.

This patch adds following functions:
 * tegra_platform_is_silicon()
 * tegra_platform_is_sim()
 * tegra_platform_is_fpga()
 * tegra_platform_is_vdk()

Bug 3777983

Change-Id: Ice319748c5bbdbf3f4e16c3464f60e4a8e316b46
Signed-off-by: Kartik <kkartik@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2807762
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894847
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-04-27 02:56:54 -07:00
Kartik
1244fb5669 soc/tegra: fuse-helper: add tegra_fuse_control_read()
Various downstream drivers require reading fuse offsets < 0x100.

Add tegra_fuse_control_read(), which uses upstream tegra_fuse_readl()
to allow reading fuse offsets < 0x100.

Bug 3777983

Change-Id: I71c9a726eb748665923ed9547dd495073b89a9dc
Signed-off-by: Kartik <kkartik@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2795612
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894846
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-04-27 02:56:49 -07:00
Jon Hunter
56d80b9a47 video: tegra: Migrate to fuse helpers
The fuse function tegra_get_sku_id() does not exist in upstream and so
when building downstream drivers against an upstream kernel, the build
fails. The tegra_get_sku_id() calls the function tegra_fuse_readl()
which is supported in upstream and exported so can be used by external
kernel modules. The implementation of the tegra_get_sku_id() has been
moved to the header file 'fuse-helpers.h' that can be used by drivers
and allow drivers to be built as external modules. Therefore, migrate
drivers to use this implementation so we can move the implementation
from the downstream kernel.

Bug 2444929

Change-Id: I5a71044a11b63becc726784b9afb31c6384cb651
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2653442
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894845
Reviewed-by: svcacv <svcacv@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-27 02:56:45 -07:00
Jon Hunter
6f721a9441 platform: tegra: cvnas: Add support for upstream Linux kernels
When building the CVNAS driver as an external module against upstream
Linux kernels, there are some downstream fuse APIs that are not found.
To fix building CVNAS for upstream kernels ...

1. Use the device-tree machine compatibility string instead of the
   downstream fuse function tegra_get_chip_id().
2. For the functions tegra_platform_is_silicon() and
   tegra_platform_is_sim() add implementations in a fuse-helper.h
   that always assume that platform is silicon and not a simulator.
   Note this assumption is only applied to upstream kernels and
   downstream kernel still use the downstream implementation. Long
   term we need to revisit this.
3. Copy the downstream implementation for function tegra_get_sku_id()
   to the fuse-helper.h so that this is available for upstream kernels.

The functions implemented in fuse-helper.h are only used if the compiler
flag CONFIG_TEGRA_FUSE_UPSTREAM is defined.

Bug 3459526

Change-Id: I5bbd08ac2560c236f932606ce5ad0e73dc71205a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2650491
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894844
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-04-27 02:56:40 -07:00
Chris Dragan
0ae09fcdd1 misc: mods: clean-up copyrights
It is unnecessary to spell out license text when we are using
SPDX license identifiers.

Change-Id: I902e18a413126f4dddb0cbb1fb5c0e0de385d2a1
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2892356
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-27 02:51:21 -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
Kuan Luo
ec7162fc4d misc: mods: cleanup tegra prod module
Bug 4051795

Change-Id: Ia545cdb456bb6876aa1f48b4efcd111387999167
Signed-off-by: Kuan Luo <kluo@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891512
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>
2023-04-24 05:40:42 -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
Evgeny Kornev
48eb1f6fa2 include: soc: tegra: add isp_unit_id
Add isp_unit_id to channel isp config
so isp 'affinity' could be passed to RCE
from KMD

Jira CT26X-440

Change-Id: I09fd85b92b28208c54d5e00835a4298c2326da7f
Signed-off-by: Evgeny Kornev <ekornev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2886722
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-22 09:56:22 -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
c526d32af3 nvdla: 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: Ie5d525f06dde5b3e3d332caff3d135198059d325
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2890634
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-21 11:40:49 -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
Laxman Dewangan
863cebf312 dev-freq: 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: I386f82eec7ead65f0c3c6195004f2f9d6c8a3f74
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891210
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-21 11:40:19 -07:00
Dong Qiang
6fe239203b drivers: mods: Add MODS_FFA_CMD_MISC Cmd for MODS SP
Added new cmd to clear PCIE XTL RC error counters

Bug 4053219

Signed-off-by: Dong Qiang <carld@nvidia.com>
Change-Id: I73ee69edb2b26cd381c5b2a42f8d7e19fd7bf67e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889256
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-20 06:47:59 -07:00
Chris Dragan
c46d90ef1a misc: mods: update from Perforce to 4.16
Change-Id: Ib0126f696879706d7834b1676bc17f6cbfd8194b
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2887660
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-20 06:46:56 -07:00
Ketan Patil
594e39e498 video: tegra: nvmap: Add NUMA support in nvmap
In NUMA system, user can request nvmap to allocate from any particular
node using NvRmMem APIs. Add code to request allocation from such
requested node. While allocating pages from page pool, check if those
pages belong to requested NUMA node. In some cases, we may not need to
use NUMA support e.g. in color pages allocation code, we don't need to
use NUMA, as page coloring is needed only for t19x chips.

JIRA TMM-5287
Bug 4043165

Change-Id: If8043278122068773a802d83723d287d32914e14
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889707
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-19 10:44: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
Yi-Wei Wang
23858268fd dt-bindings: thermal: Add Tegra234 soctherm header
This change adds the dt-bindings header file, which includes definitions
for Tegra234 soctherm's throttle identifier, EDP/OC identifier, and
throttle mode.

Bug 3571683

Signed-off-by: Yi-Wei Wang <yiweiw@nvidia.com>
Change-Id: I6bb1b577e564b05dfe3ef18bf908eb3752daee3a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2862055
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-17 07:03:22 -07:00
Laxman Dewangan
6449938f8d include: uapi: Add nvhost_ioctl.h from kernel/nvidia
Copy header file uapi/linux/nvhost_ioctl.h from kernel/nvidia
to avoid the build time copy of this header and get rid of
dependency of kernel/nvidia.

Bug 4038415

Change-Id: Ie6c01cd040b9918ba17f23c4050c2f9fe42c69ef
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2888617
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-15 08:52:55 -07:00
Gerrit Code Review
4de07c045a Merge "nvdla: Merge nvdla sources from kernel/nvidia to kernel/nvidia-oot" into dev-main 2023-04-14 23:36:41 -07:00
Gerrit Code Review
97b5db3f9b Merge "dce-kmd: Merge the dce-kmd driver from kernel/nvidia to kernel/nvidia-oot" into dev-main 2023-04-14 20:02:22 -07:00
Ankur Pawar
c9858e1282 media: add ar0234 sensor driver
Add ar0234 camera sensor driver code,
max96712 GMSL serializer code, mode tables
and makefile changes. These drivers are copied
from K5.10 camera driver repo. Changes include
svcacv warning fix and eeprom read status is
ignored due to bug 4064490.

Bug 3583587
Bug 4064490

Change-Id: I7ea0ecf959caccafd283c8db5fb7c3be912cf8bb
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2868422
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-14 15:45:38 -07:00
Mahesh Kumar
fde8d45bbe platform: DCE: Add OOT support for ipc
Reorg DCE-KMD IPC code to use only upstream IVC APIs
This will simplify integrating the code for OOT.

Bug 3583600
Bug 3713048

Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Change-Id: Ia124f7bc77a788b94b0bf60634ed740c77228725
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2790847
Reviewed-by: Arun Swain <arswain@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-14 19:23:43 +00: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
Akshata Bhat
5641042df8 nvdla: kmd: Update max output status count
+ Update needed to enable NvSciSync based task
status support for NvMediaDla
+ Updated all macro definitions of
MAX_NVDLA_OUT_STATUS_PER_TASK for consistency

JIRA DLA-6305

Signed-off-by: Akshata Bhat <akshatab@nvidia.com>
Change-Id: Ieacba82905e7ad19729856be32f022a13a1c37de
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2813577
Reviewed-by: Maxim Grigoriev (SW-GPU) <maximg@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Tested-by: Arvind M <am@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-14 11:47:58 +00:00
Arvind M
3349513ab1 nvdla: kmd: set DMA direction based on access type
Based on access permission requested through pin, DMA direction
is set. This allows setting a reduced access permission for DLA
firmware and/or hardware.

Jira DLA-5775

Change-Id: Ie28e9da87325f36de12269eab1487407f6272053
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2682040
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Amit Sharma
9de4a4df0a nvdla: Use import_id for creating dma buf memory
[1]: Add import_id field in `nvdla_mem_share_handle`.
[2]: Use import_id for creating the dma buf.
[3]: Use share_id/handle as key for search/insert the vm tree.
[4]: Optimize code and avoid un-necessary dma_buf_get/put which
     become possible with [3]

Bug 3470815

Change-Id: Idb1df6ef04301e1ade4e39d3489502759e7d8462
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2645563
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Anup Mahindre
911977d5dd nvdla: kmd: Expose full set of limits for task parameters
- Certain task parameter limits were not exposed to UMD / Users
- Expose these limits and rename to provide consistent KMD interface
across linux / qnx

Jira DLA-4467

Change-Id: Ibcf1de5f4d442d9b1f3fefaf71195bc6e58fff5c
Signed-off-by: Anup Mahindre <amahindre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2546453
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2558254
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Arvind M
9bf2e99b45 nvdla: kmd: add bypass exec support with submit
[1] NVDLA_SUBMIT_FLAGS_BYPASS_EXEC flag allows its clients
    (UMD or nvdla_kmd_sanity) to bypass execution for a
    submission. This flag is a property of submission and
    shall directly apply on all tasks within that submit.
[2] With above flag set, it propagates information to firmware
    through task descriptor and firmware shall be responsible
    for bypassing the execution.

Jira DLA-4443

Change-Id: I70000ef486905c812fec65f265a378a99844c10a
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2544802
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Anup Mahindre <amahindre@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@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-14 11:46:41 +00:00
Anup Mahindre
ae34c03649 video: tegra: host: nvdla: Align max buffers per task limit
- Max buffers per task limit was reduced to 384 recently as
  per all usecases from UMD
- Rename the macro to MAX_NVDLA_BUFFERS_PER_TASK to avoid
  conflict with another macro defined in nvdla_inf.h
- Reflect this change in uapi

Jira DLA-4376

Change-Id: I7d2f19901db5273ae2ae2ba7be504223c2f59e4e
Signed-off-by: Anup Mahindre <amahindre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2517621
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:46:41 +00:00
Anup Mahindre
6242fdd281 video: tegra: host: nvdla: Add support for internal buffers
- Add buffer type field to nvdla_mem_handle
- For internal buffers, skip pin and unpin operations and pass the
offset as final adress
- Also update error handling in nvdla_map_task_memory to match with
  convention

Jira DLA-4376

Change-Id: I662da30cb9c606d2f67b792f09e026af391c89d1
Signed-off-by: Anup Mahindre <amahindre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2503708
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:46:41 +00:00
Arvind M
9eec5aea15 nvdla: kmd: handle {RELEASE,ALLOC}_QUEUE ioctls
[1] This commit separates the allocation and deallocation
    of mission critical resources away from open() and close()
[2] It is achieved through introduction of NVDLA_IOCTL_{ALLOC,RELEASE}
    IOCTLs.
[3] nvdla_buffer_* APIs introduced to facilitate easier split.

Bug 200628173

Change-Id: I3fb07ecaff69c62ec5eb9e5bea39b07ae1624240
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2403689
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Anup Mahindre <amahindre@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-14 11:46:41 +00:00
Ankit Patel
f88862a040 include: uapi: correct the include path for headers
Modified the commit e4163dbef1719b52b2d04782778767d313f37cdc

After installing the user space headers using make headers_install,
We do not have an uapi as a top level directory. Hence we must
include from the regular path linux|media|misc|video within the user
space header files.

Bug 2806057

Change-Id: I2f32a32814ac5347769177428717da7e7098147d
Signed-off-by: Ankit Patel <anpatel@nvidia.com>
(cherry picked from commit f8c05a422c4f14114c762906e24f4221a7343469)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2294559
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:46:41 +00:00
Arvind M
31a4285b17 video: tegra: host: pin with specific permission
[1] Facilitate pinning of buffer with user requested access
    permission
[2] This feature allows to restrict access to buffers shared
    with the device.

Jira DLA-2502

Change-Id: I175ad10922480689de57eb832040a7d59b29b9bd
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2209415
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ken Adams <kadams@nvidia.com>
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:46:41 +00:00
Arvind M
c6ec7bcb20 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-14 11:46:41 +00:00
Sachin Jadhav
f9f2c6598d 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-14 11:46:41 +00:00
Sachin Jadhav
ef831a5207 Revert "video: tegra: host: add sof/eof taskstatus support"
This reverts commit 6f683c8a174b0a937ea6324e017c46df81398f25.

Change-Id: Ic7527e007b608c43245250343101ceee2aeaf742
Signed-off-by: Sachin Jadhav <sachinj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2133504
2023-04-14 11:46:41 +00:00
Sachin Jadhav
1d37583a5f Revert "video: tegra: host: add sof/eof timestamp support"
This reverts commit a9cb0c9ef7710387683f0449f9054a4409a789bc.

Change-Id: Iff17331654a9055527ab2074fee4a6ae67acb80f
Signed-off-by: Sachin Jadhav <sachinj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2133505
2023-04-14 11:46:41 +00:00