Commit Graph

19 Commits

Author SHA1 Message Date
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