video: driver: bump clockrate and bandwidth for 960FPS

increase clockrate and bandwidth by 25percent for
960fps decode session and disable dcvs.

Change-Id: I40aef0a9b8f0950b559ee301549869e20e881a40
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
This commit is contained in:
Darshana Patil
2021-09-27 15:37:59 -07:00
parent 68c66ecacf
commit 9f22d1b8bc
2 changed files with 18 additions and 0 deletions

View File

@@ -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[] = {

View File

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