Граф коммитов

46 Коммитов

Автор SHA1 Сообщение Дата
George Shen
33825ea411 msm: eva: Fix KW issue
Change-Id: I93a8ff3ac20de452c2aa220a3dc4bc052880762e
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-06-05 17:01:56 -07:00
George Shen
304e2cf9c0 msm: eva: Allocate 1MB debug buffer for FW
For FW to hold debug info. Simplify driver structure for easy
dump in T32.

Change-Id: Ib310a3d9fe3437d5ce49783eb813fbb2d8bd3216
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-06-02 14:40:35 -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
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
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
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
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
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
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
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
George Shen
bc2a58caf4 msm: eva: Print error code if send hfi queue fail
Fixing KW issue that blocks promotion.

Change-Id: I51ed3c909e2dc32535cc8beaa1af1fb299f7f2ab
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-02-16 22:49:21 -08:00
George Shen
a9db98a35d msm: eva: Fix KW issues
Change-Id: Ia2ec86faf79959511f491025489cd5cecf56fec5
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-01-30 09:21:23 -08:00
George Shen
75bac29145 msm: eva: port eva-kernel.lnx.2.0 changes
Change-Id: I3121f71a11c8a48081309ad46c04bedc6b6a3ca1
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-11-15 10:06:14 -08:00
George Shen
abe2519bd8 msm: eva: Add EVA4.0 blocks for power voting
VADL, TOF, RGE, XRA and LSR added.

Change-Id: I5099b72bb38199d493a710c716fc528ab2cc0e7c
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-10-25 13:41:12 -07:00
George Shen
991125b3b1 msm: eva: Enable Lanai compiling
EVA Kernel driver.

Change-Id: Ie415075a05707a20d9eac1e478a2f18c741b3446
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-09-28 18:33:20 -07:00
George Shen
fcbb3d87ab msm: eva: Propagate tip of 2.0 to 3.0
Add back all changes made after Aug. 3rd from
Kailua to Lanai.

Change-Id: I725b77892ab24354014b3d9bbc13d14c710aff5a
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-09-27 12:52:27 -07:00
George Shen
e30e31d72b msm: eva: fix DSP session deletion racing
The racing to delete DSP session may happen after DSP SSR when
EVA DSP driver just sent session deletion command to CPU driver.

Change-Id: I252000bc2c04148874db02b50d0a94c10edbb6e6
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-08-03 08:56:21 -07:00
George Shen
2eea29b825 msm: eva: Add debug message when suspend dsp fail
Check if promoting to LE SI works or not.

Change-Id: I6e69cf602d39a6ebd1f99deb565832ccf7494cba
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-07-28 15:24:10 -07:00
George Shen
1cb056362c msm: eva: Add process name for debugging
Also fix a persistbuf optimization problem that failed
multi-loop DMM test.

Change-Id: Ib197077a708dea99967f0a9f4ed1c09d12023edc
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-07-08 16:57:03 -07:00
George Shen
98cd09c61f msm: eva: Fix power collapse failure
In case there is a live but unused DSP session.

Change-Id: I7dd0d7baeb89365a2d8ba6905ddffd1e5569c872
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-07-08 14:59:34 -07:00
George Shen
6b7cb5f836 msm: eva: Fix nested mutex lock in DSP SSR
rpmsg remove call back hangs with the problem.

Change-Id: I60df9d8772f31778051a905197479aa9f9d61e9f
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-07-06 15:48:38 -07:00
George Shen
4bfd66f039 msm: eva: Enhance SMMU fault debugability
Changes only applicable on CPU EVA path, including
- tracking packet type and buffer index for each dma_buf
- print feature config packet type
- print session properties in error cases.

Change-Id: I938cf463bee9284760145f3fd9e030b3b8134caa
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-07-01 09:25:43 -07:00
George Shen
8f1f20ab0c msm: eva: Workaround of EVA ssr failure in DSP UCs
After EVA SSR and shutdown DSP driver, remove all DSP sessions.

Change-Id: I23cbd2ab3d5ec8c03ec0f4059be287c28ddb0f9a
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-06-27 14:26:56 -07:00
George Shen
250bb8b4e1 msm: eva: Propagate tip of 1.0 to 2.0
For Kailua SoD bring up.

Change-Id: I69e41850b55c688caf40f2066ed2628c2df274a3
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2021-11-28 14:51:51 -08:00
Yu SI
4981885760 msm: eva: merged tip from eva-kernel.lnx.1.0
merged tip source code from eva-kernel.lnx.1.0,
and verify the promotion flow.

Change-Id: I031508fd8a23995a166506f3d190e5e228eb13c2
Signed-off-by: Yu SI <ysi@codeaurora.org>
2021-10-27 18:14:30 -07:00
George Shen
2b303bbbf4 msm: eva: Validate instance before deleting
The change will avoid panic during DSP session deletion in case
an invaid instance pointer passed in. Disable suspend early
during core init.

Change-Id: I0ec1e95d17a65b26fb29c970889926d9507bf554
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-09-24 15:54:34 -07:00
Aniruddh Sharma
b30be7e544 msm: eva: Minidump enablement for eva
Enabled FW static dump.
Enabled VA_MD for CMD and MSG queues, both for CPU and DSP.
Enabled VA_MD for debug structs.

