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

Commit eb19e74f authored by Govindaraj Rajagopal's avatar Govindaraj Rajagopal
Browse files

msm: vidc: handle qbuf failure in decode batching usecase



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 decode_batching
sequence.

Change-Id: Ic900ff95faec075620323c989430dea7ce34f26b
Signed-off-by: default avatarGovindaraj Rajagopal <grajagop@codeaurora.org>
parent a69feaa5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -4765,6 +4765,7 @@ int msm_comm_qbufs_batch(struct msm_vidc_inst *inst,
{
	int rc = 0;
	struct msm_vidc_buffer *buf;
	struct vb2_buffer *vb2;
	int do_bw_calc = 0;

	do_bw_calc = mbuf ? mbuf->vvb.vb2_buf.type == INPUT_MPLANE : 0;
@@ -4789,6 +4790,11 @@ int msm_comm_qbufs_batch(struct msm_vidc_inst *inst,
		if (rc) {
			s_vpr_e(inst->sid, "%s: Failed batch qbuf to hfi: %d\n",
				__func__, rc);
			if (buf != mbuf) {
				vb2 = &buf->vvb.vb2_buf;
				vb2_buffer_done(vb2, VB2_BUF_STATE_DONE);
				msm_vidc_queue_v4l2_event(inst, V4L2_EVENT_MSM_VIDC_SYS_ERROR);
			}
			break;
		}
loop_end: