From 5bf14d8ab81ceb33eb26bcdcc1410d8042f7acd8 Mon Sep 17 00:00:00 2001 From: Arun Menon Date: Wed, 6 Jul 2016 16:31:08 -0700 Subject: [PATCH] msm: vidc: Fix an issue with high bitrate playback If the instant bitrate during playback is higher than the max supported bitrate, then driver should ensure that venus core is scaled at max frequency. Without this change we will see frame drops if instant bitrate is higher than max supported. CRs-Fixed: 1038427 Change-Id: Id76865085285e2d8b92dba6aa456b972374789ac Signed-off-by: Arun Menon --- drivers/media/platform/msm/vidc/venus_hfi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/platform/msm/vidc/venus_hfi.c b/drivers/media/platform/msm/vidc/venus_hfi.c index 5525e35a029f..202523a50129 100644 --- a/drivers/media/platform/msm/vidc/venus_hfi.c +++ b/drivers/media/platform/msm/vidc/venus_hfi.c @@ -1238,6 +1238,13 @@ static unsigned long __get_clock_rate_with_bitrate(struct clock_info *clock, break; } } + + /* + * Current bitrate is higher than max supported load. + * Select max frequency to handle this load. + */ + if (i < 0) + supported_clk[j] = table[0].freq; } for (i = 0; i < data->num_sessions; i++)