Change-Id: I9a5a2418620cd0608b90301eefe0726a462c1ce3
Signed-off-by: Aniruddh Sharma <anirshar@codeaurora.org>
2021-09-14 09:49:24 -07:00
George Shen
f8342d4cf9 msm: eva: Remove deprecated header
Allows compiling independent of synx, fastrpc and mmrm readiness.

Avoid including KP 2.0 deprecated headers.

Change-Id: Ibf026f409b7f6284705c95b01a5251ac6a498b32
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-09-09 16:34:56 -07:00
George Shen
55eeb27ba8 msm: eva: Support EVA DSP clients in mult-process
Each process requires unique driver name.

Change-Id: I72993470dcd60de20dfda8133b0b3f4dfbbf8f8d
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-08-17 14:37:14 -07:00
George Shen
de1ef5829c msm: eva: Add support of DSP SSR
Clean up DSP sessions and their opened resources.

Change-Id: Ibf1468e52c8da1ebf450c08ca2df2c57de191423
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-08-16 22:22:44 -07:00
George Shen
d6bee86fa3 msm: eva: Avoid nested mutext lock in dsp
Unlock dsp mutex early, right after critical section ends.
In this way, HFI queue send will lock mutex without nested
locking concern.

Change-Id: I1af64565440585e3fffe041d39d2e4a03f846c1a
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-07-28 14:42:16 -07:00
George Shen
349e230912 msm: eva: Fix EVA SSR recovery in DSP
Avoid deadlock in DSP EVA session creation after EVA SSR.

Change-Id: I22b363883db5d3bf8e8554a3708cb549437899ba
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-05-27 16:37:55 -07:00
George Shen
79fd263380 msm: eva: Avoid double free of DSP dma buffer
In DSP use case, if application failed to free dma buffer before
session end. Kernel driver will free all dma buffers belong to the
dsp session. During this process, same dma buffer was freed twice.
This change is to fix the problem.

Change-Id: I641f9fc0eafbd6fe5c04276085ccd3946e439b41
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-05-13 14:39:59 -07:00
Yu SI
e3e3be2557 msm: eva: check on inst value from ptr_dsp2cpu
check the validity of returned inst from
ptr_dsp2cpu in func __dsp_cvp_mem_free.

Change-Id: Icb2e5721aa5f8381b76e0cc4f991c48a1d74c45e
Signed-off-by: Yu SI <ysi@codeaurora.org>
2021-05-03 18:50:59 -07:00
George Shen
b566b0b091 msm: eva: Remove inappropriate comment
To ensure compliance with kernel module coding convention.

Change-Id: Ib511ea3df44d83078456d1de5e4651e31e0ff1dc
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-04-23 11:42:17 -07:00
George Shen
98e9135563 msm: eva: Simplify EVA DSP interface
Control EVA directly through kernel driver low-level functions.
Add error handling in session creation.
Unwind task and file reference count during buffer un-mapping.

Change-Id: I1ae5ae4afd3fea8e90faee1d8fe2c1ff92eeb9c2
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-04-08 13:13:23 -07:00
George Shen
d091c13758 msm: eva: Fix a dsp session list iterating issue
Use dsp_list instead of generic list member of EVA session
object when iterating session list tracked by CPU, DSP interface
driver.

Change-Id: I29b76f7e8adfac807830b0719456d92bb98da63d
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-03-22 16:03:22 -07:00
George Shen
600394cf35 msm: eva: Update date of source
To comply with open source scan requirements.

Change-Id: Idd9a4dec7dbe7ee7d4dd7294083d9b045438f67d
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-03-15 14:53:26 -07:00
George Shen
521f3d374f msm: eva: Fixed static analysis error
Fix static analysis tool detected errors.

Change-Id: I882dd7aebe544b930abb49ba998c1482991a49c9
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-02-23 13:23:17 -08:00
George Shen
6f2d4b9361 msm: eva: enhance DSP session resource management
Improve debugability and error handling in future.

Change-Id: I4f116e106f243143f4f62eb28fbf338e219018c6
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-02-18 13:24:35 -08:00
George Shen
b417912802 msm: eva: Update rpmsg cdsp edge name
Needs to use correct edge for CPU to CDSP glink.

Change-Id: Ie9117453454e13830987202d3629855b3c81c811
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-02-09 09:30:27 -08:00
George Shen
f3d06c8ef3 msm: eva: New DSP driver interface
New CPU-DSP interface aims to replace reverse RPC in DSP EVA
applications.

Change-Id: I4225dfa0b1acf8015a763263520442712e571851
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-01-18 21:12:51 -08:00
George Shen
0c218a6148 msm: eva: propagate tip of CVP driver to EVA
Merge cvp driver to EVA

Change-Id: I3fb962bfae750f49f821c16061bd78fa5425959e
Signed-off-by: George Shen <sqiao@codeaurora.org>
2020-08-06 22:57:54 -07:00
George Shen
387d008122 msm: eva: Initial eva driver
For Waipio.

Change-Id: I2fa0eeadcbf9252190a6febbe0f890f1dc7b1524
Signed-off-by: George Shen <sqiao@codeaurora.org>
2020-07-10 16:34:39 -07:00