Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e662d20 authored by Govindaraj Rajagopal's avatar Govindaraj Rajagopal
Browse files

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: default avatarGovindaraj Rajagopal <grajagop@codeaurora.org>
parent 7e5c67e9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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);