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

From: Alexandre Courbot
Date: Fri Jun 26 2020 - 04:06:26 EST


v4l2-compliance requires this.

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

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;
--
2.27.0.212.ge8ba1cc988-goog