media: venus: fix calculating mbps in calculate_inst_freq()
authorMansur Alisha Shaik <mansur@codeaurora.org>
Mon, 2 Nov 2020 10:31:37 +0000 (11:31 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 17 Nov 2020 05:54:07 +0000 (06:54 +0100)
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>
drivers/media/platform/qcom/venus/pm_helpers.c

index 0ebba8e..12784e9 100644 (file)
@@ -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 */