media: imx: imx7-media-csi: Remove incorrect interlacing support
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Wed, 19 Apr 2023 07:07:10 +0000 (09:07 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 25 May 2023 14:21:23 +0000 (16:21 +0200)
The driver doesn't currently support interlacing, but due to legacy
leftovers, it accepts values for the pixel format "field" field other
than V4L2_FIELD_NONE. Fix it by hardcoding V4L2_FIELD_NONE. Proper
interlacing support can be implemented later if desired.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/nxp/imx7-media-csi.c

index b149374b07ee16fc26a0c04cec610d7ce7af255d..1315f5743b76fec06095fe89340d1269f240b2ad 100644 (file)
@@ -1162,20 +1162,6 @@ __imx7_csi_video_try_fmt(struct v4l2_pix_format *pixfmt,
                cc = imx7_csi_find_pixel_format(pixfmt->pixelformat);
        }
 
-       /* Allow IDMAC interweave but enforce field order from source. */
-       if (V4L2_FIELD_IS_INTERLACED(pixfmt->field)) {
-               switch (pixfmt->field) {
-               case V4L2_FIELD_SEQ_TB:
-                       pixfmt->field = V4L2_FIELD_INTERLACED_TB;
-                       break;
-               case V4L2_FIELD_SEQ_BT:
-                       pixfmt->field = V4L2_FIELD_INTERLACED_BT;
-                       break;
-               default:
-                       break;
-               }
-       }
-
        /*
         * Round up width for minimum burst size.
         *
@@ -1187,6 +1173,7 @@ __imx7_csi_video_try_fmt(struct v4l2_pix_format *pixfmt,
 
        pixfmt->bytesperline = pixfmt->width * cc->bpp / 8;
        pixfmt->sizeimage = pixfmt->bytesperline * pixfmt->height;
+       pixfmt->field = V4L2_FIELD_NONE;
 
        return cc;
 }