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

Commit aeba8e72 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "vidc_3x: Fix HFR recording issue"

parents 7fe2c562 ca83771c
Loading
Loading
Loading
Loading
+6 −13
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
@@ -3640,18 +3640,11 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
		}
		break;
	case V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE:
		if ((ctrl->val >> 16) < inst->capability.frame_rate.min ||
			 (ctrl->val >> 16) > inst->capability.frame_rate.max) {
			dprintk(VIDC_ERR, "Invalid operating rate %u\n",
				(ctrl->val >> 16));
			rc = -ENOTSUPP;
		} else {
		dprintk(VIDC_DBG,
			"inst(%pK) operating rate changed from %d to %d\n",
			inst, inst->prop.operating_rate >> 16,
				ctrl->val >> 16);
		inst->prop.operating_rate = ctrl->val;
		}
		break;
	case V4L2_CID_MPEG_VIDC_VIDEO_VENC_BITRATE_TYPE:
	{
+5 −1
Original line number Diff line number Diff line
@@ -657,6 +657,7 @@ int qbuf_cache_operations(struct msm_vidc_inst *inst,
	enum smem_cache_ops cache_op;
	bool skip;
	int i = 0, rc = 0;
	unsigned int rate;

	skip = true;

@@ -679,7 +680,10 @@ int qbuf_cache_operations(struct msm_vidc_inst *inst,
				}
			}
		} else if (inst->session_type == MSM_VIDC_ENCODER) {
			if (binfo->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {

			rate = inst->prop.operating_rate >> 16;
			if (binfo->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE &&
				rate == 0) {
				if (!i) { /* yuv */
					skip = false;
					offset = binfo->buff_off[i];