Yi-Wei Wang
b270392b4f
drivers: thermal: Add Tegra234 OC event driver
...
SOC_THERM is the primary hardware component of Tegra on-die thermal
management strategies. SOC_THERM includes the function of
externally-signaled event detection (SOC_THERM_edp) which centralizes
a few mechanisms for detecting and responding to externally signaled
electrical events, such as overcurrent events, undervoltage events, and
so on. These are known as "OC alarms" because they often indicate an
overcurrent event.
The Jetson Module's on-board power monitor INA3221 is configured to
trigger CPU/GPU hardware clock throttling via Tegra234 SOCTHERM_OC when
the Module input current exceeds the preprogrammed overcurrent threshold
to keep Module power consumption within the TDP power budget.
CPU/GPU performance may drop when hardware clock throttling occurs.
To allow the user to infer whether the performance degradation is
related to the overcurrent event, the Tegra234 OC event driver is
implemented which sends a Message ReQuest (MRQ) to the BPMP firmware to
provide information regarding the overcurrent enable state and the event
count to userspace via the hwmon sysfs interface.
Bug 3571683
Signed-off-by: Yi-Wei Wang <yiweiw@nvidia.com >
Change-Id: I6cc3579944efc92916189f097ccfed2ccba26051
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2862007
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-17 07:03:26 -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
Sheetal Tigadoli
7a3a094915
drivers:net:oak: Add module_device_table entry
...
Add module_device_table entry to support
autoloading of the driver
Bug 3882239
Change-Id: I6b33bea9f63bea031dadc8e40d153c9f2478ac51
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2883183
(cherry picked from commit eb3c7ffa28dfec24786041bf59d947fee23e9e0c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2887730
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-16 12:55:09 -07:00
Laxman Dewangan
495ccc5db4
kernel-src-files-copy: Remove build time copy of dce and nvdla
...
Remove build time copy of the DCE and NVDLA driver from
kernel/nvidia to out folder as these drivers are already
copied to kernel/nvidia-oot.
Bug 4038415
Change-Id: Ic2dec0ce8c38e5a1a02dece9fac8c53f9c896b5b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2888618
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-15 08:53:00 -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
Revanth Kumar Uppala
580358e6a2
nvethernet: macsec: Fix crash during suspend
...
Issue: MACSEC is not enabled in DT for eqos_1 and mgbe2_1
interfaces which makes macsec_pdata pointer to NULL.
During suspend/resume macsec_pdata pointer accessed without
NULL check which resulted in crash.
Fix:
o Add NULL pointer checks for macsec_pdata in suspend and resume.
o Remove unnecessary checks for macsec in suspend and resume.
Bug 4060718
Change-Id: I00e042d979e115c088696a8964496ed0054360e5
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2888289
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 23:36:47 -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
2ceba857fd
media: add imx390 sensor driver
...
Add imx390 camera sensor driver code,
mode tables and makefile changes.
Bug 3583587
Bug 4058151
Change-Id: I2b67d355d2684ccb6ab12881ac0d0d5b30447cc4
Signed-off-by: Ankur Pawar <ankurp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2879227
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-14 20:00:58 -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
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
Laxman Dewangan
68992c3856
nvdla: Merge nvdla sources from kernel/nvidia to kernel/nvidia-oot
...
Merge the nvdla driver and header sources with change history from
'origin/dev/ldewangan/nvidia-nvdla-dev-main'
into
nvidia-oot-dla-dev-main
Bug 4038415
Change-Id: I2fa6256af1c3d39a17fbb6b00ec97da5113e30cd
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
2023-04-14 12:46:10 -07:00
Laxman Dewangan
fc65c721b3
dce-kmd: Merge the dce-kmd driver from kernel/nvidia to kernel/nvidia-oot
...
Merge all the history of dce-kmd driver from kernel/nvidia to
kernel/nvidia-oot to get rid of kernel/nvidia for OOT drivers.
Merge remote-tracking branch
'origin/dev/ldewangan/nvidia-dce-kmd-dev-main'
into
nvidia-oot-dce-kmd-dev-main
423a08008 platform: dce: fix compilation error with GCC 11
c042cceca platform: dce: Fix typecast issue
fab8399c0 platform: dce: fix missing static declarations
3120c1b93 platform: dce: fix wait race condition
cfa9f9447 platform: dce: add wait in ipc registration
2cda11540 platform: dce: Add suspend resume hooks
6dc865fdf platform: dce: add device_link b/w display and dce
62d5a814c platform: dce: Fix build for Linux v6.2
f94fc6a6c platform:dce: notify dce after state ack
3fd0884d0 platform: tegra: dce: change license to MIT for errors header
c63ddeada platform: dce: Add license and copyright to Makefile
04317ad83 platform: dce: set MIT license for dce headers
777f20477 platform: dce: fix async msg read prints
b2b1943a4 platform: dce: Fix automatic loading with DT
71ec8ed89 platform: DCE: Add OOT support for ipc
f4c024e6a platform: dce: Coverity Fix
10f192c95 platform: tegra: dce: Add debugfs for external tests
4e14b0c5f platform: tegra: dce: Proper error codes for admin cmds
901e8cd42 platform: dce: FSM incremental fixes
892514267 platform: dce: remove use of of_irq_xxx
699997fdf platform: dce: add support for multiple HSP
5ee0a5d61 platform: dce: reworked dce FSM design
5c9cec276 platform: dce: remove debugfs on deinit
848f9554d platform: dce: change DCE firmware name
624471e68 platform: dce: remove unused rpc_sync macro
ebcd3626d platform: dce: Add support for debug level logs
60f8aaf3b drivers: dce: fix cert_c defect
076e7f507 platform: tegra: dce: fix async events handling
7da65fd7a platform: dce: functionality fixes
fb138a499 platform: dce: Fix admin cmd ids
b4cef4627 platform: DCE: fix notify event IPC buffer region
859338234 drivers: platform: dce: fix Coverity defect
ea88e4a33 drivers: platform: dce: fix Coverity defects
8e7845044 platform: dce: fix ss clear reg address
b63ecbcb5 platform: tegra: dce: fix race condition
5f223b330 tegra: platform: dce: fix for wrong mutex sequence
d36abd464 platform: tegra: dce: retry interrupted rpc wait
62fb673ff platform: tegra: dce: fix debugfs compilation error
42539f106 platform: tegra: dce: fix worker deadlock
885b82799 Merge branch 'linux-t23x' into 'linux-nvidia'
05cac4791 platform: tegra: dce: Add debugfs for echo cmd
16c6e9540 platform: tegra: dce: Admin rpc post boot support
8ec573617 platform: tegra: dce: Add WQ to handle async IPC
eb0b14aa8 tegra: platform: dce: use mutex_lock API properly
e9f03e0d9 tegra: platform: dce: Update smmu stream id
058f5017c tegra: platform: dce: Fix IPC race condition
c8f368c92 tegra: platform: dce: Pass msg length info to DCE
cc9fe6a08 tegra: dce: Add IPC event notification support
f70bdcd12 tegra: dce: use wait queue instead of completions
4a5540a1e drivers: platform: tegra: dce: Clean up ivc notify
4bf0470aa tegra: platform: dce: Fix race condition on fgpa
c82335a03 tegra: dce: suppress unnecessary info logs
f3fde71e6 tegra: dce: Add debugfs node to show boot status
c10071d03 dce: avoid kmsg flooding with info print.
7fab8f573 platform: tegra: dce: add dce kernel driver
Bug 4038415
Change-Id: If39d7d68ec2b8f6d8bbd6942181755720d09e3a8
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
2023-04-14 19:37:51 +00: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
Sumit Gupta
70e595afca
tegra: platform: dce: fix for wrong mutex sequence
...
Fix wrong sequence of mutex destroy and unlock for Invalid Channel State.
Also, removed a redundant return statement.
tegra-dce d800000.dce: Adding to iommu group 5
dce: dce_ipc_channel_init:312 Invalid Channel State [0x0] for ch_type [2]
------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(mutex_is_locked(lock))
WARNING: CPU: 10 PID: 1 at kernel/locking/mutex-debug.c:103 mutex_destroy+0x60/0x70
Modules linked in:
CPU: 10 PID: 1 Comm: swapper/0 Not tainted 5.10.65-tegra #21
Hardware name: NVIDIA Orin Jetson-Small Developer Kit (DT)
pstate: 60c00009 (nZCv daif +PAN +UAO -TCO BTYPE=--)
pc : mutex_destroy+0x60/0x70
lr : mutex_destroy+0x60/0x70
....
Call trace:
mutex_destroy+0x60/0x70
dce_ipc_channel_init+0x234/0x4a0
dce_admin_init+0x48/0x180
dce_driver_init+0x30/0x130
tegra_dce_probe+0x154/0x300
Bug 200778010
Signed-off-by: Sumit Gupta <sumitg@nvidia.com >
Change-Id: Ia8a98d3af82a8fc1b77400dfbeff497ff3123921
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2615918
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Santosh Galma <galmar@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-14 19:23:43 +00:00