Commit Graph

2473 Commits

Author SHA1 Message Date
Dipen Patel
2f21871b13 drivers: staging: gte: fix warnings
The gte driver has multiple sparse warnings when kernel is compiled
with tmp kernel C=2. This CL corrects those warnings.

Bug 3954363

Change-Id: If7a112c1bf1e491118b3d4119e0e09f7673a553a
Signed-off-by: Dipen Patel <dipenp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2886127
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-14 08:18:47 -07:00
Ankur Pawar
c10d814337 media: i2c: Fix camera driver Coverity defects
Fix the below Coverity defects for IMX318 sensor driver

Copy paste error
CID: 10171759

Null return check
CID: 10171758

Unchecked return value
CID: 10171760

Bug 3952896

Change-Id: I9da2c14911dc119853fa5c96c9c4dcc9f1827c7e
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2885966
Reviewed-by: Chinmay Mahajan <cmahajan@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
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-14 08:18:38 -07:00
Ankur Pawar
9a9e8f8cdf camera: csi: fix coverity defect
Out-of-bounds read
CID: 10132982

Bug 3952896

Change-Id: Iefcdeaf46e46a1e27feb4ab13e0f76d8ee4b5b10
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2885123
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-14 08:18:12 -07:00
Jon Hunter
27a989988e nvdla: kmd: Don't read DLA fuses for upstream Linux
The DLA fuses are not exposed via nvmem for upstream Linux kernels and
so when booting upstream Linux kernels the following warnings are seen
for DLA:

 nvdla 158c0000.nvdla1: nvmem_cell_get error -2. Assuming DLA instances
  are available
 nvdla 15880000.nvdla0: nvmem_cell_get error -2. Assuming DLA instances
  are available

Disabling DLA instances for devices that don't support DLA is handled by
the bootloader and so for Linux kernel's greater than v5.10, it is not
necessary for the kernel driver to check this.

Bug 3795915

Change-Id: Icbd5e7c522a66a827fe1ed58ed2271a98497bbcd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2870158
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@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>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-14 11:47:58 +00:00
Arvind M
60c893bc80 nvdla: kmd: revive SC7 support for OOT
[1] For the OOT, there are no implementations for the prepare_suspend,
    suspend, resume and complete_resume from the nvhost.
[2] This commit decouples the DLA dependency on the nvhost for the
    suspend and the resume operations.

Bug 3977752
Bug 3978072

Change-Id: Ie8ae9d29873559e1c76331294e4c7dfd0ccf0237
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2857153
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:47:58 +00:00
Arvind M
84556afbef nvdla: kmd: put pm reference with task completion.
[1] With the current design, the DLA is leaning on the nvhost callback
    notifier for putting the pm reference.
[2] This commit decouples that dependency by putting the pm reference
    for every task completion.

Jira DLA-6649
Jira LS-477

Change-Id: I84ea948b7f717f7f3e28ac1f58f17f07c53e822b
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2857162
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
2023-04-14 11:47:58 +00:00
Arvind M
5720a7534d nvdla: kmd: support HSI corrected error injection
Jira DLA-6136
Jira DLA-6595

Change-Id: I4ca1b5f1e07566638951bc1d0c64613195779aa2
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2856422
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@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 <buildbot_gerritrpt@nvidia.com>
2023-04-14 11:47:58 +00:00
Arvind M
42486b184d nvdla: kmd: add error report injection utility
Jira DLA-6136
Jira DLA-6595

Change-Id: I7013836607f138cfd2f4a2dfbe3a993244c546ac
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2847796
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-14 11:47:58 +00:00
Ken Adams
aeed9dba62 Merge remote-tracking branch 'origin/dev/dev-main-dla3.13.0' into dev-main
Jira DLA-6481
see https://git-master.nvidia.com/r/c/linux-nvidia/+/2845208
for merge info

