OSDN Git Service

msm: vidc: Scale clocks with inst load during dcvs setup period
authorAbdulla Anam <abdullahanam@codeaurora.org>
Tue, 13 Jun 2017 21:09:12 +0000 (02:39 +0530)
committerAbdulla Anam <abdullahanam@codeaurora.org>
Wed, 14 Jun 2017 09:16:04 +0000 (14:46 +0530)
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 <abdullahanam@codeaurora.org>
drivers/media/platform/msm/vidc/msm_vidc_dcvs.c

index 3e26957..9bc313a 100644 (file)
@@ -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 {