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

Cette révision appartient à :
qctecmdr
2021-07-01 18:02:58 -07:00
révisé par Gerrit - the friendly Code Review server
révision 5b091c785c
2 fichiers modifiés avec 15 ajouts et 5 suppressions

Voir le fichier

@@ -95,6 +95,13 @@ u64 msm_vidc_calc_freq_iris2(struct msm_vidc_inst *inst, u32 data_size)
if (fps == 480)
vpp_cycles += div_u64(vpp_cycles * 2, 100);
/*
* Add 5 percent extra for 720p@960fps use case
* to bump it to next level (366MHz).
*/
if (fps == 960)
vpp_cycles += div_u64(vpp_cycles * 5, 100);
/* VSP */
/* bitrate is based on fps, scale it using operating rate */
operating_rate = inst->capabilities->cap[OPERATING_RATE].value >> 16;
@@ -116,9 +123,9 @@ u64 msm_vidc_calc_freq_iris2(struct msm_vidc_inst *inst, u32 data_size)
} else {
base_cycles = 0;
vsp_cycles = div_u64(vsp_cycles, 2);
/* VSP FW Overhead 1.05 */
vsp_cycles = div_u64(vsp_cycles * 21, 20);
}
/* VSP FW Overhead 1.05 */
vsp_cycles = div_u64(vsp_cycles * 21, 20);
if (inst->capabilities->cap[STAGE].value == MSM_VIDC_STAGE_1)
vsp_cycles = vsp_cycles * 3;
@@ -148,9 +155,9 @@ u64 msm_vidc_calc_freq_iris2(struct msm_vidc_inst *inst, u32 data_size)
} else {
base_cycles = 0;
vsp_cycles = div_u64(vsp_cycles, 2);
/* VSP FW overhead 1.05 */
vsp_cycles = div_u64(vsp_cycles * 21, 20);
}
/* VSP FW overhead 1.05 */
vsp_cycles = div_u64(vsp_cycles * 21, 20);
if (inst->capabilities->cap[STAGE].value == MSM_VIDC_STAGE_1)
vsp_cycles = vsp_cycles * 3;

Voir le fichier

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