]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/media/platform/msm/camss-8x16/csid.c
camss: Add format field handling in CSIPHY and CSID
[karo-tx-linux.git] / drivers / media / platform / msm / camss-8x16 / csid.c
index 54b6d49a90f0321dac5b248db95c35b3324509cd..7ca3640fb811b4962939016b520b84b76de66b71 100644 (file)
@@ -380,6 +380,9 @@ static int csid_set_format(struct v4l2_subdev *sd,
                if (format == NULL)
                        return -EINVAL;
 
+               if (fmt->format.field == V4L2_FIELD_ANY)
+                       fmt->format.field = V4L2_FIELD_NONE;
+
                *format = fmt->format;
 
                /* Reset format on source pad */
@@ -419,6 +422,8 @@ static int csid_set_format(struct v4l2_subdev *sd,
 
                        /* Accept only YUV422 format */
                        fmt->format.code = MEDIA_BUS_FMT_UYVY8_2X8;
+                       fmt->format.field = V4L2_FIELD_NONE;
+
                        *format = fmt->format;
                }
        }