media: imx: imx7-media-csi: Fix mbus framefmt field init
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Tue, 21 Mar 2023 07:27:06 +0000 (08:27 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 11 Apr 2023 16:11:53 +0000 (18:11 +0200)
'field' is zero-initialized to V4L2_FIELD_ANY, which is an invalid value
to return to userspace. Instead default to non-interleaving.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/nxp/imx7-media-csi.c

index cc468b3daed389a94a0deae4859e73bddde027ef..af4a2df780e3beb3e5a2f92ab356344246922bc7 100644 (file)
@@ -1610,6 +1610,7 @@ static int imx7_csi_video_init_format(struct imx7_csi *csi)
        format.code = IMX7_CSI_DEF_MBUS_CODE;
        format.width = IMX7_CSI_DEF_PIX_WIDTH;
        format.height = IMX7_CSI_DEF_PIX_HEIGHT;
+       format.field = V4L2_FIELD_NONE;
 
        imx7_csi_mbus_fmt_to_pix_fmt(&csi->vdev_fmt, &format, NULL);
        csi->vdev_compose.width = format.width;