MLK-25456 [8QM_MEK/8QXP_MEK] mxc: vpu_windsor: donot return V4L2_FIELD_ANY
authorShijie Qin <shijie.qin@nxp.com>
Wed, 21 Apr 2021 10:23:15 +0000 (18:23 +0800)
committerShijie Qin <shijie.qin@nxp.com>
Tue, 27 Apr 2021 06:01:44 +0000 (14:01 +0800)
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 <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
(cherry picked from commit c47cab6f5784b17aa735f9863bbcdbea2bcbe393)

drivers/mxc/vpu_windsor/vpu_encoder_b0.c

index 19b2f9c..3ba1d6c 100644 (file)
@@ -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;