From 5898179fb67f5a11b81743a64a9351b45eae37cb Mon Sep 17 00:00:00 2001 From: Shijie Qin Date: Wed, 21 Apr 2021 18:23:15 +0800 Subject: [PATCH] MLK-25456 [8QM_MEK/8QXP_MEK] mxc: vpu_windsor: donot return V4L2_FIELD_ANY Regarding field order, since encoder support progressive format only, should return V4L2_FIELD_NONE. Drivers must never return V4L2_FIELD_ANY. Signed-off-by: Shijie Qin Reviewed-by: ming_qian (cherry picked from commit c47cab6f5784b17aa735f9863bbcdbea2bcbe393) --- drivers/mxc/vpu_windsor/vpu_encoder_b0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mxc/vpu_windsor/vpu_encoder_b0.c b/drivers/mxc/vpu_windsor/vpu_encoder_b0.c index 19b2f9cbe4b9..3ba1d6cdc840 100644 --- a/drivers/mxc/vpu_windsor/vpu_encoder_b0.c +++ b/drivers/mxc/vpu_windsor/vpu_encoder_b0.c @@ -463,7 +463,7 @@ static int vpu_enc_v4l2_ioctl_g_fmt(struct file *file, pix_mp->num_planes = q_data->current_fmt->num_planes; pix_mp->width = q_data->width; pix_mp->height = q_data->height; - pix_mp->field = V4L2_FIELD_ANY; + pix_mp->field = V4L2_FIELD_NONE; for (i = 0; i < pix_mp->num_planes; i++) pix_mp->plane_fmt[i].sizeimage = q_data->sizeimage[i]; @@ -1509,7 +1509,7 @@ static int vpu_enc_v4l2_ioctl_try_fmt(struct file *file, vpu_dbg(LVL_FUNC, "%s(), %s\n", __func__, q_data->desc); if (f->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) { - pix_mp->field = V4L2_FIELD_ANY; + pix_mp->field = V4L2_FIELD_NONE; pix_mp->colorspace = V4L2_COLORSPACE_REC709; if (!vpu_enc_check_colorspace(pix_mp->colorspace)) { pix_mp->colorspace = ctx->colorspace; -- 2.17.1