提交 fbb2e665 编写于 作者: L Loic Poulain 提交者: Yang Yingliang

media: venus: core: Fix msm8996 frequency table

[ Upstream commit c690435ed07901737e5c007a65ec59f53b33eb71 ]

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: NLoic Poulain <loic.poulain@linaro.org>
Signed-off-by: NStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 aa9a5cfb
...@@ -430,10 +430,11 @@ static const struct venus_resources msm8916_res = { ...@@ -430,10 +430,11 @@ static const struct venus_resources msm8916_res = {
}; };
static const struct freq_tbl msm8996_freq_table[] = { static const struct freq_tbl msm8996_freq_table[] = {
{ 1944000, 490000000 }, /* 4k UHD @ 60 */ { 1944000, 520000000 }, /* 4k UHD @ 60 (decode only) */
{ 972000, 320000000 }, /* 4k UHD @ 30 */ { 972000, 520000000 }, /* 4k UHD @ 30 */
{ 489600, 150000000 }, /* 1080p @ 60 */ { 489600, 346666667 }, /* 1080p @ 60 */
{ 244800, 75000000 }, /* 1080p @ 30 */ { 244800, 150000000 }, /* 1080p @ 30 */
{ 108000, 75000000 }, /* 720p @ 30 */
}; };
static const struct reg_val msm8996_reg_preset[] = { static const struct reg_val msm8996_reg_preset[] = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册