venus: fix calculating mbps in calculate_inst_freq()
Subsystems (4)
PATCH RESEND 1/1 venus: fix calculating mbps in calculate_inst_freq()
Currently in calculate_inst_freq(), video driver is calculating macro blocks per frame in stead of macro blocks per second(mpbs). Which results frequency is always setting to lower frequency (150MB) as per frequency table for sc7180. Hence the playback is not smooth.
Corrected this by correcting the mbps calculation in calculate_inst_freq().
--- drivers/media/platform/qcom/venus/pm_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/qcom/venus/pm_helpers.c +1 -1
@@ -928,7 +928,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 */
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Hi Mansur,
Quoted 2 lines · Mansur Alisha Shaik
Currently in
calculate_inst_freq(), video driver is calculating macro blocks per frame in stead of macro blocks per second(mpbs).
instead
Quoted 2 lines
Which results frequency is always setting to lower frequency (150MB) as per frequency table for sc7180. Hence the playback is not smooth.
150MHz
Quoted 14 lines
Corrected this by correcting the mbps calculation in
calculate_inst_freq().Signed-off-by Mansur Alisha Shaik <[email protected]>--- drivers/media/platform/qcom/venus/pm_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/platform/qcom/venus/pm_helpers.c +0
-0
drivers/media/platform/qcom/venus/pm_helpers.c static unsigned long calculate_inst_freq(struct · line 932
Quoted 6 lines
drivers/media/platform/qcom/venus/pm_helpers.c +1
-1@@ -928,7 +928,7 @@ static unsigned long calculate_inst_freq(structvenus_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);
Good find.
Thanks,
Vikash
This patch was applied to qcom/linux.git (refs/heads/for-next):
Hello:
This patch was applied to qcom/linux.git (refs/heads/for-next):
Quoted 8 lines · On Mon, 2 Nov 2020 16:01:37 +0530 you wrote:
Currently in
calculate_inst_freq(), video driver is calculating macro blocks per frame in stead of macro blocks per second(mpbs). Which results frequency is always setting to lower frequency (150MB) as per frequency table for sc7180. Hence the playback is not smooth.Corrected this by correcting the mbps calculation in
calculate_inst_freq().[...]
Here is the summary with links:
- [RESEND] venus: fix calculating mbps in calculate_inst_freq()
https://git.kernel.org/qcom/c/b57cf6a0a889
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html