diff mbox series

[RFC,5/5] media: vicodec: flag vdec/stateful OUTPUT formats with V4L2_FMT_FLAG_DYN_RESOLUTION

Message ID 20190609143820.4662-6-mjourdan@baylibre.com (mailing list archive)
State New, archived
Headers show
Series Add enum_fmt flag for coded formats with dynamic resolution switching | expand

Commit Message

Maxime Jourdan June 9, 2019, 2:38 p.m. UTC
Tag all the coded formats where the vicodec stateful decoder supports
dynamic resolution switching.

Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
---
 drivers/media/platform/vicodec/vicodec-core.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/media/platform/vicodec/vicodec-core.c b/drivers/media/platform/vicodec/vicodec-core.c
index 72c56756e45b..8e425c347332 100644
--- a/drivers/media/platform/vicodec/vicodec-core.c
+++ b/drivers/media/platform/vicodec/vicodec-core.c
@@ -729,6 +729,8 @@  static int enum_fmt(struct v4l2_fmtdesc *f, struct vicodec_ctx *ctx,
 			return -EINVAL;
 		f->pixelformat = ctx->is_stateless ?
 			V4L2_PIX_FMT_FWHT_STATELESS : V4L2_PIX_FMT_FWHT;
+		if (!ctx->is_enc && !ctx->is_stateless)
+			f->flags = V4L2_FMT_FLAG_DYN_RESOLUTION;
 	}
 	return 0;
 }