summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorVikash Garodia <vgarodia@codeaurora.org>2021-03-31 11:28:22 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-04-15 13:13:23 +0200
commit7bf28a2153ea3cc8362d78a76e1bccf06ce7805d (patch)
treef34ae1c2b565f9291136838264054f0ccba6e967 /drivers/media
parentbcf6b264a806295cd4578aa7a03b3bcb15b1ab30 (diff)
media: venus: helpers: keep max bandwidth when mbps exceeds the supported range
When the video usecase have macro blocks per sec which is more than supported, keep the required bus bandwidth as the maximum supported. Signed-off-by: Vikash Garodia <vgarodia@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')
-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 abb4b69783b2..c7e1ebec47ee 100644
--- a/drivers/media/platform/qcom/venus/pm_helpers.c
+++ b/drivers/media/platform/qcom/venus/pm_helpers.c
@@ -201,7 +201,7 @@ static void mbs_to_bw(struct venus_inst *inst, u32 mbs, u32 *avg, u32 *peak)
return;
for (i = 0; i < num_rows; i++) {
- if (mbs > bw_tbl[i].mbs_per_sec)
+ if (i != 0 && mbs > bw_tbl[i].mbs_per_sec)
break;
if (inst->dpb_fmt & HFI_COLOR_FORMAT_10_BIT_BASE) {