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

Commit 88955d3b authored by Paras Nagda's avatar Paras Nagda Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: Increase minimum input buffer count for HEVC decode



Increase minimum input buffer count for HEVC decode to 5 to
avoid hang when the DPB is not full and FW keeps
waiting for FTB although sufficient ETB are being queued.

CRs-Fixed: 2252419

Change-Id: Id344cd896aeac46765e250e715d14a6c835b4221
Signed-off-by: default avatarParas Nagda <pnagda@codeaurora.org>
parent d54a5ed7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@

#define MSM_VDEC_DVC_NAME "msm_vdec_8974"
#define MIN_NUM_OUTPUT_BUFFERS 4
#define MIN_NUM_OUTPUT_BUFFERS_HEVC 5
#define MIN_NUM_CAPTURE_BUFFERS 6
#define MIN_NUM_THUMBNAIL_MODE_CAPTURE_BUFFERS 1
#define MAX_NUM_OUTPUT_BUFFERS VB2_MAX_FRAME
@@ -1471,6 +1472,12 @@ static int msm_vdec_queue_setup(struct vb2_queue *q,
		if (*num_buffers < MIN_NUM_OUTPUT_BUFFERS ||
				*num_buffers > MAX_NUM_OUTPUT_BUFFERS)
			*num_buffers = MIN_NUM_OUTPUT_BUFFERS;

		if (inst->fmts[OUTPUT_PORT].fourcc ==
				V4L2_PIX_FMT_HEVC &&
				*num_buffers < MIN_NUM_OUTPUT_BUFFERS_HEVC)
			*num_buffers = MIN_NUM_OUTPUT_BUFFERS_HEVC;

		for (i = 0; i < *num_planes; i++) {
			sizes[i] = get_frame_size(inst,
					&inst->fmts[OUTPUT_PORT], q->type, i);