Wykres commitów

258 Commity

Autor SHA1 Wiadomość Data
George Shen
37a21d759b msm: eva: Recover EVA SMMU fault
Needs extra change to enable EVA SMMU fault. This change clears
all the obstacles to achieve the goal.

Change-Id: Ia93ff2132ff53741f3c20d4271083f6f93824cac
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-05-23 10:06:11 -07:00
George Shen
40bd33147d msm: eva: Fix an issue in DSP sess create failure
Avoid using invalid session id in case of DSP session failed.
Increase the number of per IOCTL session properties setting
from 8 to 64.

Change-Id: Ia9979001fe6e0ed247067d7b12314c327897fead
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-05-20 22:17:24 -07:00
Aniruddh Sharma
6315e184ca msm: eva: Fix for use after free of inst node
inst node gets deleted in delete_dsp_session call but
again after this call we try to access inst to delete the
dsp session list. This will lead to use after free issue.

Change-Id: Ic4e1736b06f8e49895f70428124b245e1d2ce782
Signed-off-by: Aniruddh Sharma <anirshar@qti.qualcomm.com>
2023-05-18 06:29:27 -07:00
George Shen
4e37a3a40b msm: eva: Adopt Fastrpc Feature Request
To support multi-PDs per user process. Fastrpc handle is
no longer PID. Add change to support the FR.

Change-Id: I39d7043f048597f1e4e728c48d588f12bb740b56
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-05-17 21:46:43 -07:00
George Shen
115a7bf5c7 msm: eva: Enhance power and perf logging
Use CVP_PWR instead of CVP_PROF.
Add AON timer reading.
Avoid SSR if core init failed.

Change-Id: I1dd40edc893009a2f2794e3431bb08398ec6352b
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-05-16 11:09:28 -07:00
Naveen Ravi
36fa77e4d7 msm: eva: add Bazel Build Support for EVA KMD
Change-Id: I93af2eb7c5cc2cf0ee4bff5b6d838c18d886d21a
2023-05-11 11:46:50 -07:00
George Shen
efdc66a282 msm: eva: Init fence queue before its use
Fence queue could be used during SSR, which may happen right after
session is created. Relocate fence queue init to the point before
session creation becomes visible to SSR handling.

Change-Id: Ie21537383b44bbdf40d87af434df0e55a677a85d
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-05-09 10:49:06 -07:00
George Shen
55c9e97cab msm: eva: Enhance DSP debugging
Validate session pointer passed in by DSP driver and save the
most recently un-mapped DSP buffers for SMMU fault debugging.

Change-Id: I1beebcce190874e3129fc1bd3806ffee61eb6d4d
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-05-05 12:18:43 -07:00
qctecmdr
2d0cec88e3 Merge "msm: eva: Support Synx V2 only" 2023-05-02 15:32:28 -07:00
qctecmdr
35334bffd6 Merge "msm: eva: Fix Kw p1 issue" 2023-05-02 12:57:40 -07:00
Jingyu Su
267b6bd153 msm: eva: Fix Kw p1 issue
Validate s->next is not NULL before dereferencing

Change-Id: I8112eb20aab939b917243e283583ab9d0884e3e8
Signed-off-by: Jingyu Su <quic_jingyus@quicinc.com>
2023-05-02 11:25:47 -07:00
George Shen
73f3cecfbd msm: eva: Support Synx V2 only
Simplify code base for future generations of driver.

Change-Id: I9ed940184da3b2224c74092ac31163de29c84f64
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-05-02 10:06:41 -07:00
qctecmdr
e6a01f04a6 Merge "msm: eva: Enhance session error handling" 2023-05-02 01:24:55 -07:00
qctecmdr
4558e11243 Merge "msm: eva: Change FW boot sequence" 2023-05-02 00:28:23 -07:00
George Shen
2bdff6770e msm: eva: Enhance session error handling
Ensure smmu fault dump before calling BUG_ON. Rely on WD timeout
for FW hang debugging.

Change-Id: I0d7fba31dbc602b244af74da6774885c56af0fcc
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-05-01 21:46:25 -07:00
George Shen
4e3d3a91bd msm: eva: Change FW boot sequence
Match MPTest sequence to facilitate presilicon bringup.

Change-Id: Iafd4443eb0f9d6045e61eb2dd33b6663dc3f1334
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-04-28 15:22:11 -07:00
George Shen
1f5a03e9a6 msm: eva: Use pool allocator to allocate wncc oobs
Keep wncc working in case of kernel heap leakage. wncc buffer
requires 128kb. Driver will pre-allocate and store 8 buffers
in the pool if wncc use case starts.

Save all recently de-register wncc buffer mappings through
deregister_buffer API.

