aboutsummaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorYunfei Dong2022-05-12 04:19:43 +0200
committerMauro Carvalho Chehab2022-05-13 14:46:01 +0200
commitabd12e85fc95c8ec7277bfe42da222937620a949 (patch)
treec537b54e0e149fdb9d74ce60facb9d06ee15881e /drivers/media
parentf0a17f75d6c7f9a971c5390d1522700388931cf9 (diff)
media: mediatek: vcodec: disable vp8 4K capability
For vp8 not support 4K, need to disable it. Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> Tested-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
index 97971d8f444b..fae0dfc606b1 100644
--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
@@ -435,7 +435,8 @@ static int vidioc_vdec_s_fmt(struct file *file, void *priv,
if (fmt == NULL)
return -EINVAL;
- if (!(ctx->dev->dec_capability & VCODEC_CAPABILITY_4K_DISABLED)) {
+ if (!(ctx->dev->dec_capability & VCODEC_CAPABILITY_4K_DISABLED) &&
+ fmt->fourcc != V4L2_PIX_FMT_VP8_FRAME) {
mtk_v4l2_debug(3, "4K is enabled");
ctx->max_width = VCODEC_DEC_4K_CODED_WIDTH;
ctx->max_height = VCODEC_DEC_4K_CODED_HEIGHT;