[PATCH v2, 09/12] media: mtk-vcodec: disable vp8 4K capability
Yunfei Dong
yunfei.dong at mediatek.com
Tue Dec 28 01:41:43 PST 2021
From: Yunfei Dong <yunfei.dong at mediatek.corp-partner.google.com>
For vp8 not support 4K, need to disable it.
Signed-off-by: Yunfei Dong <yunfei.dong at mediatek.com>
---
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
index 0b14f816bf58..0317a9930de1 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
@@ -534,7 +534,8 @@ static int vidioc_enum_framesizes(struct file *file, void *priv,
fsize->type = V4L2_FRMSIZE_TYPE_STEPWISE;
fsize->stepwise = dec_pdata->vdec_framesizes[i].stepwise;
if (!(ctx->dev->dec_capability &
- VCODEC_CAPABILITY_4K_DISABLED)) {
+ VCODEC_CAPABILITY_4K_DISABLED) &&
+ fsize->pixel_format != V4L2_PIX_FMT_VP8_FRAME) {
mtk_v4l2_debug(3, "4K is enabled");
fsize->stepwise.max_width =
VCODEC_DEC_4K_CODED_WIDTH;
--
2.25.1
More information about the linux-arm-kernel
mailing list