From 88917ede9e13bb470d15d52c7de55d3e287be3e0 Mon Sep 17 00:00:00 2001 From: Vikash Garodia Date: Wed, 17 Aug 2016 20:23:12 +0530 Subject: [PATCH] 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: Vikash Garodia --- drivers/media/platform/msm/vidc/msm_venc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/msm/vidc/msm_venc.c b/drivers/media/platform/msm/vidc/msm_venc.c index f071aae3ccab..0931242a5ec4 100644 --- a/drivers/media/platform/msm/vidc/msm_venc.c +++ b/drivers/media/platform/msm/vidc/msm_venc.c @@ -2940,7 +2940,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: - inst->flags &= ~VIDC_TURBO; + 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;