Change-Id: Iaa422bed9d3dd6f6cfe349a4931bfde28a3e3a51
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-04-27 13:52:41 -07:00
qctecmdr
d4e1c81dc6 Merge "msm: eva: Update WarpNCC-related UAPI" 2023-04-26 17:08:44 -07:00
qctecmdr
de91fb222e Merge "msm: eva: Wait EVA ready for sess deletion" 2023-04-26 10:21:11 -07:00
Sabharsh Sidhu
28d5691237 msm: eva: Update WarpNCC-related UAPI
Update UAPI for future backward compatibility.
Add mechanism to dynamically specify WarpNCC
metadata buffer offset instead of using macro.
Add UMD-KMD shared definitions header file.

Change-Id: If8ea7046e692eef1a784d2744228846b6f752d0d
Signed-off-by: Sabharsh Sidhu <quic_ssidhu@quicinc.com>
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-04-25 16:59:57 -07:00
Jingyu Su
564ed96df0 msm: eva: fix KASAN stack-out-of-bounds issue in __iface_cmdq_write_relaxed
Change-Id: Id5b07cf778804ac7865f150e72331be6e94cb80d
Signed-off-by: Jingyu Su <quic_jingyus@quicinc.com>
2023-04-25 09:58:09 -07:00
Naveen Ravi
fec60a4a00 msm: eva: change warp frame to kw fence
Change-Id: I271eb88f166e22c81d9f0d9245faefd1277602f0
2023-04-24 22:39:03 -07:00
George Shen
23fb4cfeac msm: eva: Wait EVA ready for sess deletion
Avoid EVA in middle of processing frames when CDSP SSR caused
force session deletion.

Change-Id: I245f13086173c832a098b5f5aad5b38f38bd28b3
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-04-24 12:13:24 -07:00
Palak Joshi
00f7039e3c msm: eva: Added EVA FW/HW hung detection mechanism using WD ISR
Recovery mechanism is added to invoke SSR when WD ISR is triggered.

Change-Id: I6f7a289f822c6f1a50494cd6a4855a2c3ba2cc72
Signed-off-by: Palak Joshi <quic_palakash@quicinc.com>
2023-04-14 01:33:58 +05:30
Naveen Ravi
ab30e5fc6f msm: eva: fence override mode
Change-Id: I0cd8b3dc234168f365d8664f3a4d0c09094a1da1
2023-04-11 15:13:48 -07:00
George Shen
2532f316af msm: eva: Use correct error code in __dsp_suspend
Incorrect error code misleads driver to trigger SSR.

Change-Id: I6e64c6b79be973c4e5b0b9968dc3b952855a2004
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-04-11 10:31:22 -07:00
George Shen
815ffdf422 msm: eva: Fix NoC Hang When accessing NoC
Acquire xo_reset before accessing CVP NoC. There is a chance the NoC clock,
XO clock is disabled during XO reset. Acquiring xo_reset will block the
XO clock reset.

Change-Id: I51ab201beafbd1a4b998ee33a9d23c1efa3e2a14
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-04-10 21:58:52 -07:00
Jingyu Su
cde58caa65 msm: eva: Remove two calls to qcom_clk_set_flags() in cvp_hfi.c
Change-Id: I6ffd3e045999ce701825aaec66f38255fd98cff2
Signed-off-by: Jingyu Su <quic_jingyus@quicinc.com>
2023-04-06 17:06:35 -07:00
Prakruthi Deepak Heragu
c0feafd278 msm: eva: Rename Gunyah RM APIs
As we are merging upstream patches, resolve conflicts of namespaces in
downstream gunyah modules.

Change-Id: I6bc4719132e30e984974077c9923d3753faf539a
Signed-off-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
2023-04-05 15:32:23 -07:00
George Shen
9d1d8dfa53 msm: eva: Use ratelimited kernel logging
In case of error recurring frequently.

Change-Id: I5d8f9b3a65a3d1faa6646c38dbd2e96d3beeca1b
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-03-31 10:03:42 -07:00
George Shen
84334be2a1 msm: eva: Define kernel timeout in one place
Easy to maintain.

Change-Id: Iacf8ae5481c08d69259f41db26ac6ac2216a54f6
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-03-27 23:30:30 -07:00
George Shen
dcaf2dcdfb msm: eva: Remove unused dsp power flags
Avoid mis-use of old flag that could lead to failure in
powering collapse EVA when a session becomes idle for 3s.

Change-Id: I954bc0972b1f627b274b78659c34626127619af5
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-03-21 14:13:07 -07:00
Palak Joshi
a33d13c191 msm: eva: Updated error handling in case of core init fails.
Removed release and disable subcache in case of core init fails,
as subcache deinit is done as part of load FW failure error handling
and also as part of unload FW.

Change-Id: Ic1a6bf75eacaa8a4ccb95a7155e720932a372a58
Signed-off-by: Palak Joshi <quic_palakash@quicinc.com>
2023-03-20 23:27:56 -07:00
George Shen
5d31120817 msm: eva: Save buffer mappings of last frame
Help debugging SMMU fault.

