Gráfico de commits

30 Commits

Autor SHA1 Mensaje Fecha
George Shen
04232ceea4 msm: eva: Fix fd reuse problem.
Fix KW issue and fd reuse issue in persistent buffer mapping.

Change-Id: I9d971abe14460ac57d9f48ee086f97abec1b6f2b
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-07-26 13:55:56 -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
e92994b6b9 msm: eva: Avoid caching persist buf mapping
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>
2022-07-06 12:51:32 -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
6492155ccc msm: eva: Add LE support
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>
2022-03-25 11:03:52 -07:00
George Shen
0c7f40b323 msm: eva: Validate WNCC table pointer before use
Reliably handle Kernel memory allocation failure.

Change-Id: I27fac01bf5ec45cc8d54757e245ef799f5459d1f
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-03-23 17:12:32 -07:00
Sabharsh Sidhu
01c34574ca msm: eva: Add WarpNCC CPU support
Adds Out-of-Band (OOB) functionality. Adds
WarpNCC OOB processing for metadata buffer
IOVA population. Adds WarpNCC source buffer
registration that does IOVA book-keeping and
returns buffer ID to UMD.

Change-Id: I182c270454eec194f28a31c494bae0ad9eface02
Signed-off-by: Sabharsh Sidhu <quic_ssidhu@quicinc.com>
2022-02-01 14:13:13 -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
0e72292d71 msm: eva: Avoid dereference NULL smem
Check and return error in case of NULL smem.

Change-Id: I0f1f6a0746fe2110e0f5f306c22133caba6f2d63
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-09-20 16:18:54 -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
e230150be8 msm: eva: Check files pointer before accessing it
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>
2021-09-09 11:12:26 -07:00
George Shen
72eb20af3d msm: eva: Add SSR counter
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>
2021-08-13 13:43:45 -07:00
Chris Goldsworthy
30223d90a7 msm: eva: Fix DMA-BUF double free
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>
2021-07-30 10:22:54 -07:00
George Shen
966d521450 msm: eva: Remove warning during buf unmapping
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>
2021-07-09 14:26:17 -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
ef51f21606 msm: eva: avoid cache entry for unwanted buffer
Error handle to avoid dereferencing of unwanted buffer during deinit

Change-Id: I4d051f81f86582a16c639e33429d9c1ed893f5e5
Signed-off-by: Yu SI <ysi@codeaurora.org>
2021-04-22 10:50:22 -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
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
8f044d707a msm: eva: Deprecate dma_buf_get_flags()
Migrate to new kernel API to retrieve buffer attributes.

Change-Id: I1163c975b8e7f666694394be90f2999eabba1e23
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-02-18 22:28:12 -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
d356d6fe7a msm: eva: Enable secure ARP
Allocate secure buffer in kernel.

Change-Id: I9f4411b45fe6cd2795da78ce2aee08ab1ea92973
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-01-28 15:54:27 -08:00
Yu SI
38aededca5 msm: eva: temp workaround to pass pid compilation
commented pid to pass compilation due to missing symbol in whitelist

Change-Id: I9607d649d7f6f1ae1eab01ec80cb9b020b4b2697
Signed-off-by: Yu SI <ysi@codeaurora.org>
2021-01-21 11:11:48 -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
f998ae1909 msm: eva: make ARP buffer non-secure temporarily
Will remap to secure CB after hyp_assign becomes available.

Change-Id: I17a2e00a8e6ea6a45754c69db8638370da035f28
Signed-off-by: George Shen <sqiao@codeaurora.org>
2020-12-15 15:04:08 -08:00
George Shen
928365194b msm: eva: Initial migration to new dma-buf API
Per Waipio requirement.

Change-Id: Ic501909c93e9c12cb873458f47f7f86e598f16b0
Signed-off-by: George Shen <sqiao@codeaurora.org>
2020-10-21 14:19:00 -07:00
Yu SI
5f1c0b90c3 msm: eva: rename cvp to eva for private h and such
renamed cvp to eva for msm_eva_private.h and
other source and header depending on this file

Change-Id: I987cfedca62c82e5e26af230b4f36c84f1318a95
Signed-off-by: Yu SI <ysi@codeaurora.org>
2020-09-25 18:39:18 -07:00
George Shen
16527cad45 msm: eva: Merge Lahaina changes
changes from gerrits: 3302597 3292606 3313485 3315054 3303642

Change-Id: I7d481ced38963396255435ddb968017f79bfbe12
Signed-off-by: George Shen <sqiao@codeaurora.org>
2020-09-02 22:49:52 -07: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