Message ID | 20200228232657.27028-1-slongerbeam@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | media: imx: Propagate quantization and encoding in CSI | expand |
On Fri, Feb 28, 2020 at 3:27 PM Steve Longerbeam <slongerbeam@gmail.com> wrote: > > Unlike the PRPENC and PRPVF subdevices, the CSI's cannot convert > quantization from sink to source, or do any kind of Y'CbCr <-> RGB > encoding. So the CSI's cannot allow quantization and ycbcr_enc to be > selectable by the user and must be propagated from sink to source. > > Fixes: 4791bd7d6adc4 ("media: imx: Try colorimetry at both sink and source pads") > Reported-by: Tim Harvey <tharvey@gateworks.com> > Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com> > --- > drivers/staging/media/imx/imx-media-csi.c | 2 ++ > drivers/staging/media/imx/imx7-media-csi.c | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c > index b60ed4f22f6d..ac15b1e78f18 100644 > --- a/drivers/staging/media/imx/imx-media-csi.c > +++ b/drivers/staging/media/imx/imx-media-csi.c > @@ -1459,6 +1459,8 @@ static void csi_try_fmt(struct csi_priv *priv, > /* propagate colorimetry from sink */ > sdformat->format.colorspace = infmt->colorspace; > sdformat->format.xfer_func = infmt->xfer_func; > + sdformat->format.quantization = infmt->quantization; > + sdformat->format.ycbcr_enc = infmt->ycbcr_enc; > > break; > case CSI_SINK_PAD: > diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c > index db30e2c70f2f..4692a3a77515 100644 > --- a/drivers/staging/media/imx/imx7-media-csi.c > +++ b/drivers/staging/media/imx/imx7-media-csi.c > @@ -1013,6 +1013,8 @@ static int imx7_csi_try_fmt(struct imx7_csi *csi, > > sdformat->format.colorspace = in_fmt->colorspace; > sdformat->format.xfer_func = in_fmt->xfer_func; > + sdformat->format.quantization = in_fmt->quantization; > + sdformat->format.ycbcr_enc = in_fmt->ycbcr_enc; > break; > case IMX7_CSI_PAD_SINK: > *cc = imx_media_find_mbus_format(sdformat->format.code, > -- > 2.17.1 > Tested-by: Tim Harvey <tharvey@gateworks.com> Tim
Hi Steve, On Fri, Feb 28, 2020 at 03:26:57PM -0800, Steve Longerbeam wrote: > Unlike the PRPENC and PRPVF subdevices, the CSI's cannot convert > quantization from sink to source, or do any kind of Y'CbCr <-> RGB > encoding. So the CSI's cannot allow quantization and ycbcr_enc to be > selectable by the user and must be propagated from sink to source. > > Fixes: 4791bd7d6adc4 ("media: imx: Try colorimetry at both sink and source pads") > Reported-by: Tim Harvey <tharvey@gateworks.com> > Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com> Thanks, for imx7: Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> ------ Cheers, Rui > --- > drivers/staging/media/imx/imx-media-csi.c | 2 ++ > drivers/staging/media/imx/imx7-media-csi.c | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c > index b60ed4f22f6d..ac15b1e78f18 100644 > --- a/drivers/staging/media/imx/imx-media-csi.c > +++ b/drivers/staging/media/imx/imx-media-csi.c > @@ -1459,6 +1459,8 @@ static void csi_try_fmt(struct csi_priv *priv, > /* propagate colorimetry from sink */ > sdformat->format.colorspace = infmt->colorspace; > sdformat->format.xfer_func = infmt->xfer_func; > + sdformat->format.quantization = infmt->quantization; > + sdformat->format.ycbcr_enc = infmt->ycbcr_enc; > > break; > case CSI_SINK_PAD: > diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c > index db30e2c70f2f..4692a3a77515 100644 > --- a/drivers/staging/media/imx/imx7-media-csi.c > +++ b/drivers/staging/media/imx/imx7-media-csi.c > @@ -1013,6 +1013,8 @@ static int imx7_csi_try_fmt(struct imx7_csi *csi, > > sdformat->format.colorspace = in_fmt->colorspace; > sdformat->format.xfer_func = in_fmt->xfer_func; > + sdformat->format.quantization = in_fmt->quantization; > + sdformat->format.ycbcr_enc = in_fmt->ycbcr_enc; > break; > case IMX7_CSI_PAD_SINK: > *cc = imx_media_find_mbus_format(sdformat->format.code, > -- > 2.17.1 >
diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index b60ed4f22f6d..ac15b1e78f18 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -1459,6 +1459,8 @@ static void csi_try_fmt(struct csi_priv *priv, /* propagate colorimetry from sink */ sdformat->format.colorspace = infmt->colorspace; sdformat->format.xfer_func = infmt->xfer_func; + sdformat->format.quantization = infmt->quantization; + sdformat->format.ycbcr_enc = infmt->ycbcr_enc; break; case CSI_SINK_PAD: diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c index db30e2c70f2f..4692a3a77515 100644 --- a/drivers/staging/media/imx/imx7-media-csi.c +++ b/drivers/staging/media/imx/imx7-media-csi.c @@ -1013,6 +1013,8 @@ static int imx7_csi_try_fmt(struct imx7_csi *csi, sdformat->format.colorspace = in_fmt->colorspace; sdformat->format.xfer_func = in_fmt->xfer_func; + sdformat->format.quantization = in_fmt->quantization; + sdformat->format.ycbcr_enc = in_fmt->ycbcr_enc; break; case IMX7_CSI_PAD_SINK: *cc = imx_media_find_mbus_format(sdformat->format.code,
Unlike the PRPENC and PRPVF subdevices, the CSI's cannot convert quantization from sink to source, or do any kind of Y'CbCr <-> RGB encoding. So the CSI's cannot allow quantization and ycbcr_enc to be selectable by the user and must be propagated from sink to source. Fixes: 4791bd7d6adc4 ("media: imx: Try colorimetry at both sink and source pads") Reported-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com> --- drivers/staging/media/imx/imx-media-csi.c | 2 ++ drivers/staging/media/imx/imx7-media-csi.c | 2 ++ 2 files changed, 4 insertions(+)