Commit abf8dd29 authored by Maxime Jourdan's avatar Maxime Jourdan Committed by Mauro Carvalho Chehab

media: mtk-vcodec: flag OUTPUT formats with V4L2_FMT_FLAG_DYN_RESOLUTION

Tag all the coded formats where the mtk-vcodec decoder supports dynamic
resolution switching.
Signed-off-by: default avatarMaxime Jourdan <mjourdan@baylibre.com>
Reviewed-by: default avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: default avatarAlexandre Courbot <acourbot@chromium.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 5aecb7d0
...@@ -29,16 +29,19 @@ static const struct mtk_video_fmt mtk_video_formats[] = { ...@@ -29,16 +29,19 @@ static const struct mtk_video_fmt mtk_video_formats[] = {
.fourcc = V4L2_PIX_FMT_H264, .fourcc = V4L2_PIX_FMT_H264,
.type = MTK_FMT_DEC, .type = MTK_FMT_DEC,
.num_planes = 1, .num_planes = 1,
.flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
}, },
{ {
.fourcc = V4L2_PIX_FMT_VP8, .fourcc = V4L2_PIX_FMT_VP8,
.type = MTK_FMT_DEC, .type = MTK_FMT_DEC,
.num_planes = 1, .num_planes = 1,
.flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
}, },
{ {
.fourcc = V4L2_PIX_FMT_VP9, .fourcc = V4L2_PIX_FMT_VP9,
.type = MTK_FMT_DEC, .type = MTK_FMT_DEC,
.num_planes = 1, .num_planes = 1,
.flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
}, },
{ {
.fourcc = V4L2_PIX_FMT_MT21C, .fourcc = V4L2_PIX_FMT_MT21C,
...@@ -948,6 +951,7 @@ static int vidioc_enum_fmt(struct v4l2_fmtdesc *f, bool output_queue) ...@@ -948,6 +951,7 @@ static int vidioc_enum_fmt(struct v4l2_fmtdesc *f, bool output_queue)
fmt = &mtk_video_formats[i]; fmt = &mtk_video_formats[i];
f->pixelformat = fmt->fourcc; f->pixelformat = fmt->fourcc;
f->flags = fmt->flags;
return 0; return 0;
} }
......
...@@ -99,6 +99,7 @@ struct mtk_video_fmt { ...@@ -99,6 +99,7 @@ struct mtk_video_fmt {
u32 fourcc; u32 fourcc;
enum mtk_fmt_type type; enum mtk_fmt_type type;
u32 num_planes; u32 num_planes;
u32 flags;
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment