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>
This commit is contained in:
@@ -116,7 +116,7 @@ static int cvp_wait_process_message(struct msm_cvp_inst *inst,
|
||||
|
||||
hdr = (struct cvp_hfi_msg_session_hdr *)&msg->pkt;
|
||||
memcpy(out, &msg->pkt, get_msg_size(hdr));
|
||||
if (hdr->client_data.kdata >= get_pkt_array_size())
|
||||
if (hdr->client_data.kdata >= ARRAY_SIZE(cvp_hfi_defs))
|
||||
msm_cvp_unmap_frame(inst, hdr->client_data.kdata);
|
||||
kmem_cache_free(cvp_driver->msg_cache, msg);
|
||||
|
||||
|
Reference in New Issue
Block a user