linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] venus: fix calculating mbps in calculate_inst_freq()
@ 2020-11-02 10:24 Mansur Alisha Shaik
  2020-11-09 18:31 ` Fritz Koenig
  0 siblings, 1 reply; 2+ messages in thread
From: Mansur Alisha Shaik @ 2020-11-02 10:24 UTC (permalink / raw)
  To: linux-media, stanimir.varbanov
  Cc: linux-kernel, linux-arm-msm, vgarodia, Mansur Alisha Shaik

Currently in calculate_inst_freq() video driver is calculating
macro blocks per frame in steam 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.

Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org>
---
 drivers/media/platform/qcom/venus/pm_helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c
index 57877ea..001513f 100644
--- a/drivers/media/platform/qcom/venus/pm_helpers.c
+++ b/drivers/media/platform/qcom/venus/pm_helpers.c
@@ -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 */
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] venus: fix calculating mbps in calculate_inst_freq()
  2020-11-02 10:24 [PATCH] venus: fix calculating mbps in calculate_inst_freq() Mansur Alisha Shaik
@ 2020-11-09 18:31 ` Fritz Koenig
  0 siblings, 0 replies; 2+ messages in thread
From: Fritz Koenig @ 2020-11-09 18:31 UTC (permalink / raw)
  To: Mansur Alisha Shaik
  Cc: linux-media, Stanimir Varbanov, linux-kernel, linux-arm-msm,
	Vikash Garodia

On Mon, Nov 2, 2020 at 2:25 AM Mansur Alisha Shaik
<mansur@codeaurora.org> wrote:
>
> Currently in calculate_inst_freq() video driver is calculating
> macro blocks per frame in steam 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.
>
> Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org>
> ---
>  drivers/media/platform/qcom/venus/pm_helpers.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c
> index 57877ea..001513f 100644
> --- a/drivers/media/platform/qcom/venus/pm_helpers.c
> +++ b/drivers/media/platform/qcom/venus/pm_helpers.c
> @@ -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 */
> --
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
>

Reviewed-by: Fritz Koenig <frkoenig@chromium.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-09 18:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-02 10:24 [PATCH] venus: fix calculating mbps in calculate_inst_freq() Mansur Alisha Shaik
2020-11-09 18:31 ` Fritz Koenig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).