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

Commit b09ccfeb authored by Vaibhav Deshu Venkatesh's avatar Vaibhav Deshu Venkatesh
Browse files

msm: vidc: Fix work mode settings for encoder



Currently work mode setting is erroring out for H264 and
HEVC encoder. Change the conditions for these codecs.

CRs-Fixed: 2368458
Change-Id: I8b4827b65d3fba1138fa9b153b68cd8d38fe5c5a
Signed-off-by: default avatarVaibhav Deshu Venkatesh <vdeshuve@codeaurora.org>
parent 436b3d6e
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 */

#include "msm_vidc_common.h"
@@ -1545,11 +1545,12 @@ int msm_vidc_decide_work_mode_iris2(struct msm_vidc_inst *inst)
			(inst->pic_struct != MSM_VIDC_PIC_STRUCT_PROGRESSIVE) ||
			(num_mbs < NUM_MBS_PER_FRAME(720, 1280)))
			pdata.video_work_mode = VIDC_WORK_MODE_1;
	} else if (inst->session_type == MSM_VIDC_ENCODER &&
			inst->fmts[CAPTURE_PORT].fourcc == V4L2_PIX_FMT_VP8) {
	} else if (inst->session_type == MSM_VIDC_ENCODER) {
		if (inst->fmts[CAPTURE_PORT].fourcc == V4L2_PIX_FMT_VP8) {
			pdata.video_work_mode = VIDC_WORK_MODE_1;
		/* For WORK_MODE_1, set Low Latency mode by default to HW. */
			/* For WORK_MODE_1, set Low Latency mode by default */
			inst->clk_data.low_latency_mode = true;
		}
	} else {
		return -EINVAL;
	}