Skip to content

Commit ed17f89

Browse files
Pin-yen Linmchehab
authored andcommitted
media: mediatek: vcodec: Only apply 4K frame sizes on decoder formats
When VCODEC_CAPABILITY_4K_DISABLED is not set in dec_capability, skip formats that are not MTK_FMT_DEC so only decoder formats is updated in mtk_init_vdec_params. Fixes: e25528e ("media: mediatek: vcodec: Use 4K frame size when supported by stateful decoder") Signed-off-by: Pin-yen Lin <[email protected]> Reviewed-by: Chen-Yu Tsai <[email protected]> Reviewed-by: Yunfei Dong <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 76743b2 commit ed17f89

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,9 @@ static void mtk_init_vdec_params(struct mtk_vcodec_ctx *ctx)
584584

585585
if (!(ctx->dev->dec_capability & VCODEC_CAPABILITY_4K_DISABLED)) {
586586
for (i = 0; i < num_supported_formats; i++) {
587+
if (mtk_video_formats[i].type != MTK_FMT_DEC)
588+
continue;
589+
587590
mtk_video_formats[i].frmsize.max_width =
588591
VCODEC_DEC_4K_CODED_WIDTH;
589592
mtk_video_formats[i].frmsize.max_height =

0 commit comments

Comments
 (0)