Commit Graph

44 Commitit

Tekijä SHA1 Viesti Päivämäärä
George Shen
73f3cecfbd msm: eva: Support Synx V2 only
Simplify code base for future generations of driver.

Change-Id: I9ed940184da3b2224c74092ac31163de29c84f64
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-05-02 10:06:41 -07:00
Naveen Ravi
ab30e5fc6f msm: eva: fence override mode
Change-Id: I0cd8b3dc234168f365d8664f3a4d0c09094a1da1
2023-04-11 15:13:48 -07:00
George Shen
84334be2a1 msm: eva: Define kernel timeout in one place
Easy to maintain.

Change-Id: Iacf8ae5481c08d69259f41db26ac6ac2216a54f6
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-03-27 23:30:30 -07:00
Sabharsh Sidhu
db7c8ad719 msm: eva: Add CVP_CMD debug logging
Add cmd logging functionality as an
alternative to pkt logging. This has
advantages related to log dropping
and log mangling.

Change-Id: I0ff6801445821e1224f83fa7e2eb8bf8a849962b
2023-03-17 15:17:23 -07:00
George Shen
e9bc85d930 msm: eva: Return correct fence number
In case of the fence command setup thread being pre-empted,
the fence command can be processed by HW even before the setup
thread returns. In that case, the setup thread may be using
wrong fence number, causing it resends the HFI packet that has
been processed. The consequence could be SMMU fault.

Change-Id: I8be9808e993a27a1c7664e68a5382d145a8bc3cc
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-03-16 17:10:19 -07:00
Nagesh Gunna
79c9987bbe eva-kernel: hfi q info at session timeout
Printing hfi q info at the of
           session queue time out to get debug
           info on missed cmd/frame pkt.

Change-Id: I9b324a6496699272f9f1b9cb794f3e322d5421ae
Signed-off-by: Nagesh Gunna <quic_ngunna@quicinc.com>
2023-03-15 19:10:24 +05:30
Sabharsh Sidhu
6aabaf3247 msm: eva: Improve error handling for pkt enqueuing
Report error code for pkt enqueue failure - critical
for reporting rejected frames in flush scenarios.
Improve logging for unprocessed frames.

Change-Id: Ic5d04a56122b0bbf94f69117ee0fde9f5993e275
Signed-off-by: Sabharsh Sidhu <quic_ssidhu@quicinc.com>
2023-03-03 11:03:41 -08:00
George Shen
9de86afd60 msm: eva: fix a missing frame issue during flush
Racing happens when a new fence command submitted and flushing
is requested from a different thread.

Change-Id: I2d4f1e02c245f9a4a7eeb2e541ddb0e99b63b461
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-02-28 15:28:59 -08: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
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
991c1ebc43 msm: eva: handle SoC fencing returning MSG
Needs to unmap frame buffer and avoid enqueue the MSG
in session queue. In SoC fencing cases, session queue
will not be drained by UMD. It can lead to session
stop error.

Change-Id: I980689ae16286712df704f94385ca0ccfc64488a
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-12-01 22:16:58 -08:00
George Shen
c7a2d986df msm: eva: Fix dprintk compilation errors
Shown in recent Lanai releases

Change-Id: Ia85a57756a35f14d4426ea5ea10cd5374188a9d4
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-11-07 09:57:57 -08:00
George Shen
e8a2fe9b88 msm: eva: Make synx packet config pkt
Make kernel fencing works.

Change-Id: Ib524c9ace64be89d05a516bf6ccbac64b133b219
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-11-04 12:47:51 -07: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
Yu SI
7597271dde msm: eva: synx v2 support
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>
2022-10-10 18:20:57 -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
dcbb74265f msm: eva: Add Lanai EVA HFI check
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>
2022-07-29 11:02:27 -07:00
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
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
7cc6e333d2 msm: eva: Use rate limited printk API
Avoid potential system level RT throttling issue.

Change-Id: I0fbe198957ef9e5c21435fef2c6e8b6df551da5b
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-03-18 15:26:02 -07:00
George Shen
8205a08975 msm: eva: Support synx version update
The change makes it easier for eva driver to support backward
and forwardcompatibility of SynX versions.

Change-Id: I6382d5c904d30bd38692ce74e747749e113be621
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2022-03-14 14:36:31 -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
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
Ronald Karyodisa
27132cb626 msm: cvp: Fix dynamic clock voting
Prevent dcvs voting below the current aggregated clock.