Change-Id: I93f041b9c117f1cce0d4a8ad9f723d9d31b02010
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-03-19 22:06:35 -07:00
Sabharsh Sidhu
db7c8ad719 msm: eva: Add CVP_CMD debug logging
Add cmd logging functionality as an
alternative to pkt logging. This has
advantages related to log dropping
and log mangling.

Change-Id: I0ff6801445821e1224f83fa7e2eb8bf8a849962b
2023-03-17 15:17:23 -07:00
qctecmdr
668cfd6757 Merge "msm: eva: Return correct fence number" 2023-03-16 17:56:48 -07:00
George Shen
e9bc85d930 msm: eva: Return correct fence number
In case of the fence command setup thread being pre-empted,
the fence command can be processed by HW even before the setup
thread returns. In that case, the setup thread may be using
wrong fence number, causing it resends the HFI packet that has
been processed. The consequence could be SMMU fault.

Change-Id: I8be9808e993a27a1c7664e68a5382d145a8bc3cc
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-03-16 17:10:19 -07:00
George Shen
f466a36b98 msm: eva: Print SID programming registers
During SMMU fault.

Change-Id: Ic66736ed5d5c97ec6344c295c0ec0f1ca01cf19a
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-03-16 11:34:49 -07:00
qctecmdr
121ff748b0 Merge "msm: eva: Fix logging and timeout issues" 2023-03-16 00:11:12 -07:00
qctecmdr
2509530e7a Merge "eva-kernel: hfi q info at session timeout" 2023-03-15 23:43:58 -07:00
Jingyu Su
d723781ea3 msm: eva: Switch to qcom_scm_assign_mem() from hyp_assign_phys()
Switch to upstream friendly qcom_scm_assign_mem from hyp_assign_phys.

Change-Id: I2b6f1af346166794c87a205cffddbcdfb112e16a
Signed-off-by: Jingyu Su <quic_jingyus@quicinc.com>
2023-03-15 13:43:35 -07:00
Nagesh Gunna
79c9987bbe eva-kernel: hfi q info at session timeout
Printing hfi q info at the of
           session queue time out to get debug
           info on missed cmd/frame pkt.

Change-Id: I9b324a6496699272f9f1b9cb794f3e322d5421ae
Signed-off-by: Nagesh Gunna <quic_ngunna@quicinc.com>
2023-03-15 19:10:24 +05:30
George Shen
e3d980caa1 msm: eva: Fix logging and timeout issues
synx signal used wrong logging tag. PARAMs buffer is treated
as persistent buffer to avoid unnecessary warning messages
complaining mapping in-use when session closed.

Change-Id: Ia44b943ba0d41d9f7fa276eabb369597552a4956
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-03-08 13:43:28 -08:00
Sabharsh Sidhu
6aabaf3247 msm: eva: Improve error handling for pkt enqueuing
Report error code for pkt enqueue failure - critical
for reporting rejected frames in flush scenarios.
Improve logging for unprocessed frames.

Change-Id: Ic5d04a56122b0bbf94f69117ee0fde9f5993e275
Signed-off-by: Sabharsh Sidhu <quic_ssidhu@quicinc.com>
2023-03-03 11:03:41 -08:00
George Shen
9de86afd60 msm: eva: fix a missing frame issue during flush
Racing happens when a new fence command submitted and flushing
is requested from a different thread.

Change-Id: I2d4f1e02c245f9a4a7eeb2e541ddb0e99b63b461
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-02-28 15:28:59 -08:00
George Shen
264f4c7c0d msm: eva: Add session start/stop through FW
New HFI allows FW stop session and notify driver of
its completion. Driver is safe to reclaim resources
allocated for the session.

Change-Id: Ic6a08334a0bafd57f366a635c53f4f5f8f31f77e
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-02-25 14:58:02 -08:00
Naveen Ravi
0aa70a4811 msm: eva: define ds config in eva kmd
Change-Id: Ibbbf5d34e470d66168e4257aef53beaa5814b7cb
2023-02-24 15:54:34 -08:00
George Shen
d665182aed msm: eva: Add FW 17 support due to HFI change
Non-secure ARP and CRC in BUFFER_TYPE, enabling IFPC.

Change-Id: I551e29e7770cdfd83b0ed9f7f925fb8bd6e6a4a6
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-02-24 12:14:27 -08:00
qctecmdr
de003e633c Merge "msm: eva: New attribute for secure camera mapping" 2023-02-21 09:26:18 -08:00
George Shen
70fc47d3eb msm: eva: New attribute for secure camera mapping
Add attribute DMA_ATTR_QTI_SMMU_PROXY_MAP to dma_map_attrs.

Change-Id: I747a550deb42c45da2c816682976d04968ad48b1
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-02-20 22:31:40 -08:00