Skip to content

Commit 1444232

Browse files
Mansur Alisha Shaikmchehab
authored andcommitted
media: venus: fix vpp frequency calculation for decoder
In existing video driver implementation vpp frequency calculation in calculate_inst_freq() is always zero because the value of vpp_freq_per_mb is always zero for decoder. Fixed this by correcting the calculating the vpp frequency calculation for decoder. Fixes: 3cfe581 ("media: venus: Enable low power setting for encoder") Signed-off-by: Mansur Alisha Shaik <[email protected]> Signed-off-by: Stanimir Varbanov <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 8c404eb commit 1444232

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/media/platform/qcom/venus/pm_helpers.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,12 +1085,16 @@ static unsigned long calculate_inst_freq(struct venus_inst *inst,
10851085
if (inst->state != INST_START)
10861086
return 0;
10871087

1088-
if (inst->session_type == VIDC_SESSION_TYPE_ENC)
1088+
if (inst->session_type == VIDC_SESSION_TYPE_ENC) {
10891089
vpp_freq_per_mb = inst->flags & VENUS_LOW_POWER ?
10901090
inst->clk_data.low_power_freq :
10911091
inst->clk_data.vpp_freq;
10921092

1093-
vpp_freq = mbs_per_sec * vpp_freq_per_mb;
1093+
vpp_freq = mbs_per_sec * vpp_freq_per_mb;
1094+
} else {
1095+
vpp_freq = mbs_per_sec * inst->clk_data.vpp_freq;
1096+
}
1097+
10941098
/* 21 / 20 is overhead factor */
10951099
vpp_freq += vpp_freq / 20;
10961100
vsp_freq = mbs_per_sec * inst->clk_data.vsp_freq;

0 commit comments

Comments
 (0)