Signed-off-by: Ken Adams <kadams@nvidia.com>
Change-Id: I5be460a545291bb63c1185aab4638c012368b1a1
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2845341
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Maxim Grigoriev (SW-GPU) <maximg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Maxim Grigoriev (SW-GPU) <maximg@nvidia.com>
2023-04-14 11:47:58 +00:00
Jon Hunter
49361a4f9a nvdla: Fix memory leak for syncpts
Call the nvhost_syncpt_unit_interface_deinit() function on failure
and driver removal to free any memory allocated for syncpts.

Bug 3800349

Change-Id: I6612fd2ca39ebd2230fb06638cef2e28d6aa20d4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2801282
(cherry picked from commit bb098a3920e28d321ba7d3e51d04317b99d8c650)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2802440
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:47:58 +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
Akshata Bhat
0c6ea4efe2 nvdla: kmd: Debugfs nodes for resource utilization
+ Added a debugfs node to input window size
+ Added a debugfs node to output utilization rate

Commands to input window size:
* echo [unsigned_value_in_us] >
	/sys/kernel/debug/nvdla0/firmware/window_size
* echo [unsigned_value_in_us] >
	/sys/kernel/debug/nvdla1/firmware/window_size

Commands to output utilization rate:
* cat /sys/kernel/debug/nvdla0/firmware/utilization_rate
* cat /sys/kernel/debug/nvdla1/firmware/utilization_rate

JIRA DLA-6318

Signed-off-by: Akshata Bhat <akshatab@nvidia.com>
Change-Id: I17b0a5bb9a3e632d992c7b38cf84d472a99d28ed
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2794433
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@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
103da69059 nvdla: kmd: synchronize PING across many clients
[1] When the multiple clients try to ping at the same time, the
    KMD errors out for all clients except one. This behavior
    is expected since there is only one command memory and the
    KMD errors out when that memory is busy.
[2] This commit fixes the issue by synchronizing the ping operations
    across all the clients by introducing a lock.
[3] Alternatively Increasing MAX_COMMANDS_PER_DEVICE will work but
    not optimal since,
    - the ping is an INIT mode operation.
    - the ping operation is inexpensive => the memory is immediately
      available even if locked.
    - the overall memory allocation will increase.

Considering the use case is rare, the synchronization of ping across
multiple clients is preferred.

Change-Id: I012efd18554a85bb31b79b98bf83386b37251d32
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2813197
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
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-14 11:47:58 +00:00
Arvind M
c7726fd7d3 nvdla: kmd: fix upper bound check on fence limit
1. In Linux, MAX_NVDLA_*FENCES_PER_TASK is not same as that
   of MAX_NVDLA_EMU_*FENCES_PER_TASK. So there is an issue of
   buffer overflow during copy_from_user.
2. This commit fixes the issue by making use of EMU limits as
   the upper bound.

Bug 3613311

Change-Id: Ibfcc7e871aea0b44576a690c60491777a4752003
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2758528
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Gunjan Mehta <gmehta@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-14 11:47:58 +00:00
Arvind M
f8f9637506 nvdla: kmd: check fence limit in emu submit
[1] With no bound check on prefences and postfences, there is a
    possibility of copying more data from the user than intended.
    This results in buffer overflow and leads to security threats.
[2] This commit adds the fence check during emu submission and
    prevents the cause of buffer overflow.

Bug 3613311

Change-Id: Ifdba184b34e54be0146f080e5383b8430a0b1bcd
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2723823
Reviewed-by: Martin Radev <mradev@nvidia.com>
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: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Gunjan Mehta <gmehta@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
Tested-by: Martin Radev <mradev@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Vedashree Vidwans
cff8e145ab video: tegra: nvdla: add HWPM support
Register IP instance and required function pointers with HWPM driver.
Remove force enable of NVDLA in HWPM driver.

Bug 3333035

Change-Id: I001d5838a886d12756b9810edadc2d54e1871f99
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2672510
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
Tested-by: Praveen K <kpraveen@nvidia.com>
Tested-by: Vasuki Shankar <vasukis@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Laxman Dewangan
cf0a902252 nvdla: Set config variable when build as OOT module
When nvdla driver is build as OOT module, it is required
to set the following config.
	CONFIG_TEGRA_GRHOST_NVDLA := m
	CONFIG_TEGRA_HOST1X_NEXT := m
	CONFIG_TEGRA_FUSE_UPSTREAM := y

