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

Commit 651b3f8e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Support low latency for decode"

parents 7d486dea c1cffa88
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -373,6 +373,15 @@ static struct msm_vidc_ctrl msm_vdec_ctrls[] = {
		.default_value = 0,
		.step = OPERATING_FRAME_RATE_STEP,
	},
	{
		.id = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_MODE,
		.name = "Low Latency Mode",
		.type = V4L2_CTRL_TYPE_BOOLEAN,
		.minimum = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_DISABLE,
		.maximum = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_ENABLE,
		.default_value = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_DISABLE,
		.step = 1,
	},
};

#define NUM_CTRLS ARRAY_SIZE(msm_vdec_ctrls)
@@ -1062,6 +1071,14 @@ int msm_vdec_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
				ctrl->val >> 16);
		inst->clk_data.operating_rate = ctrl->val;
		break;
	case V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_MODE:
		if (ctrl->val ==
			V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_ENABLE)
			hal_property.enable = 1;
		else
			hal_property.enable = 0;
		inst->clk_data.low_latency_mode = (bool) hal_property.enable;
		break;
	default:
		break;
	}