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>
That breaks kernel compilation due to PW setting override.
Change-Id: I9b15fe2676a9f2350684066363c4915fa3203016
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
Through POLL SSR event, only notify the error session. Other
sessions will not be impacted. This is different than SSR
handling.
Change-Id: I5acb4e21c19909b16350816621ae085d54fe05ac
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
Fix the racing in buf-unmap between session close and frame
processing in fence path.
Change-Id: Ia7e7ac6549a856b97c583c00f526a81c575a3cb2
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
Drop dma_buf name from debugging property of smem. fd can provide
similar debug value for EVA clients.
Change-Id: I8a6ccf394f274e990efa6e3eef33e1fd84b362df
Signed-off-by: George Shen <quic_sqiao@quicinc.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>
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>
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>
Add cmd logging functionality as an
alternative to pkt logging. This has
advantages related to log dropping
and log mangling.
Change-Id: I0ff6801445821e1224f83fa7e2eb8bf8a849962b
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>
Non-secure ARP and CRC in BUFFER_TYPE, enabling IFPC.
Change-Id: I551e29e7770cdfd83b0ed9f7f925fb8bd6e6a4a6
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
Set 0 as IOVA and SIZE of the invalid buffer entry in HFI
packet.
Change-Id: I1ea90d2188a0dd6047fd24a44e16b9a40fc4d8dc
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
propagated sync v2 support from 2.0
reference 4162025
Change-Id: I3427657e21e7eda92088d828203a330ba3c86335
Signed-off-by: Yu SI <quic_ysi@quicinc.com>
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>
Adds XRA, DLFL, DLFD, RGE and ITOF packets sanity check.
Optimizes packet type table to avoid linear search during
each packet handling. Instead use packet type as index to expedite
searching. Packet type table grows to over 60 entries and each
entry uses 40B. There will be quite some memory access delay for
each packet handling without optimization.
Change-Id: I1ee26d0d5d0b83d3c15fbcafa7414017c418b6e3
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>
Remove unused user persist buffer unmap code as the HFI of
UNMAP_USER_PERSIST is not supported.
Change-Id: If8ca0c24318adb1d33ab525ac0023bc5f8ae4573
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>
Define CONFIG_EVA_LE compiler flag.
Add separate VM support module.
Define stub functions to initialize synx function table in case
SYNX is disabled.
Change-Id: I0f6b28cbd2a43cbb7f464629a329581a73c4de89
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>
There is a chance user process crashed when EVA is being used.
In that case, files pointer is set to NULL by kernel. Add
support of global timestamp support. Check wfi after pc ready.
Change-Id: Id01d07a79beec03e48885dd051549b5c39bc4846
Signed-off-by: George Shen <sqiao@codeaurora.org>
Support configurable number of SSR tolerance before calling
BUG_ON in SMMU fault scenario.
Change-Id: I19dabbeaa1cf5be86f42a6ace62ef5da12743e79
Signed-off-by: George Shen <sqiao@codeaurora.org>
msm_cvp_smem_put_dma_buf() releases the EVA driver's reference it uses
for DMA mappings, by decrementing the refcount of the underlying
struct file that all DMA-BUFs use for life cycle tracking. By
accident, the EVA driver held a direct reference to the underlying
file using the struct msm_cvp_smem->file variable. The EVA driver,
after releasing it's reference to the DMA-BUF, inadvertently called
fput() on the struct_cvp_smem->file variable, which leads to a double
free.
Resolve this by removing the struct msm_cvp_smmem->file variable, and
by removing the corresponding fput().
Change-Id: I108cd87509673008ff55fc94fda76aa21f21bd5d
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
Persistent buffer unmap is different than frame buffer. It's
expected to be released at the end of session instead of at
frame boundary. Remove the warning of "unexpected unmapping".
Change-Id: I24bfae0b67b1a8989e6a710556d94c8bc4e90aff
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>
Error handle to avoid dereferencing of unwanted buffer during deinit
Change-Id: I4d051f81f86582a16c639e33429d9c1ed893f5e5
Signed-off-by: Yu SI <ysi@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>
Migrate to new kernel API to retrieve buffer attributes.
Change-Id: I1163c975b8e7f666694394be90f2999eabba1e23
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>
commented pid to pass compilation due to missing symbol in whitelist
Change-Id: I9607d649d7f6f1ae1eab01ec80cb9b020b4b2697
Signed-off-by: Yu SI <ysi@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>