Set these config when CONFIG_TEGRA_OOT_MODULE is set.

Bug 3583604

Change-Id: I309db8493a90572e58dcf9f95d1fc1b9ccc47d18
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2715740
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Jon Hunter
04ac05407c nvdla: Fix driver unloading
The NVDLA driver is a missing a call to nvhost_module_deinit() on
removal and so is not releasing resources as expected on removal which
prevents the driver from being unloaded and reloaded correctly. Fix this
by add a call to nvhost_module_deinit() in the driver remove callback.

Bug 3641820

Change-Id: I675bb7b2b31c3194ae30c4162f7f72caf4844243
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2710547
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@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
2023-04-14 11:47:58 +00:00
Prateek Patel
956c7dea31 drivers: dla: fix cert_c defect
Add check for return value of snprintf().

CID 343144
CID 441285

Bug 3512545

Change-Id: I2039b3a71e821d70d47bb42b993d0267e5faaffd
Signed-off-by: Prateek Patel <prpatel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2709584
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: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Jon Hunter
b67df49181 nvdla: Fix build for CONFIG_FRAME_WARN=1024
Some 3rd party Linux distributions, set the kernel configuration option
"CONFIG_FRAME_WARN=1024" which will causes the compiler to generate
compilation errors when a functions stack frame size exceeds 1024 bytes.
When compiling the DLA driver on Fedora the compilation fails with the
following errors.

 drivers/video/tegra/host/nvdla/nvdla.o] Error 1
 drivers/video/tegra/host/nvdla/nvdla_ioctl.c: In function ‘nvdla_emu_task_submit’:
 build/drivers/video/tegra/host/nvdla/nvdla_ioctl.c:918:1: error: the frame size of
 	1456 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

 drivers/video/tegra/host/nvdla/nvdla_ioctl.c: In function ‘nvdla_submit’:
 drivers/video/tegra/host/nvdla/nvdla_ioctl.c:1118:1: error: the frame size of 1440
 	bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Fix this by copying the user tasks from userspace one at a time and
allocating the structure nvdla_emu_task dynamically so that is it not
allocated on the stack.

Bug 3524939

Change-Id: If752423a170c46efd9b6cffc458a7c1db1984afe
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2694097
Tested-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Rajkumar Kasirajan
0b7fd59dca nvhost: register nafll parent clocks for dla & pva
The T194 BPMP does not support clock rate propagation from child
to parent clock for DLA & PVA. Register the DLA/PVA NAFLL clocks
in order to set correct clock rate to both parent and child clocks.

Bug 3510538

Change-Id: I3587e70ec44c1f025d5dfa53fd04afb731dd1eb6
Signed-off-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2664506
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Ninad Malwade <nmalwade@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Ninad Malwade <nmalwade@nvidia.com>
2023-04-14 11:47:58 +00:00
Praveen K
acc29a8f3a nvdla: kmd: Add Soft SKU support
- Read Soft sku to identify if any of
  the DLA instances are disabled and
  not initialize that instance

Bug 3545642

Change-Id: Iefcd0616672fe1d2c7448ae571befa3ebe729d1f
Signed-off-by: Praveen K <kpraveen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2675805
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Jon Hunter
726a34aac5 nvdla: Add option for enabling channel submit
Channel submit mode is not supported for upstream Linux kernels and
so add a compile time option to enable channel submit mode. For upstream
kernels this is disabled by default and an error is returned if
userspace uses channel submit mode.

Bug 3530486

Change-Id: Ie0de954ac6ac3bffd4b4776097286d2ace338995
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2665592
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Arvind M <am@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>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
GVS: Gerrit_Virtual_Submit
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
Jon Hunter
1c9a3507d5 nvdla: Clean-up local header include paths
The local DLA header files are located in the same directory as the
source files and so it is not necessary to append the 'nvdla' directory
to the header file path.

It is important to remove the 'nvdla' directory from the header path
because then when building NVDLA as an external module, we can disable
the Makefile search path "$(srctree.nvidia)/drivers/video/tegra/host"
and ensure that headers that are outside of NVDLA directory are not
being included.

Bug 3530486

Change-Id: I44ee3e515bd604f91d40ee4479a56ead022ba05f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2665591
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arvind M <am@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>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Arvind M
13b677a0b5 nvdla: kmd: fix coverity defects
[1] Prevents potential use of uninitialized buffer.
[2] Removes unnecessary non-null task check during submission
    failure.
[3] Fixes logic that is identified as dead code.

CID 10074657 Uninitialized scalar variable
CID 10112959 Dereference before null check
CID 10132208 Logically dead code

Bug 3461002

Change-Id: I68520b018bcad53559c306a5faeed85af5fb6ea2
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2668778
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Jon Hunter
2a496cad4b nvdla: Fix build for Linux v5.16
Building the NVDLA against the upstream kernel v5.16 is failing and
errors such as the following are seen.

 ERROR: modpost: module nvhost-nvdla uses symbol dma_buf_detach from
        namespace DMA_BUF, but does not import it.
 ERROR: modpost: module nvhost-nvdla uses symbol dma_buf_put from
        namespace DMA_BUF, but does not import it.
 ERROR: modpost: module nvhost-nvdla uses symbol dma_buf_get from
        namespace DMA_BUF, but does not import it.

