msm: vidc: Introduce ETB flag for Enc Superframe handling

Driver will internally produce subframe flag for all ETB of
a Superframe to firmware (except last ETB). Firmware will
propagate subframe flag to FBD. Driver client will receive
multiple FBDs with subframe flag for single Superframe ETB
(except last FBD). This subframe flag indicates that more
FBD expected for same input.

Change-Id: I627123ee2500dd7846363d8b819c3fa56234a494
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
This commit is contained in:
Akshata Sahukar 2020-01-29 12:04:37 -08:00 committed by Gerrit - the friendly Code Review server
parent bfdd3e8866
commit db9f5f903c

View File

@ -4367,6 +4367,7 @@ static int msm_comm_qbuf_superframe_to_hfi(struct msm_vidc_inst *inst,
frames[0].flags &= ~HAL_BUFFERFLAG_EXTRADATA;
frames[0].flags &= ~HAL_BUFFERFLAG_EOS;
frames[0].flags &= ~HAL_BUFFERFLAG_CVPMETADATA_SKIP;
frames[0].flags &= ~HAL_BUFFERFLAG_ENDOFSUBFRAME;
if (frames[0].flags)
s_vpr_e(inst->sid, "%s: invalid flags %#x\n",
__func__, frames[0].flags);
@ -4388,10 +4389,20 @@ static int msm_comm_qbuf_superframe_to_hfi(struct msm_vidc_inst *inst,
/* first frame */
if (frames[0].extradata_addr)
frames[0].flags |= HAL_BUFFERFLAG_EXTRADATA;
/* Add work incomplete flag for all etb's except the
* last one. For last frame, flag is cleared at the
* last frame iteration.
*/
frames[0].flags |= HAL_BUFFERFLAG_ENDOFSUBFRAME;
} else if (i == superframe_count - 1) {
/* last frame */
if (mbuf->vvb.flags & V4L2_BUF_FLAG_EOS)
frames[i].flags |= HAL_BUFFERFLAG_EOS;
/* Clear Subframe flag just for the last frame to
* indicate the end of SuperFrame.
*/
frames[i].flags &= ~HAL_BUFFERFLAG_ENDOFSUBFRAME;
}
num_etbs++;
}