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

Commit a02f33f3 authored by Prateek Shrivastava's avatar Prateek Shrivastava Committed by Surajit Podder
Browse files

msm: vidc: Update input extradata buffer requirement



Firmware updates input extradata buffer size upon getting
new dimensions for output buffer. Update input extradata
plane size from buffer requirement on updating output buffer
dimensions to ensure client gets the correct buffer size.

CRs-Fixed: 2135203

Change-Id: I91707153769ee4d79b8c830daa6486170f167423
Signed-off-by: default avatarPrateek Shrivastava <pshrivas@codeaurora.org>
parent f797d13b
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -2759,6 +2759,19 @@ int msm_venc_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
			inst->bufq[fmt->type].plane_sizes[i] =
				f->fmt.pix_mp.plane_fmt[i].sizeimage;
		}
		/*
		 * Input extradata buffer size may change upon updating
		 * CAPTURE plane buffer size.
		 */

		extra_idx = EXTRADATA_IDX(inst->bufq[OUTPUT_PORT].num_planes);
		if (extra_idx && extra_idx < VIDEO_MAX_PLANES) {
			buff_req_buffer = get_buff_req_buffer(inst,
					HAL_BUFFER_EXTRADATA_INPUT);
			inst->bufq[OUTPUT_PORT].plane_sizes[extra_idx] =
				buff_req_buffer ?
				buff_req_buffer->buffer_size : 0;
		}
	} else if (f->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
		struct hal_frame_size frame_sz;