Laxman Dewangan
e8583efabf
psc: Get rid of explicit header inclusion
...
The required headers for psc driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.
Bug 4087103
Change-Id: Ia77098f143648020b4c81a4556f7bdfbec03ed36
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894620
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
Tested-by: Liang Cheng (SW) <licheng@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-28 02:20:13 -07:00
Laxman Dewangan
7ecfc08dcc
mc-utils: Get rid of explicit header inclusion
...
The required headers for mc-utils driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.
Bug 4087103
Change-Id: Ib9b621f222aadd45ca1be62578e6208b116b4ae2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894619
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-28 02:20:09 -07:00
Laxman Dewangan
b3b257596f
platform: Get rid of explicit header inclusion
...
The required headers for platform/tegra driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.
Bug 4087103
Change-Id: Ie91211c4c899d1ddb3684fa30753ae733625b0d4
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894617
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-28 02:20:03 -07:00
Laxman Dewangan
d2b61aaee0
rtcpu: Get rid of explicit header inclusion
...
The required headers for rtcpu driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.
Bug 4087103
Change-Id: I9f0e9ea7b951be95bddbbb310c9cbf15cd972775
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894621
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
Reviewed-by: Pekka Pessi <ppessi@nvidia.com >
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-27 08:15:10 -07:00
Laxman Dewangan
ee73b0ff55
dce: Get rid of explicit header inclusion
...
The required headers for dce driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.
Bug 4087103
Change-Id: Ied598dc7bf1c49fe42869a254b26aa1e2989e73b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894618
Reviewed-by: svcacv <svcacv@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-27 02:55:45 -07:00
Ishan Shah
17c13e0ec0
mce: tegra23x-mce: Fix coverity oob-read
...
CID: 10166532: Out-of-bounds read.
CID: 10166559: Out-of-bounds read.
CID: 10166565: Out-of-bounds read.
CID: 10166594: Out-of-bounds read.
CID: 10166597: Out-of-bounds read.
Fixed by adding checks to prevent get_ari_address_index() function
used in all 5 defects from overflowing.
Bug 3952896
Change-Id: Id67b57c621fd03d3727aea94c794251c8d0f0736
Signed-off-by: Ishan Shah <ishah@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2869316
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-24 23:36:17 -07:00
Laxman Dewangan
40e4e98fbe
mc-utils: 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: Ia37ad697df18900322ff46c2190081ebd61c81f0
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891214
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-22 04:22:50 -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
Jon Hunter
c6f9d73c58
platform: tegra: nvpps: Move ptp-notifier source
...
Move the ptp-notifier.c source file under the 'nvpps' driver directory
because this is built into the NVPPS driver.
Bug 3918941
Change-Id: I4055422dac4f744f9978196ffcc54c20c666e95c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2851187
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-21 11:29:43 -07:00
Jon Hunter
876a3cd09d
platform: tegra: mce: Combine drivers
...
The Tegra MCE driver is currently built as two kernel modules which are
tegra-mce.ko and tegra23x-mce.ko. The tegra-mce.ko module simply exports
functions that other drivers can use and the tegra23x-mce.ko modules is
dependent upon this. Instead of building these as two separate kernel
modules we should build as one. Even in the future, if support for other
SoCs is added we can still have a single driver that supports all SoCs.
Rename the file tegra-mce.c to mce.c and update the Makefile so that the
single kernel module produced is called tegra-mce.ko.
Bug 4078818
Change-Id: I5cd7d09f9defb77de4109a89adf1c1384f6b076c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2890818
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-21 11:29:39 -07:00
Laxman Dewangan
3d92077e30
psc: Remove unnecessarily CONFIG
...
psc driver is build as module only so remove
the intermediate config CONFIG_TEGRA_PSC.
Bug 4074863
Change-Id: Idf40dcd1402f910bfe01756fb83607d17250f11e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2890120
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Liang Cheng (SW) <licheng@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-19 10:58:24 -07:00
Laxman Dewangan
a9e9f0cde1
dce: Get rid of CONFIG_TEGRA_DCE
...
The config variable CONFIG_TEGRA_DCE is set as m
inside the Makefile for OOT build. As the dce driver
inside nvidia-oot only build as module and there is
no Kconfig, remove this config variable.
Bug 4074863
Change-Id: I16436e97db583f2a8184dfffc3e18ebfddb62967
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889992
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-19 10:58:10 -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
JC Kuo
d7d941e745
drivers: tegra: Add Tegra USS io-proxy driver
...
This commit adds the Tegra USS io-proxy driver which allows userspace
to control clock and GPIO signals to the Ultrasonic sensor subsystem
found on Tegra platform.
Bug 3360749
Change-Id: I0b765e8b9e14b7de87f0f9205237d4dbfdd9f8f5
Signed-off-by: JC Kuo <jckuo@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2886017
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 15:46:35 -07:00
Mahesh Kumar
873e421d95
platform: dce: Add Debugfs support for Perf
...
Add debugfs nodes
- start/stop perf stats.
- read perf stat stats
- set the format type as csv or xml
Add debugfs to capture perf events
- Can enable specific perf events
through debugfs node.
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Change-Id: I0a7833d7a8f04296ba3806f4f2a218175080d2e2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2765513
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Arun Swain <arswain@nvidia.com >
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com >
Tested-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 19:36:09 +00:00
Vince Hsu
b25786578c
platform: dce: fix compilation error with GCC 11
...
GCC 11 reports the array-bounds issue when passing an 32-bit variable
to find_first_bit but referencing it as 64-bit.
drivers/platform/tegra/dce/dce-debug.c: In function ‘dbg_dce_boot_status_fops_read’:
./include/linux/find.h:119:37: error: array subscript ‘long unsigned int[0]’ is partly outside array bounds of ‘hsp_sema_t[1]’ {aka ‘unsigned int[1]’} [-Werror=array-bounds]
119 | unsigned long val = *addr & GENMASK(size - 1, 0);
| ^~~~~
drivers/platform/tegra/dce/dce-debug.c:493:20: note: while referencing ‘ss’
493 | hsp_sema_t ss = dce_ss_get_state(d, DCE_BOOT_SEMA);
| ^~
...
from drivers/platform/tegra/dce/dce-debug.c:15:
./include/linux/find.h:119:37: error: array subscript ‘long unsigned int[0]’ is partly outside array bounds of ‘u32[1]’ {aka ‘unsigned int[1]’} [-Werror=array-bounds]
119 | unsigned long val = *addr & GENMASK(size - 1, 0);
| ^~~~~
drivers/platform/tegra/dce/dce-debug.c:492:13: note: while referencing ‘boot_status’
492 | u32 boot_status = d->boot_status;
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
Fix it by passing a 64-bit variable to find_first_bit directly.
Bug 200730650
Change-Id: Ibfb68a2ee175aeb60eb9248496c220b35ff98906
Signed-off-by: Vince Hsu <vinceh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2856358
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: Vinod Gopalakrishnakurup <vinodg@nvidia.com >
Reviewed-by: Arun Swain <arswain@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 19:23:43 +00:00
vinodg
47b8841a62
platform: dce: Fix typecast issue
...
Sparse shows error for using __iomem pointer for
void pointer as incorrect type in assignment.
No need to use __iomem pointer, as this address
is never meant for device memory.
Changed iosys_map_set_vaddr_iomem to
iosys_map_set_vaddr call.
Bug 3646321
Change-Id: I3ebe3db14a7953ab42cd1392b54c74e86dc1243d
Signed-off-by: vinodg <vinodg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2846522
Reviewed-by: Arun Swain <arswain@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 19:23:43 +00:00
vinodg
658865f51a
platform: dce: fix missing static declarations
...
Fix sparse errors for static declaration.
Update functions and variables defined and used
in the same source files with static declaration.
Bug 3646321
Change-Id: I378b0f514aedf265420c2eb454691e85c378cd95
Signed-off-by: vinodg <vinodg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2846452
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Arun Swain <arswain@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: Ketan Patil <ketanp@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 19:23:43 +00:00
Mahesh Kumar
1258e71941
platform: dce: fix wait race condition
...
It is possible that we received the ACK from DCE even before we
start waiting. But currently we are clearing the "complete" state
before start waiting, which may result in missed interrupt.
This patch removes the clearing of complete state before wait.
Also Adds few comments for better understanding.
Bug 3941557
Change-Id: I7d2efb1a64eb6f2d4df1876add07a8f019b449f5
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2845498
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Arun Swain <arswain@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 19:23:43 +00:00
Mahesh Kumar
387a379024
platform: dce: add wait in ipc registration
...
If DCE bootstrapping is not complete, client registration may fail or
result in IPC failures.
Wait for bootstrapping to complete before registering any IPC-Client.
Use high priority work queue to schedule bootstrap work.
Bug 3583331
Bug 3826630
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Change-Id: I0facfe225e1550c795c2de7b42916416faa3bcaa
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2834857
Reviewed-by: Arun Swain <arswain@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2824219
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
2023-04-14 19:23:43 +00:00
Mahesh Kumar
75bfcf326d
platform: dce: Add suspend resume hooks
...
Add suspend resume hooks function and handling of sc7 events.
Bug 3583331
Bug 3826630
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Change-Id: I920b02ad46a76330febe666fe17e8d328f744b1d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2834856
Reviewed-by: Arun Swain <arswain@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2824218
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 >
2023-04-14 19:23:43 +00:00
Santosh Reddy Galma
31b6d913ab
platform: dce: add device_link b/w display and dce
...
- add the device link between display and DCE such that
DCE KMD module will enter suspend after display suspend is
complete and DCE KMD module resumes early before display
resumes as DCE bootstrap has to be complete for display
to proceed with initialization.
Bug 3685062
Bug 3826630
Signed-off-by: Santosh Reddy Galma <galmar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2780892
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com >
Reviewed-by: Arun Swain <arswain@nvidia.com >
Change-Id: I4d84d8b5723747d984f0883aba697a5a0a0a21bf
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2824217
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 >
Tested-by: Mahesh Kumar <mahkumar@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 19:23:43 +00:00
Jon Hunter
12a8ee706f
platform: dce: Fix build 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. Update the DCE driver accordingly to work with
the latest Tegra IVC driver.
Bug 3936429
Change-Id: Id04fa3cbc078ed9657ae779b6a1bbd088008175c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2842560
(cherry picked from commit 545f887e90cffff1d79f6a4ff0af87ddfcbeb178)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2801234
Reviewed-by: Mahesh Kumar <mahkumar@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-14 19:23:43 +00:00
Mahesh Kumar
5d5463b60f
platform:dce: notify dce after state ack
...
The current code doesn't notify DCE IPC after DCE IPC is in ACK state
Current Flow:
CPU DCE
1: tegra_ivc_init ---------
2: DCE_ADMIN_CMD_IPC_CREATE tegra_ivc_init
3: --------- tegra_ivc_channel_reset
dce:SIVC_STATE_SYNC
cpu:ESTABLISHED
4: tegra_ivc_reset
dce:SIVC_STATE_SYNC ---------
cpu:SYNC
5: Notify() tegra_ivc_channel_notified
dce:SIVC_STATE_ACK
cpu:SYNC
6: tegra_ivc_notified ---------
dce:SIVC_STATE_ACK
cpu:ESTABLISHED
After Step 6 DCE state is in ACK state and CPU state is in ESTABLISHED
state. As there is no further cpu->dce notification in RM_NOTIFY
channel, dce state stays in the "ACK" state and any attempt to send msg
on RM_NOTIFY channel from dce->cpu fails.
This patch notifies dce after step-6, So dce channel is also in the
"ESTABLISHED" state.
If steps 3-6 get executed in CPU before Step 5 in DCE gets a chance
to execute (DCE is slow), the CPU IPC state will change to "established".
Now when step 5 will execute in DCE, it'll see the CPU state as
"established" so, It'll make the DCE state also "established".
That's how it's working today.
Bug 3861985
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Change-Id: Ieb13f525d3f81b30aaae848d8d5adb1106856b65
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2840065
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Arun Swain <arswain@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 19:23:43 +00:00
Adeel Raza
424a1c66f0
platform: tegra: dce: change license to MIT for errors header
...
When dce-core-interface-errors.h was copied from DCE FW, the header
incorrectly retained its proprietary license. The license has been
changed to MIT.
Bug 3198239
JIRA TDS-6362
Signed-off-by: Adeel Raza <araza@nvidia.com >
Change-Id: I8fb1c525c11207444655af81f5b103f2908b98ef
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2834612
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 19:23:43 +00:00
Jon Hunter
9116ef8c3e
platform: dce: Add license and copyright to Makefile
...
Add the GPL v2.0 license and NVIDIA copyright to the DCE Makefile.
Bug 3912236
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Change-Id: I75044962d68a556c8b6b5ae7d09d44f8ff61b515
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2828593
(cherry picked from commit 15f8adb73788f0073f3f6e960fdadb04246c869a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2829455
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 19:23:43 +00:00
Mahesh Kumar
3c473c60eb
platform: dce: set MIT license for dce headers
...
Change NV license for dce headers to MIT license as those
can be distributed with other linux sources but they are also
used in DCE firmware.
Bug 3871403
Change-Id: I363d252a1155e3e0119d46b35b073bd6ad10fc57
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2820110
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Ujwal Patel <ujwalp@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 19:23:43 +00:00
Mahesh Kumar
bb8fc06951
platform: dce: fix async msg read prints
...
While MST is used, We get two async msgs from DCE and schedule 2 worker
threads, But during processing (dce_client_process_event_ipc) of these
messages, We are processing all the pending messages in one go. So,
while the second worker thread is scheduled, there is no new message
to read.
This Patch fixes the loop to try reading only when there is a new msg to
read. Also convert info print to debug, to avoid print noise.
Bug 3801736
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Change-Id: Iddf9ea8f0194539baa8c52616e2f836527400176
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2810440
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: Arun Swain <arswain@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 19:23:43 +00:00
Jon Hunter
6379e130a8
platform: dce: Fix automatic loading with DT
...
The Tegra DCE module is not automatically loaded on boot with
device-tree and this is because the MODULE_DEVICE_TABLE is not populated
in the driver. Add the MODULE_DEVICE_TABLE for the DCE driver to fix
automatic loading with device-tree.
Bug 3583600
Change-Id: I487d4de8b8e9e71a7c3ad961845c346e886e632e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2805837
Tested-by: Mahesh Kumar <mahkumar@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: Mahesh Kumar <mahkumar@nvidia.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 19:23:43 +00: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
a42af2d0ad
platform: dce: Coverity Fix
...
Fix Coverity issue CID 10138164
Create new macro to avoid non-reachable code.
Bug 3461002
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Change-Id: Ie5ff50678e30ae0ddd712ceda212f4b572ce624e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2765168
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: Arun Swain <arswain@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 19:23:43 +00:00
Adeel Raza
c032aa992e
platform: tegra: dce: Add debugfs for external tests
...
External clients such as MODS require the ability to run tests. Add
support for this feature. Currently only the following 2 external client
tests are supported:
- MODS ALU test
- MODS DMA test
Bug 3198239
JIRA TDS-6362
Change-Id: I18c20a9fa5d2606056d65b76fbaae9b0c81746d4
Signed-off-by: Adeel Raza <araza@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2606595
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-14 19:23:43 +00:00
Adeel Raza
d05457f954
platform: tegra: dce: Proper error codes for admin cmds
...
Currently admin channel commands return error codes which can't be
understood by KMD. Standardize on DCE_ERR_CORE_* errors (defined in
dce-core-interface-errors.h) for admin commands.
Bug 3198239
JIRA TDS-6362
Change-Id: I42a9ae44c0999aa5133c36ba4c6fb4fee2b25767
Signed-off-by: Adeel Raza <araza@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2736608
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-14 19:23:43 +00:00
Mahesh Kumar
8ef1f2db87
platform: dce: FSM incremental fixes
...
This patch addresses design review comments for FSM
- Add comment to update design doc on FSM update
- Create wrapper function to check bootcmd complete status
- move bootstrapping functions to dce_bootstrap.c file
- Fix sw resource init/deinit function name
Bug 3583331
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Change-Id: I77f05135f7ec1882922907f8acef50def639d26d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2758902
Reviewed-by: Santosh Galma <galmar@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Arun Swain <arswain@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-14 19:23:43 +00:00
Mahesh Kumar
5aa80075ad
platform: dce: remove use of of_irq_xxx
...
of_irq_xxx faimly of functions are not exported by Kernel.
use platform_irq_count and platform_get_irq APIs instead.
This patch also moves dce_platform_data elements to dce_device
struct to keep dce_platform_data constant.
Bug 3581824
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Change-Id: I5ea13ea039ef1464e678f0604a045a6ab67bc16f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2755141
Reviewed-by: Santosh Galma <galmar@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Arun Swain <arswain@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-14 19:23:43 +00:00
Mahesh Kumar
df0f2d1a74
platform: dce: add support for multiple HSP
...
Change-Id: Ia6d3278b89f5ba34bd6bbbd80820279e4e06fc0b
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2727625
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-14 19:23:43 +00:00
Mahesh Kumar
28a1cfd1c1
platform: dce: reworked dce FSM design
...
Redesign DCE KMD drive state machine to handle new PM events.
Bug 3583331
Change-Id: I89adcfa2f311a9a1e86b70e14821468203365266
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2673665
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Arun Swain <arswain@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-14 19:23:43 +00:00
Mahesh Kumar
a6cc70f8d5
platform: dce: remove debugfs on deinit
...
Current code does not remove debugfs node on deinit.
This patch fixes the same.
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Change-Id: I9ceb78b73d71aca0a2363df0408bf6a85ca91834
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2743215
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: Arun Swain <arswain@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-14 19:23:43 +00:00
Wei Ni
4904a11978
platform: dce: change DCE firmware name
...
Change the DCE firmware name from dce.bin to display-t234-dce.bin
Bug 3593058
Signed-off-by: Wei Ni <wni@nvidia.com >
Change-Id: I0a6e4243a6d3cc45688303ccd6a28a65a6edbb31
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2695059
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-14 19:23:43 +00:00
Mahesh Kumar
eab8003c4c
platform: dce: remove unused rpc_sync macro
...
DCE_IPC_WAIT_TYPE_SYNC is not used anymore for RPC. This patch get rid
of DCE_IPC_WAIT_TYPE_SYNC define from the code.
Bug 3472984
Change-Id: Iae0237e39f12f6cb170297f95fa6a39bc64e694a
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2699028
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: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Arun Swain <arswain@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-14 19:23:43 +00:00
Mahesh Kumar
4b609b3dd4
platform: dce: Add support for debug level logs
...
Add support to print debug level dce logs.
This is to reduce the number of prints spew by dce in kernel logs.
Bug 3472984
Change-Id: Idaf0dbb3511ee92a632bb0be8c445212e228f8d5
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2692698
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: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Arun Swain <arswain@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-14 19:23:43 +00:00
Prateek Patel
183b03657c
drivers: dce: fix cert_c defect
...
Dereferencing match, which could be NULL. Add a sanity check before
using it.
CID 451824
Bug 3512545
Change-Id: I367274508d331f602763a38ad7b1d26c2e876179
Signed-off-by: Prateek Patel <prpatel@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2702272
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-14 19:23:43 +00:00
Santosh Reddy Galma
631f4aafe9
platform: tegra: dce: fix async events handling
...
- when there are multiple async events back to back from DCE with very
short time gap between 2 events(for example, in case of DP MST,
2 heads could be sending flip event notification back to back at
almost same time), there is a possibility of 2nd async event getting
processed very late when shared mailbox register is set to zero as part
of processing 1st async event and before processing of 2nd async event.
- current change fixes it by processing all pending IVC frames for IPC
channel when processing an async event.
- change few error logs to info logs as these are not actually errors.
Bug 3582863
Bug 3429668
Change-Id: I29b1813bed50c4583e37f02bf656802081ccf9d3
Signed-off-by: Santosh Reddy Galma <galmar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2698560
(cherry picked from commit dd1abfa6eaab6e4f599d8c97bdccc7cbb67e1341)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2700438
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: Arun Swain <arswain@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-14 19:23:43 +00:00
Mahesh Kumar
716c1f3cdb
platform: dce: functionality fixes
...
This patch make changes to
declare of_device_id __weak so that other declarations
can take precedence.
validate return value from find_first_bit function to avoid overflow
when No bits are set.
%s/dce_stream_id/stream_id/
Jira TDS-9583
Change-Id: I85c681b904c7a4f9df76ec8387231a17de2e6d77
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2645913
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: Arun Swain <arswain@nvidia.com >
2023-04-14 19:23:43 +00:00
Mahesh Kumar
246fcd3d2d
platform: dce: Fix admin cmd ids
...
Reorganize duplicate Admin commands to make All
admin command ids unique.
Bug 3583331
Change-Id: Ib46d7ab7d1546ec0e9963c15c5ea36cd9b5b7cfe
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2685983
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Arun Swain <arswain@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-14 19:23:43 +00:00
Mahesh Kumar
de5c7b0b06
platform: DCE: fix notify event IPC buffer region
...
Current code does not include IPC buffer region for Notification
channel. This patch adds Notification IPC buffer size into total
allocated buffer for IPC.
This CL also increases Async IPC buffer frames from 1 to 4
Bug 3500242
Change-Id: I4ae07fdf9cf7c20fb70626698233f74a8b9fc8de
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2661833
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-14 19:23:43 +00:00
Prateek Patel
2f69b0b61c
drivers: platform: dce: fix Coverity defect
...
Update the if conditions to prevent Out-of-bound read/write access
on arrays.
CID 10127916
CID 10127864
CID 10127923
Bug
Change-Id: I01141ed46b7c372ddf1c5031d60b88ac28e786ca
Signed-off-by: Prateek Patel <prpatel@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2664104
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: Mahesh Kumar <mahkumar@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-14 19:23:43 +00:00
Prateek Patel
9b5416fd50
drivers: platform: dce: fix Coverity defects
...
Dereference after null check for pointers cl and handlep. Add a null
check before referencing cl and handlep.
Check return value of request_firmware for error.
Using uninitialized value event when calling dce_worker_thread_wait.
Add EVENT_ID_DCE_INVALID_EVENT and have a check before using the
value event.
CID 10127898
CID 10127999
CID 10127954
CID 10127811
Bug 3461002
Change-Id: If00ece28fd52e495b3a8d3eec7bdb4825d3c7892
Signed-off-by: Prateek Patel <prpatel@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2661588
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: svcacv <svcacv@nvidia.com >
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-14 19:23:43 +00:00
Mahesh Kumar
b2d304096e
platform: dce: fix ss clear reg address
...
This patch fixes a typo in ss_clear_regs.
Bug 3500242
Change-Id: If6d08219abc8a0c233c91e769077d793db5bbe3d
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2654239
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Arun Swain <arswain@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-14 19:23:43 +00:00
David Yu
d260cc9026
platform: tegra: dce: fix race condition
...
There is race condition in driver when in_use variable
is accessed in both interrupt context and process context
to schedule a workitem in workqueue. When it is reproduced,
following error message is printed in kernel log.
dce: dce_client_schedule_event_work:359 Failed to schedule Async event
Queue Full!
- This change make sure to check for in_use variable in
interrupt context before scheduling a workitem in workqueue and also
uses atomic operations for usage of in_use variable.
- This also removes unreachable code in driver.
Bug 3454371
Change-Id: I68ce3cd17769ec837a895a4147ae042e2730ae58
Signed-off-by: David Yu <davyu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2636749
(cherry picked from commit b8935cf34edb52b9803dae3ace767b116b8adbef)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2637714
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Santosh Galma <galmar@nvidia.com >
Reviewed-by: Mahesh Kumar <mahkumar@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