linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] media: venus: core: Fix msm8996 frequency table
@ 2019-09-11 14:45 Loic Poulain
  2019-09-23 16:13 ` Stanimir Varbanov
  0 siblings, 1 reply; 2+ messages in thread
From: Loic Poulain @ 2019-09-11 14:45 UTC (permalink / raw)
  To: stanimir.varbanov, agross; +Cc: linux-arm-msm, linux-media, Loic Poulain

In downstream driver, there are two frequency tables defined,
one for the encoder and one for the decoder:

/* Encoders /
<972000 490000000 0x55555555>, / 4k UHD @ 30 /
<489600 320000000 0x55555555>, / 1080p @ 60 /
<244800 150000000 0x55555555>, / 1080p @ 30 /
<108000 75000000 0x55555555>, / 720p @ 30 */

/* Decoders /
<1944000 490000000 0xffffffff>, / 4k UHD @ 60 /
< 972000 320000000 0xffffffff>, / 4k UHD @ 30 /
< 489600 150000000 0xffffffff>, / 1080p @ 60 /
< 244800 75000000 0xffffffff>; / 1080p @ 30 */

It shows that encoder always needs a higher clock than decoder.

In current venus driver, the unified frequency table is aligned
with the downstream decoder table which causes performance issues
in encoding scenarios. Fix that by aligning frequency table on
worst case (encoding).

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
---
 drivers/media/platform/qcom/venus/core.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 0acc757..e0d5a10 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -427,10 +427,11 @@ static const struct venus_resources msm8916_res = {
 };
 
 static const struct freq_tbl msm8996_freq_table[] = {
-	{ 1944000, 490000000 },	/* 4k UHD @ 60 */
-	{  972000, 320000000 },	/* 4k UHD @ 30 */
-	{  489600, 150000000 },	/* 1080p @ 60 */
-	{  244800,  75000000 },	/* 1080p @ 30 */
+	{ 1944000, 520000000 },	/* 4k UHD @ 60 (decode only) */
+	{  972000, 520000000 },	/* 4k UHD @ 30 */
+	{  489600, 346666667 },	/* 1080p @ 60 */
+	{  244800, 150000000 },	/* 1080p @ 30 */
+	{  108000,  75000000 },	/* 720p @ 30 */
 };
 
 static const struct reg_val msm8996_reg_preset[] = {
-- 
2.7.4


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

* Re: [PATCH v2] media: venus: core: Fix msm8996 frequency table
  2019-09-11 14:45 [PATCH v2] media: venus: core: Fix msm8996 frequency table Loic Poulain
@ 2019-09-23 16:13 ` Stanimir Varbanov
  0 siblings, 0 replies; 2+ messages in thread
From: Stanimir Varbanov @ 2019-09-23 16:13 UTC (permalink / raw)
  To: Loic Poulain, stanimir.varbanov, agross; +Cc: linux-arm-msm, linux-media

Hi Loic,

On 9/11/19 5:45 PM, Loic Poulain wrote:
> In downstream driver, there are two frequency tables defined,
> one for the encoder and one for the decoder:
> 
> /* Encoders /
> <972000 490000000 0x55555555>, / 4k UHD @ 30 /
> <489600 320000000 0x55555555>, / 1080p @ 60 /
> <244800 150000000 0x55555555>, / 1080p @ 30 /
> <108000 75000000 0x55555555>, / 720p @ 30 */
> 
> /* Decoders /
> <1944000 490000000 0xffffffff>, / 4k UHD @ 60 /
> < 972000 320000000 0xffffffff>, / 4k UHD @ 30 /
> < 489600 150000000 0xffffffff>, / 1080p @ 60 /
> < 244800 75000000 0xffffffff>; / 1080p @ 30 */
> 
> It shows that encoder always needs a higher clock than decoder.
> 
> In current venus driver, the unified frequency table is aligned
> with the downstream decoder table which causes performance issues
> in encoding scenarios. Fix that by aligning frequency table on
> worst case (encoding).
> 
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> ---
>  drivers/media/platform/qcom/venus/core.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>

-- 
-- 
regards,
Stan

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

end of thread, other threads:[~2019-09-23 16:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-11 14:45 [PATCH v2] media: venus: core: Fix msm8996 frequency table Loic Poulain
2019-09-23 16:13 ` Stanimir Varbanov

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).