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

Commit 8ee42ce8 authored by Vikash Garodia's avatar Vikash Garodia
Browse files

msm: vidc: Initialize the dcvs load during perf mode switch



Incase V4L2 client sets the perf mode to TURBO, DCVS
is turned off. Now when the client sets the perf mode
back to nominal, venus clock and load is changed but
dcvs parameters are not updated to reflect the driver
current state interms of venus load. Initialize the
dcvs parameters to update itself as per the ongoing
venus load.

Change-Id: I8f35cdd154fbde49c95cdd0e5f7df4b9e4f897a5
Signed-off-by: default avatarVikash Garodia <vgarodia@codeaurora.org>
parent 22194df2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3005,7 +3005,10 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
	case V4L2_CID_MPEG_VIDC_SET_PERF_LEVEL:
		switch (ctrl->val) {
		case V4L2_CID_MPEG_VIDC_PERF_LEVEL_NOMINAL:
			if (inst->flags & VIDC_TURBO) {
				inst->flags &= ~VIDC_TURBO;
				msm_dcvs_init_load(inst);
			}
			break;
		case V4L2_CID_MPEG_VIDC_PERF_LEVEL_TURBO:
			inst->flags |= VIDC_TURBO;
@@ -3016,7 +3019,6 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
			rc = -ENOTSUPP;
			break;
		}

		msm_comm_scale_clocks_and_bus(inst);
		break;
	case V4L2_CID_MPEG_VIDC_VIDEO_H264_VUI_BITSTREAM_RESTRICT: