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>
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>
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>
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>
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>
Validate s->next is not NULL before dereferencing
Change-Id: I8112eb20aab939b917243e283583ab9d0884e3e8
Signed-off-by: Jingyu Su <quic_jingyus@quicinc.com>
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>
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>
Switch to upstream friendly qcom_scm_assign_mem from hyp_assign_phys.
Change-Id: I2b6f1af346166794c87a205cffddbcdfb112e16a
Signed-off-by: Jingyu Su <quic_jingyus@quicinc.com>
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>
Add back all changes made after Aug. 3rd from
Kailua to Lanai.
Change-Id: I725b77892ab24354014b3d9bbc13d14c710aff5a
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
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>
Also fix a persistbuf optimization problem that failed
multi-loop DMM test.
Change-Id: Ib197077a708dea99967f0a9f4ed1c09d12023edc
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
In case there is a live but unused DSP session.
Change-Id: I7dd0d7baeb89365a2d8ba6905ddffd1e5569c872
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
rpmsg remove call back hangs with the problem.
Change-Id: I60df9d8772f31778051a905197479aa9f9d61e9f
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
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>
After EVA SSR and shutdown DSP driver, remove all DSP sessions.
Change-Id: I23cbd2ab3d5ec8c03ec0f4059be287c28ddb0f9a
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
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>
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>
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>
Clean up DSP sessions and their opened resources.
Change-Id: Ibf1468e52c8da1ebf450c08ca2df2c57de191423
Signed-off-by: George Shen <sqiao@codeaurora.org>
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>
Avoid deadlock in DSP EVA session creation after EVA SSR.
Change-Id: I22b363883db5d3bf8e8554a3708cb549437899ba
Signed-off-by: George Shen <sqiao@codeaurora.org>
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>
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>
To ensure compliance with kernel module coding convention.
Change-Id: Ib511ea3df44d83078456d1de5e4651e31e0ff1dc
Signed-off-by: George Shen <sqiao@codeaurora.org>
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>
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>
Improve debugability and error handling in future.
Change-Id: I4f116e106f243143f4f62eb28fbf338e219018c6
Signed-off-by: George Shen <sqiao@codeaurora.org>
Needs to use correct edge for CPU to CDSP glink.
Change-Id: Ie9117453454e13830987202d3629855b3c81c811
Signed-off-by: George Shen <sqiao@codeaurora.org>
New CPU-DSP interface aims to replace reverse RPC in DSP EVA
applications.
Change-Id: I4225dfa0b1acf8015a763263520442712e571851
Signed-off-by: George Shen <sqiao@codeaurora.org>