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

Commit 52519965 authored by Arun Menon's avatar Arun Menon
Browse files

msm: vidc: Translate v4l2 perf modes to hal perf values



V4L2 perf mode values were not mapped correctly to hal
perf values. So video perf mode control setting from video
driver client would always fail. This patch ensures the
mapping is done correctly.

Change-Id: I52144792e8c06e30727c6b211edfec3243715d61
Signed-off-by: default avatarArun Menon <avmenon@codeaurora.org>
parent d4bc64ea
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2713,14 +2713,15 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
		break;
	case V4L2_CID_MPEG_VIDC_VIDEO_PERF_MODE:
		property_id = HAL_CONFIG_VENC_PERF_MODE;
		venc_mode = ctrl->val;
		pdata = &venc_mode;

		switch (ctrl->val) {
		case V4L2_MPEG_VIDC_VIDEO_PERF_POWER_SAVE:
			inst->flags |= VIDC_LOW_POWER;
			venc_mode = HAL_PERF_MODE_POWER_SAVE;
			break;
		case V4L2_MPEG_VIDC_VIDEO_PERF_MAX_QUALITY:
			inst->flags &= ~VIDC_LOW_POWER;
			venc_mode = HAL_PERF_MODE_POWER_MAX_QUALITY;
			break;
		default:
			dprintk(VIDC_ERR, "Power save mode %x not supported\n",
@@ -2729,6 +2730,7 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
			property_id = 0;
			break;
		}
		pdata = &venc_mode;

		msm_dcvs_enc_set_power_save_mode(inst,
			ctrl->val == V4L2_MPEG_VIDC_VIDEO_PERF_POWER_SAVE);