Following upstream commit 16b0314aa746 ("dma-buf: move dma-buf symbols
into the DMA_BUF module namespace"), it is now necessary to import the
DMA_BUF module namespace into the Tegra DRM driver to fix this.

JIRA LS-410

Change-Id: I31f43fd4425ce80c975651d902b66f56464b0465
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2661773
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:47:58 +00:00
Jon Hunter
ecdf991f7d nvdla: Use upstream speculation barrier
The Linux v5.10 kernel defines a 'spec_bar()' macro to inhibit
speculation for ARM64 and so if we use this macro, then we can
remove the downstream speculation_barrier(). Please note that
it is important to remove such downstream macros because these
prevent us getting the various NVIDIA kernel drivers from
working with upstream Linux kernels.

Bug 3409896
Bug 3477445

Change-Id: Ie8d44f219d2dded2fc7bd36f24980b91c92395d9
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2643778
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:47:58 +00:00
Jon Hunter
d241e32f53 nvdla: Add support for upstream host1x driver
Update the DLA driver to add support for the upstream host1x driver.
The driver is built for upstream kernels only when the configuration
option CONFIG_TEGRA_HOST1X_NEXT is defined.

For the supporting the upstream host1x driver, the DLA driver is
registered with the upstream host1x driver by calling
host1x_driver_register().

Please note that for upstream Linux, the firmware naming conventions
used for upstream are preferred. So that although the same firmware
is used with both upstream and downstream, it is simply the filename
that is changed.

The 'spec_bar()' macro was removed from Linux v5.13 because there were
no upstream users. Include the downstream header arm64-barrier.h that
adds the spec_bar() from upstream so that we can build NVDLA for Linux
v5.13+ kernels.

Finally, add the necessary stub functions to the nvhost.h header file
to allow the driver to build. Please note that these functions are
not used and so stub functions are sufficient.

Bug 3409896
JIRA LS-410

Change-Id: Ifb8f269b260056da0fba6e5e2f88aa813178bff3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2653103
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:47:58 +00:00
Jon Hunter
870c17eed9 nvdla: Prepare for supporting upstream Linux
The referencing of syncpts in the upstream host1x Linux driver is
different to the downstream nvhost driver. By migrating the DLA driver
to use the '_ext' implementations of the various nvhost functions, we
can implement a use a common nvhost interface for both the upstream and
downstream kernels.

JIRA LS-410

Change-Id: Ibd16dfed53edf7173d44fdfaacb4080788f3ba2c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2653102
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:47:58 +00:00
Jon Hunter
722d0f22b3 nvdla: Move DLA device data into driver
To build the NVDLA driver as a standalone driver for supporting upstream
Linux kernels, it is simpler to move the DLA device data into the
driver. This greatly simplifies the process of building the driver as an
external module, because we only need the single Makefile that resides
within the 'nvdla' directory.

JIRA LS-410

Change-Id: I235008188e1c1ebda2fcb25fd58b868ff67f0352
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2653101
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:47:58 +00:00
Jon Hunter
63c25f91b6 nvdla: Add definitions for Falcon registers
To support NVDLA with upstream kernels where the NVHOST driver does not
exist, add a copy of the Falcon register definitions in a local NVDLA
header file. There is no functional change by adding these definitions
and this aligns with how the register definitions are defined for QNX.

JIRA LS-410

Change-Id: I83751671ec78c2df60e59fafe9be1c1612cb44d2
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2656680
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:47:58 +00:00
Arvind M
bf51097601 nvdla: kmd: add debugfs support for testing SC7
[1] Add suspend debugfs node to control suspend and resume operations.
    - /sys/kernel/debug/nvdla0/suspend
    - /sys/kernel/debug/nvdla1/suspend
[2] Any requests to DLA between suspend and resume shall fail.

Command to trigger suspend
    echo 1 > /sys/kernel/debug/nvdla0/suspend
    echo 1 > /sys/kernel/debug/nvdla1/suspend

Command to trigger resume
    echo 0 > /sys/kernel/debug/nvdla0/suspend
    echo 0 > /sys/kernel/debug/nvdla1/suspend

Jira DLA-5365

Change-Id: I5f30b57fce70a2904c2ac4cfeba413f86c6263a6
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2660805
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Arvind M
a8e71d52d5 nvdla: kmd: add suspend-resume ops for SC7 support
[1] SC7 power state switches off all modules except for RAM and
    AON regions.
[2] DLA suspend operation is responsible for the following.
    - Readiness: Checks if there are no outstanding tasks in queues.
    - Suspend: Initiates power-off sequence.
[3] DLA resume operation is responsible for the following.
    - Resume: Initiates power-on sequence.
[4] In addition, each module maintains is_suspended flag to
    communicate the state of suspension.

Jira DLA-5365

Change-Id: I594a1a2731a4f28f552e4be06338fca2fa4e7ca1
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2659248
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:47:58 +00:00
Ketan Patil
36128676f5 video: tegra: host: nvdla: Cleanup GOS functionality
GOS functionality is getting deprecated, hence cleanup the corresponding
code from nvdla.

Bug 3478260
Bug 200722684

Change-Id: I5923804b817fa2ab0421b5e0fdaa1f95cf79cd2e
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2657226
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:47:58 +00:00
Amit Sharma
7a2a02ea63 nvdla: Fix CERT-C violation
- Fix following CERT-C violation by typecasting __u32 to __s32 as per
  API.
  cert_int31_c_violation: Casting "desc->import_id" from "unsigned int" to
  "int" without checking its value may result in lost or misinterpreted
  data.

Bug 3470815

Change-Id: I3599bbbbf10f28d3cefb037ca907a0b8519b2f38
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2659347
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@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
Jon Hunter
90998456e4 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
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
Jon Hunter
66674c2da3 nvdla: Clean-up header files
Remove all unneeded headers from the NVDLA driver and only include
those that are necessary.

JIRA LS-410

Change-Id: I49cc0cab06bb079b9f4b88acba5b4075307e3af4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2653100
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@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:47:58 +00:00
Jon Hunter
5a37797912 video: tegra: host: Add syncpt set minval helper
Add a new help function nvhost_syncpt_set_min_update() that sets the
syncpt minimum value and updates. By adding this helper function we
can then also add an implementation that will work with the upstream
Tegra Host1x driver.

JIRA LS-410

Change-Id: I86271418b6b78468d5f76b781b8fe8f8b9ec14c7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2653096
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Praveen K <kpraveen@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
Jon Hunter
16b7d0418a video: tegra: nvdla: Don't use nvhost print macros
The NVDLA driver uses the nvhost_err() and nvhost_dbg_fn() macros which
simply call dev_err() and dev_info(), respectively. When compiling the
NVDLA driver against an upstream Linux kernel, nvhost_err() and
nvhost_dbg_fn() are not found and compilation fails. Fix this by
replacing nvhost_err() with either dev_err() or pr_err() and replace
nvhost_dbg_fn() with nvdla_dbg_fn().

JIRA LS-410

Change-Id: Ib89a187f330a4a80bd0b0329171a02f6336565ff
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2643161
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Praveen K <kpraveen@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:47:58 +00:00
Ashish Mhetre
6905c6d0dd video: tegra: host: Remove dma-attrs
dma-attrs.h is a downstream header and it's getting removed.
So remove it's usage from drivers.

Bug 3415117

Change-Id: I0e8c0f44a42fcdd28032f44ee2ab8ceb884955bc
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2627420
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@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-14 11:47:58 +00:00
Arvind M
2c2177fa72 nvdla: kmd: remove dependency on tegra_get_chip_id
[1] This commit makes use of platform data corresponding to matched
    DT entry to deduce chip ID equivalent.
[2] Platform data version which corresponds to firmware version
    shall help in identifying chip type.

Bug 200524968
Jira DLA-5054

Change-Id: I122ebf73c1cd8b9453704f1d0f9e6df2cce1ed1b
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2615128
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@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:47:58 +00:00
Arvind M
671d3cb05a Revert "tegra: host: nvdla: add T194-A01 WAR"
This reverts commit b72050fa13465850279850c8594f3be4fbf9066f.

[1] WAR is enabled through debugfs node.
[2] WAR is present only on linux and it is applicable only on T194-A01.

Considering the above, this WAR shall be removed from linux as well.
In addition, this commit removes some dependency on fuse for chip id and
revision (tegra_get_chip_id and tegra_chip_get_revision).

Bug 200524968
Jira DLA-5054

Change-Id: Ic1c73ad6d9570d39fbea0b54be4853c734630fa5
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2615127
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Anup Mahindre <amahindre@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@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-14 11:47:58 +00:00
Kartik
cf34ba7614 video: tegra: use 4 bytes for dla fuse nvmem cell
Fuse nvmem cell read returns a 4-byte integer value.

Update nvhost_nvdla_read_chip_option_register to use int value
to read the dla_disable fuse.

Change-Id: Ieedfa3302475cae95c7c0f635f84e30e3dff8475
Signed-off-by: Kartik <kkartik@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2574252
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:47:58 +00:00
Anup Mahindre
ede0003718 dla: kmd: Reflect updates to dla_os_interface.h
- dla_os_interface in FW was updated to switch to enums
- Reflect this update in this copy of the file

Jira DLA-3750

Change-Id: I9132f689fb82a6a89cc88e96033c486023e11a3a
Signed-off-by: Anup Mahindre <amahindre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2559410
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>
GVS: Gerrit_Virtual_Submit
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
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
Praveen K
584f8bd83d video: tegra: host: nvdla: Remove CONFIG_TEGRA_T23X_GRHOST checks
- Remove CONFIG_TEGRA_T23X_GRHOST as linux-t23x repo is merged
  to linux-nvidia repo

Bug 200751144

Change-Id: Ia2af1e924dd0033d13da9e1c7ea7ae03832ead43
Signed-off-by: Praveen K <kpraveen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2558796
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Anup Mahindre <amahindre@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-14 11:47:58 +00:00
Praveen K
ee5079ad5b video: tegra: host: nvdla: Add Fuse check for t234
- Check for fuse register to identify
  cases where a DLA t234 instance is floorswept

Jira DLA-4785
Bug 200748079

Change-Id: I78c30440806578fea86b1c5fe6f247c8117e534f
Signed-off-by: Praveen K <kpraveen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2554212
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: Ken Adams <kadams@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
Arvind M
c7692f6826 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-14 11:46:41 +00:00