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

Commit 3f653201 authored by Ashray Kulkarni's avatar Ashray Kulkarni
Browse files

msm: vidc: Fix Hier-p settings in driver



When HEVC Hier-P is enabled with 6 layers v4l2 framework reject the
setting as max value is only 3 layers. Also when LTR is configured
Hier-P is toggled this will result in resetting Hier-P layers if set,
this will erase earlier configured Hier-P settings. This change fixes
the Hier-P issues seen in driver.

Change-Id: Ie0206c725323e8fcb82937fb5885ca0c67a49b1f
Signed-off-by: default avatarAshray Kulkarni <ashrayk@codeaurora.org>
parent 0600f6c1
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1085,7 +1085,7 @@ static struct msm_vidc_ctrl msm_venc_ctrls[] = {
		.name = "Set Max Hier P num layers sessions",
		.type = V4L2_CTRL_TYPE_INTEGER,
		.minimum = 0,
		.maximum = 3,
		.maximum = 6,
		.default_value = 0,
		.step = 1,
		.qmenu = NULL,
@@ -1095,7 +1095,7 @@ static struct msm_vidc_ctrl msm_venc_ctrls[] = {
		.name = "Set Base Layer ID for Hier-P",
		.type = V4L2_CTRL_TYPE_INTEGER,
		.minimum = 0,
		.maximum = 3,
		.maximum = 6,
		.default_value = 0,
		.step = 1,
		.qmenu = NULL,
@@ -1463,8 +1463,7 @@ static int msm_venc_toggle_hier_p(struct msm_vidc_inst *inst, int layers)
		return -EINVAL;
	}

	if (inst->fmts[CAPTURE_PORT]->fourcc != V4L2_PIX_FMT_VP8 &&
		inst->fmts[CAPTURE_PORT]->fourcc != V4L2_PIX_FMT_H264)
	if (inst->fmts[CAPTURE_PORT]->fourcc != V4L2_PIX_FMT_VP8)
		return 0;

	num_enh_layers = layers ? : 0;