msm: eva: Make synx packet config pkt

Make kernel fencing works.

Change-Id: Ib524c9ace64be89d05a516bf6ccbac64b133b219
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
This commit is contained in:
George Shen
2022-11-04 12:47:51 -07:00
parent f23fa1b288
commit e8a2fe9b88
2 changed files with 12 additions and 5 deletions

View File

@@ -577,8 +577,7 @@ static int cvp_populate_fences( struct eva_kmd_hfi_packet *in_pkt,
enum op_mode mode;
struct cvp_buf_type *buf;
int rc;
rc = 0;
int rc = 0;
q = &inst->fence_cmd_queue;
@@ -592,6 +591,9 @@ static int cvp_populate_fences( struct eva_kmd_hfi_packet *in_pkt,
goto exit;
}
if (!cvp_kernel_fence_enabled)
goto exit;
cmd_hdr = (struct cvp_hfi_cmd_session_hdr *)in_pkt;
rc = cvp_alloc_fence_data((&f), cmd_hdr->size);
if (rc)
@@ -695,7 +697,11 @@ static int cvp_enqueue_pkt(struct msm_cvp_inst* inst,
else
rc = msm_cvp_map_frame(inst, in_pkt, in_offset, in_buf_num);
if (cvp_populate_fences(in_pkt, in_offset, in_buf_num, inst) == 0) {
if (rc)
return rc;
rc = cvp_populate_fences(in_pkt, in_offset, in_buf_num, inst);
if (rc == 0) {
rc = call_hfi_op(hdev, session_send, (void*)inst->session,
in_pkt);
if (rc) {
@@ -708,7 +714,8 @@ static int cvp_enqueue_pkt(struct msm_cvp_inst* inst,
}
goto exit;
} else {
dprintk(CVP_SYNX, "Going fenced path\n");
if (rc > 0)
dprintk(CVP_SYNX, "Going fenced path\n");
goto exit;
}

View File

@@ -796,7 +796,7 @@ const struct msm_cvp_hfi_defs cvp_hfi_defs[MAX_PKT_IDX] = {
{
.size = 0xFFFFFFFF,
.type = HFI_CMD_SESSION_CVP_SYNX,
.is_config_pkt = false,
.is_config_pkt = true,
.resp = HAL_NO_RESP,
.name = "SYNX_TEST",
},