From 2e84662f2c372b2724773332c9212470d1fa5471 Mon Sep 17 00:00:00 2001 From: Abdulla Anam Date: Wed, 14 Jun 2017 02:39:12 +0530 Subject: [PATCH] msm: vidc: Scale clocks with inst load during dcvs setup period During the dcvs initial buffering period, which can be extended in a pause resume, dcvs->load remains as the nominal load. But scale clocks is not called in this period. Also modify the switching conditions to cause dcvs->load to be updated with high freq. Change-Id: Ib9dcbb5e35ca36ae6bd29a455c1e0df73834fab0 Signed-off-by: Abdulla Anam --- drivers/media/platform/msm/vidc/msm_vidc_dcvs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/msm/vidc/msm_vidc_dcvs.c b/drivers/media/platform/msm/vidc/msm_vidc_dcvs.c index 3e269576c126..9bc313adb10a 100644 --- a/drivers/media/platform/msm/vidc/msm_vidc_dcvs.c +++ b/drivers/media/platform/msm/vidc/msm_vidc_dcvs.c @@ -407,8 +407,10 @@ static int msm_dcvs_enc_scale_clocks(struct msm_vidc_inst *inst) if (dcvs->etb_counter < total_input_buf) { dcvs->etb_counter++; - if (dcvs->etb_counter != total_input_buf) - return rc; + if (dcvs->etb_counter != total_input_buf) { + return msm_comm_scale_clocks_load(core, dcvs->load, + LOAD_CALC_NO_QUIRKS); + } } dprintk(VIDC_PROF, @@ -425,7 +427,7 @@ static int msm_dcvs_enc_scale_clocks(struct msm_vidc_inst *inst) } if (fw_pending_bufs >= DCVS_ENC_HIGH_THR && - dcvs->load <= dcvs->load_low) { + dcvs->load < dcvs->load_high) { dcvs->load = dcvs->load_high; dcvs->prev_freq_increased = true; } else {