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 <qiweil@codeaurora.org>
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
这个提交包含在:
Priyanka Gujjula
2021-07-01 09:34:59 +05:30
父节点 d388f8b5cd
当前提交 a3eed1e747

查看文件

@@ -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)