Bläddra i källkod

msm: vidc: fix BW overvote due to wrong worst_cf in fbd

For worst complexity factor received in fbd, also need
to divide it by frame_size, otherwise will cause
bus BW overvote.

Change-Id: Ibb20103c4ab8e3830eea8cf8a04b32f421b60362
Signed-off-by: Qiwei Liu <[email protected]>
Signed-off-by: Priyanka Gujjula <[email protected]>
Priyanka Gujjula 4 år sedan
förälder
incheckning
a3eed1e747
1 ändrade filer med 4 tillägg och 1 borttagningar
  1. 4 1
      driver/vidc/src/msm_vidc_power.c

+ 4 - 1
driver/vidc/src/msm_vidc_power.c

@@ -84,13 +84,16 @@ static int fill_dynamic_stats(struct msm_vidc_inst *inst,
 	u32 cf = MSM_VIDC_MAX_UBWC_COMPLEXITY_FACTOR;
 	u32 cr = MSM_VIDC_MIN_UBWC_COMPRESSION_RATIO;
 	u32 input_cr = MSM_VIDC_MIN_UBWC_COMPRESSION_RATIO;
+	u32 frame_size;
 
 	if (inst->power.fw_cr)
 		cr = inst->power.fw_cr;
 
 	if (inst->power.fw_cf) {
 		cf = inst->power.fw_cf;
-		cf = cf / ((msm_vidc_get_mbs_per_frame(inst)) / (32 * 8) * 3) / 2;
+		frame_size = (msm_vidc_get_mbs_per_frame(inst) / (32 * 8) * 3) / 2;
+		if (frame_size)
+			cf = cf / frame_size;
 	}
 
 	list_for_each_entry_safe(temp, next, &inst->enc_input_crs, list)