From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Martin Kepplinger <martin.kepplinger@puri.sm>
Cc: linux-media@vger.kernel.org, Rui Miguel Silva <rmfrfs@gmail.com>,
kernel@pengutronix.de, Fabio Estevam <festevam@gmail.com>,
linux-imx@nxp.com, Steve Longerbeam <slongerbeam@gmail.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Marek Vasut <marex@denx.de>,
Marco Felsch <m.felsch@pengutronix.de>,
Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm>
Subject: Re: [RFC PATCH 2/3] media: imx: imx7-media-csi: Set TWO_8BIT_SENSOR for >= 10-bit formats
Date: Wed, 28 Jul 2021 16:20:56 +0300 [thread overview]
Message-ID: <YQFZuBEc4fKu+LTY@pendragon.ideasonboard.com> (raw)
In-Reply-To: <6461ee38c77b94c0c8853d814da6ae6ae4e684f6.camel@puri.sm>
Hi Martin,
On Wed, Jul 28, 2021 at 10:54:23AM +0200, Martin Kepplinger wrote:
> Am Sonntag, dem 16.05.2021 um 05:42 +0300 schrieb Laurent Pinchart:
> > Sample code from NXP, as well as experiments on i.MX8MM with RAW10
> > capture with an OV5640 sensor connected over CSI-2, showed that the
> > TWO_8BIT_SENSOR field of the CSICR3 register needs to be set for
> > formats
> > larger than 8 bits. Do so, even if the reference manual doesn't
> > clearly
> > describe the effect of the field.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> > drivers/staging/media/imx/imx7-media-csi.c | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/media/imx/imx7-media-csi.c
> > b/drivers/staging/media/imx/imx7-media-csi.c
> > index f85a2f5f1413..256b9aa978f0 100644
> > --- a/drivers/staging/media/imx/imx7-media-csi.c
> > +++ b/drivers/staging/media/imx/imx7-media-csi.c
> > @@ -422,6 +422,7 @@ static void imx7_csi_configure(struct imx7_csi
> > *csi)
> > int width = out_pix->width;
> > u32 stride = 0;
> > u32 cr1, cr18;
> > + u32 cr3 = 0;
> >
> > cr18 = imx7_csi_reg_read(csi, CSI_CSICR18);
> >
> > @@ -464,6 +465,7 @@ static void imx7_csi_configure(struct imx7_csi
> > *csi)
> > case MEDIA_BUS_FMT_SGBRG10_1X10:
> > case MEDIA_BUS_FMT_SGRBG10_1X10:
> > case MEDIA_BUS_FMT_SRGGB10_1X10:
> > + cr3 |= BIT_TWO_8BIT_SENSOR;
> > cr18 |= BIT_MIPI_DATA_FORMAT_RAW10;
> > break;
> > case MEDIA_BUS_FMT_Y12_1X12:
> > @@ -471,6 +473,7 @@ static void imx7_csi_configure(struct imx7_csi
> > *csi)
> > case MEDIA_BUS_FMT_SGBRG12_1X12:
> > case MEDIA_BUS_FMT_SGRBG12_1X12:
> > case MEDIA_BUS_FMT_SRGGB12_1X12:
> > + cr3 |= BIT_TWO_8BIT_SENSOR;
> > cr18 |= BIT_MIPI_DATA_FORMAT_RAW12;
> > break;
> > case MEDIA_BUS_FMT_Y14_1X14:
> > @@ -478,6 +481,7 @@ static void imx7_csi_configure(struct imx7_csi
> > *csi)
> > case MEDIA_BUS_FMT_SGBRG14_1X14:
> > case MEDIA_BUS_FMT_SGRBG14_1X14:
> > case MEDIA_BUS_FMT_SRGGB14_1X14:
> > + cr3 |= BIT_TWO_8BIT_SENSOR;
> > cr18 |= BIT_MIPI_DATA_FORMAT_RAW14;
> > break;
> > /*
> > @@ -510,7 +514,7 @@ static void imx7_csi_configure(struct imx7_csi
> > *csi)
> >
> > imx7_csi_reg_write(csi, cr1, CSI_CSICR1);
> > imx7_csi_reg_write(csi, BIT_DMA_BURST_TYPE_RFF_INCR16,
> > CSI_CSICR2);
> > - imx7_csi_reg_write(csi, BIT_FRMCNT_RST, CSI_CSICR3);
> > + imx7_csi_reg_write(csi, BIT_FRMCNT_RST | cr3, CSI_CSICR3);
> > imx7_csi_reg_write(csi, cr18, CSI_CSICR18);
> >
> > imx7_csi_reg_write(csi, (width * out_pix->height) >> 2,
> > CSI_CSIRXCNT);
>
> this patch series looks good to me - I need it for the driver to run on
> imx8mq.
>
> Reviewed-by: Martin Kepplinger <martin.kepplinger@puri.sm>
>
> Could you either rebase and resend as non-RFC or queue them up more
> directly?
I've just sent a pull request that includes v1.1 of this patch. I'm
sorry I missed your Reviewed-by tag :-S
https://lore.kernel.org/linux-media/YQFY5FS8v3Y3KkEA@pendragon.ideasonboard.com/T/#u
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2021-07-28 13:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-16 2:42 [RFC PATCH 0/3] media: imx: imx7-media-csi: i.MX8MM support Laurent Pinchart
2021-05-16 2:42 ` [RFC PATCH 1/3] dt-bindings: media: nxp,imx7-csi: Add " Laurent Pinchart
2021-05-18 11:26 ` Martin Kepplinger
2021-05-18 11:33 ` Laurent Pinchart
2021-05-18 13:27 ` Rob Herring
2021-05-16 2:42 ` [RFC PATCH 2/3] media: imx: imx7-media-csi: Set TWO_8BIT_SENSOR for >= 10-bit formats Laurent Pinchart
2021-05-17 10:21 ` Rui Miguel Silva
2021-05-19 0:23 ` [RFC PATCH 2/3 v1.1] " Laurent Pinchart
2021-05-19 14:07 ` Rui Miguel Silva
2021-05-17 10:21 ` [RFC PATCH 2/3] " Frieder Schrempf
2021-05-19 0:16 ` Laurent Pinchart
2021-05-25 9:59 ` Frieder Schrempf
2021-06-10 14:49 ` Laurent Pinchart
2021-05-18 11:28 ` Martin Kepplinger
2021-07-28 8:54 ` Martin Kepplinger
2021-07-28 13:20 ` Laurent Pinchart [this message]
2021-05-16 2:42 ` [RFC PATCH 3/3] media: imx: imx7-media-csi: Don't set PIXEL_BIT in CSICR1 Laurent Pinchart
2021-05-17 10:22 ` Rui Miguel Silva
2021-05-18 11:32 ` Martin Kepplinger
2021-05-17 10:20 ` [RFC PATCH 0/3] media: imx: imx7-media-csi: i.MX8MM support Rui Miguel Silva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YQFZuBEc4fKu+LTY@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=dorota.czaplejewicz@puri.sm \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-imx@nxp.com \
--cc=linux-media@vger.kernel.org \
--cc=m.felsch@pengutronix.de \
--cc=marex@denx.de \
--cc=martin.kepplinger@puri.sm \
--cc=p.zabel@pengutronix.de \
--cc=rmfrfs@gmail.com \
--cc=slongerbeam@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.