summaryrefslogtreecommitdiff
path: root/drivers/media/platform/qcom/venus/pm_helpers.c
diff options
context:
space:
mode:
authorMansur Alisha Shaik <mansur@codeaurora.org>2020-11-02 13:31:37 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-11-17 08:54:07 +0300
commitb57cf6a0a8894d5e89848e15e8f5e4cf36124aeb (patch)
tree49b30a7849e83b09827130967ab6e24e674f20dc /drivers/media/platform/qcom/venus/pm_helpers.c
parenteff5ce02e170125936c43ca96c7dc701a86681ed (diff)
downloadlinux-b57cf6a0a8894d5e89848e15e8f5e4cf36124aeb.tar.xz
media: venus: fix calculating mbps in calculate_inst_freq()
Currently in calculate_inst_freq(), video driver is calculating macro blocks per frame instead of macro blocks per second(mpbs). Which results frequency is always setting to lower frequency (150MHz) as per frequency table for sc7180. Hence the playback is not smooth. Corrected this by correcting the mbps calculation in calculate_inst_freq(). Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/qcom/venus/pm_helpers.c')
-rw-r--r--drivers/media/platform/qcom/venus/pm_helpers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c
index 0ebba8e3bd75..12784e9b1d66 100644
--- a/drivers/media/platform/qcom/venus/pm_helpers.c
+++ b/drivers/media/platform/qcom/venus/pm_helpers.c
@@ -938,7 +938,7 @@ static unsigned long calculate_inst_freq(struct venus_inst *inst,
u32 fps = (u32)inst->fps;
u32 mbs_per_sec;
- mbs_per_sec = load_per_instance(inst) / fps;
+ mbs_per_sec = load_per_instance(inst);
vpp_freq = mbs_per_sec * inst->clk_data.codec_freq_data->vpp_freq;
/* 21 / 20 is overhead factor */