msm: vidc: handle qbuf failure in batch_handler

if msm_comm_qbuf_to_hfi is failed at msm_vidc_batch_handler
path, then vb2_buffer refcount is still held at v4l2 layer.
So added error handling for qbuf failure at batch timeout 
sequence.

Change-Id: I61b14210ae382944e456df5c11790dc115ab2a15
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
This commit is contained in:
Govindaraj Rajagopal 2020-11-13 12:07:17 +05:30
parent 7e5c67e9b0
commit 1e662d20c0

View File

@ -4482,6 +4482,7 @@ static int msm_comm_qbuf_to_hfi(struct msm_vidc_inst *inst,
rc = -EINVAL;
}
if (rc) {
mbuf->flags |= MSM_VIDC_FLAG_DEFERRED;
s_vpr_e(inst->sid, "%s: Failed to qbuf: %d\n", __func__, rc);
goto err_bad_input;
}
@ -4517,8 +4518,10 @@ void msm_vidc_batch_handler(struct work_struct *work)
__func__);
rc = msm_comm_qbufs_batch(inst, NULL);
if (rc)
if (rc) {
s_vpr_e(inst->sid, "%s: batch qbufs failed\n", __func__);
msm_vidc_queue_v4l2_event(inst, V4L2_EVENT_MSM_VIDC_SYS_ERROR);
}
exit:
put_inst(inst);