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

Commit 0e4f1608 authored by Bo Fang's avatar Bo Fang Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: fix dec out buf count update logic for batching mode



When update video decoder output buffer count, only considering
inst->decode_batching is not enough, should use is_batching_allowed
function to judge.

This patch will decrease output buffer count for some streams,
because is_batching_allowed() function has more restriction to
enable batching mode, while batching mode need additional output
buffer.

Change-Id: I24c9883c9f5a9e3ec9857ba9e0b4468e425b7e77
Signed-off-by: default avatarBo Fang <bofang1@codeaurora.org>
parent b8082500
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1206,7 +1206,7 @@ int msm_vidc_get_extra_buff_count(struct msm_vidc_inst *inst,
	 * batch size count of extra buffers added on output port
	 */
	if (is_output_buffer(inst, buffer_type)) {
		if (inst->decode_batching && is_decode_session(inst) &&
		if (is_batching_allowed(inst) &&
			count < inst->batch.size)
			count = inst->batch.size;
	}
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -3196,7 +3196,7 @@ static int msm_comm_init_buffer_count(struct msm_vidc_inst *inst)
				HAL_BUFFER_INPUT);
	bufreq->buffer_count_min = inst->fmts[port].input_min_count;
	/* batching needs minimum batch size count of input buffers */
	if (inst->decode_batching && is_decode_session(inst) &&
	if (is_batching_allowed(inst) &&
		bufreq->buffer_count_min < inst->batch.size)
		bufreq->buffer_count_min = inst->batch.size;
	bufreq->buffer_count_min_host = bufreq->buffer_count_actual =