diff mbox series

[v2,15/18] media: mtk-vcodec: venc: support G_PARM on CAPTURE queue

Message ID 20200626080442.292309-16-acourbot@chromium.org (mailing list archive)
State New, archived
Headers show
Series media: mtk-vcodec: venc: support for MT8183 and v4l2-compliance fixes | expand

Commit Message

Alexandre Courbot June 26, 2020, 8:04 a.m. UTC
v4l2-compliance requires this.

Signed-off-by: Alexandre Courbot <acourbot@chromium.org>
---
 drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
index 6cef61cb7883..aae610e6d4e8 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
@@ -218,7 +218,8 @@  static int vidioc_venc_g_parm(struct file *file, void *priv,
 {
 	struct mtk_vcodec_ctx *ctx = fh_to_ctx(priv);
 
-	if (a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
+	if (a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE &&
+	    a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
 		return -EINVAL;
 
 	a->parm.output.capability = V4L2_CAP_TIMEPERFRAME;