Change-Id: Ie3ea259521a7b241cdef40a049563f054b089687
Signed-off-by: Ronald Karyodisa <ronaldk@codeaurora.org>
2021-08-20 11:35:03 -07:00
Ronald Karyodisa
d49b4e5574 msm: eva: Add FD type check for DCVS
Add FD packet check and add log to catch the
unexpected FD packet size.

Change-Id: I794d659a2e33e5efc521d31476c6923ca5462554
Signed-off-by: Ronald Karyodisa <ronaldk@codeaurora.org>
2021-08-18 17:23:27 -07:00
George Shen
022b7d2d1b msm: eva: Avoid printing unnecessary warnings
When handling HFI response of config packets.

Change-Id: I16e373d07c1cc7617624160921bcca972381277b
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-06-24 17:11:27 -07:00
Yu SI
99ad8575b2 msm: eva: adjust log level for non-fatal msg
change msg trace level to CVP_INFO
for cvp_wait_process_msg non-fatal.

Change-Id: If2e245f894d3076ed129f322e477ad5b1beead32
Signed-off-by: Yu SI <ysi@codeaurora.org>
2021-06-23 13:18:55 -07:00
Karthik Nagarajan
322bbdeaa3 msm: eva: Enable hangdump mode in EVA
Include new hfi packets and enable the pipeline to
dump hangdump buffers in UMD.

Change-Id: Id66538c69d3080c09c5a140dadcb0dfe87d9efc7
Signed-off-by: Karthik Nagarajan <karnagar@codeaurora.org>
2021-06-04 12:15:07 -07:00
George Shen
11a18d4d23 msm: cvp: Reduce kmd's feature dependency
Move feature configuration processing out of kmd. Relocate
feature specific code to msm_cvp_platform.c and cvp_hfi.h.

Change-Id: I425ee8b8638bd7b81c653c860f1ed1f5d95abac8
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-06-02 10:49:25 -07:00
Ronald Karyodisa
fe9fae2af4 msm: eva: Add debug option to disable DCVS
Add debug option using debugfs to disable DCVS.
Add extra check for DCVS.

Change-Id: I989ef72857dde306fa0ca9466843ebc1d2b30f85
Signed-off-by: Ronald Karyodisa <ronaldk@codeaurora.org>
2021-05-06 10:47:51 -07:00
Ronald Karyodisa
68b7c2cfa3 msm: eva: Fix sum fps aggregation setting
Initialize the sum fps calculation to avoid the
value keep increasing.
Add addional option (fps=0) to disable FD dcvs.
Fix HFI header size checking.

Change-Id: Ieb44b626a112205091327c7785a8c92c8c77c0b0
Signed-off-by: Ronald Karyodisa <ronaldk@codeaurora.org>
2021-04-30 14:54:17 -07:00
Karthik Nagarajan
64eb1ea98d msm: eva: Enable query of eva workload
Enable logic to provide current eva workload.
Workload estimated across sessions at hardware block level.

Change-Id: If8729f4ecd31b05a9b232475de9c7722845b37db
Signed-off-by: Karthik Nagarajan <karnagar@codeaurora.org>
2021-04-12 08:46:56 -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
d83b8480a6 msm: eva: Support session creation via device node
Support creating eva session via device node "boot".
It helps pre-silicon and kbdev based EVA bring up test.

Change-Id: I66f4ccf730817afd8f00f8ffeb286c7d89a69a65
Signed-off-by: George Shen <sqiao@codeaurora.org>
2021-01-28 10:42:21 -08:00
Yu SI
085cc3a1a8 msm: eva: feature related Waipio eva driver change
Feature related Waipio_EVA_driver_code changes

Change-Id: I49955d8b33d8c2e668555ac2a1795ea8d5710442
Signed-off-by: Yu SI <ysi@codeaurora.org>
2021-01-13 11:39:44 -08: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
c5c6c1545c msm: eva: Build EVA driver in eCRM
Enabling EVA build in CRM environment. The setup can be used
to sanity check future changes.

Change-Id: If18abf7212c768c07e550678109d90d0c8519478
Signed-off-by: George Shen <sqiao@codeaurora.org>
2020-07-22 20:43:09 -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