diff --git a/driver/variant/iris2/src/msm_vidc_power_iris2.c b/driver/variant/iris2/src/msm_vidc_power_iris2.c index 4db925eaf4..2d1a60348a 100644 --- a/driver/variant/iris2/src/msm_vidc_power_iris2.c +++ b/driver/variant/iris2/src/msm_vidc_power_iris2.c @@ -165,6 +165,10 @@ u64 msm_vidc_calc_freq_iris2(struct msm_vidc_inst *inst, u32 data_size) vsp_cycles += mbs_per_second * base_cycles; + /* Add 25 percent extra for 960fps use case */ + if (fps >= MAXIMUM_FPS) + vsp_cycles += div_u64(vpp_cycles * 25, 100); + if (inst->codec == MSM_VIDC_VP9 && inst->capabilities->cap[STAGE].value == MSM_VIDC_STAGE_2 && @@ -367,6 +371,12 @@ static u64 __calculate_decoder(struct vidc_bus_vote_data *d) llc.total = llc.dpb_read + llc.line_buffer_read + llc.line_buffer_write + ddr.total; + /* Add 25 percent extra for 960fps use case */ + if (fps >= MAXIMUM_FPS) { + ddr.total += div_u64(ddr.total * 25, 100); + llc.total += div_u64(llc.total * 25, 100); + } + /* Dump all the variables for easier debugging */ if (msm_vidc_debug & VIDC_BUS) { struct dump dump[] = { diff --git a/driver/vidc/src/msm_vidc_driver.c b/driver/vidc/src/msm_vidc_driver.c index b937bb8917..a7b9f22871 100644 --- a/driver/vidc/src/msm_vidc_driver.c +++ b/driver/vidc/src/msm_vidc_driver.c @@ -2629,6 +2629,7 @@ void msm_vidc_allow_dcvs(struct msm_vidc_inst *inst) { bool allow = false; struct msm_vidc_core *core; + u32 fps; if (!inst || !inst->core) { d_vpr_e("%s: Invalid args: %pK\n", __func__, inst); @@ -2684,6 +2685,13 @@ void msm_vidc_allow_dcvs(struct msm_vidc_inst *inst) goto exit; } + fps = msm_vidc_get_fps(inst); + if (is_decode_session(inst) && fps >= MAXIMUM_FPS) { + allow = false; + i_vpr_h(inst, "%s: unsupported fps %d\n", __func__, fps); + goto exit; + } + exit: i_vpr_hp(inst, "%s: dcvs: %s\n", __func__, allow ? "enabled" : "disabled");