Hi Steve, On Wed, Oct 23, 2019 at 08:25:53PM -0700, Steve Longerbeam wrote: > On 10/23/19 5:41 PM, Laurent Pinchart wrote: > > Commit 4791bd7d6adc ("media: imx: Try colorimetry at both sink and > > source pads") reworked the way that formats are set on the sink pad of > > the CSI subdevice, and accidentally removed video field handling. > > Restore it by defaulting to V4L2_FIELD_NONE if the field value isn't > > supported, with the only two supported value being V4L2_FIELD_NONE and > > V4L2_FIELD_ALTERNATE. > > I think you mean the only two supported field values being > V4L2_FIELD_NONE and V4L2_FIELD_INTERLACED. > > For this driver to support ALTERNATE, it would have to detect the > captured field type and place that type in the returned vb2 buf->field, > which it is not doing. Yes, that's what I meant, sorry. I'll fix the commit message. > > Fixes: 4791bd7d6adc ("media: imx: Try colorimetry at both sink and source pads") > > Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> > > --- > > drivers/staging/media/imx/imx7-media-csi.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c > > index ac07f55a63e3..0db6473caf13 100644 > > --- a/drivers/staging/media/imx/imx7-media-csi.c > > +++ b/drivers/staging/media/imx/imx7-media-csi.c > > @@ -1017,6 +1017,7 @@ static int imx7_csi_try_fmt(struct imx7_csi *csi, > > sdformat->format.width = in_fmt->width; > > sdformat->format.height = in_fmt->height; > > sdformat->format.code = in_fmt->code; > > + sdformat->format.field = in_fmt->field; > > *cc = in_cc; > > > > sdformat->format.colorspace = in_fmt->colorspace; > > @@ -1031,6 +1032,9 @@ static int imx7_csi_try_fmt(struct imx7_csi *csi, > > false); > > sdformat->format.code = (*cc)->codes[0]; > > } > > + > > + if (sdformat->format.field != V4L2_FIELD_INTERLACED) > > + sdformat->format.field = V4L2_FIELD_NONE; > > break; > > default: > > return -EINVAL; > -- Regards, Laurent Pinchart