mbox series

[v2,0/7] media: imx: Destage imx7-mipi-csis

Message ID 20220218183421.583874-1-jacopo@jmondi.org (mailing list archive)
Headers show
Series media: imx: Destage imx7-mipi-csis | expand

Message

Jacopo Mondi Feb. 18, 2022, 6:34 p.m. UTC
Hello
  this series includes patches from two series previously sent:
https://lore.kernel.org/linux-media/20220119112024.11339-1-jacopo@jmondi.org/
https://lore.kernel.org/linux-media/20220211180216.290133-1-jacopo@jmondi.org/
v1:
https://lore.kernel.org/linux-media/20220214184318.409208-1-jacopo@jmondi.org/T/#t

Which can now be marked as superseded.

The first 2 patches performs the de-staging of the imx7-mipi-csis driver and
are now reviewed.

The rest of the series builds on top of the comment received on:
https://lore.kernel.org/linux-media/20220119112024.11339-3-jacopo@jmondi.org/

If DUAL pixel mode is used in the CSIS driver, then the CSI block of the IMX8MM
SoC needs to be operated in dual mode as well. To do so, use the image format
sample size to determine in the CSI bridge if dual or single mode should be
used.

Laurent could you test on MM to see if it works now ?

On top two small patches I was carrying in my tree to add more formats to the
CSIS driver, the last one with the caveat that RGB24 is transmitted on the wire
with one format and stored in memory with a different one.

Series based on top of the most recent media master branch.

Thanks
  j

v1->v2:
- Remove per-SoC handling in CSI bridge and only use image formats
- Add TODO note to the staging driver
- Fix PIXEL_DUAL mode comments for imx-mipi-csis
- Add output format translation to imx-mipi-csis to handle RGB24

Jacopo Mondi (7):
  media: imx: De-stage imx7-mipi-csis
  media: imx: Rename imx7-mipi-csis.c to imx-mipi-csis.c
  media: imx: imx7-media-csi: Use dual sampling for YUV 1X16
  media: imx: imx-mipi-csis: Set PIXEL_MODE for YUV422
  media: imx: imx-mipi-csis: Add RGB565_1X16
  media: imx: imx-mipi-csis: Add BGR888
  media: imx: imx-mipi-csis: Add output format

 Documentation/admin-guide/media/imx7.rst      |  2 +-
 ...-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} |  2 +-
 MAINTAINERS                                   |  4 +-
 drivers/media/platform/Kconfig                |  1 +
 drivers/media/platform/Makefile               |  1 +
 drivers/media/platform/imx/Kconfig            | 24 ++++++++
 drivers/media/platform/imx/Makefile           |  1 +
 .../platform/imx/imx-mipi-csis.c}             | 59 +++++++++++++++++--
 drivers/staging/media/imx/Makefile            |  1 -
 drivers/staging/media/imx/TODO                | 26 ++++++++
 drivers/staging/media/imx/imx7-media-csi.c    |  8 ++-
 11 files changed, 117 insertions(+), 12 deletions(-)
 rename Documentation/devicetree/bindings/media/{nxp,imx7-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} (98%)
 create mode 100644 drivers/media/platform/imx/Kconfig
 create mode 100644 drivers/media/platform/imx/Makefile
 rename drivers/{staging/media/imx/imx7-mipi-csis.c => media/platform/imx/imx-mipi-csis.c} (95%)

--
2.35.0

Comments

Laurent Pinchart Feb. 20, 2022, 10:06 a.m. UTC | #1
Hi Jacopo,

On Fri, Feb 18, 2022 at 07:34:14PM +0100, Jacopo Mondi wrote:
> Hello
>   this series includes patches from two series previously sent:
> https://lore.kernel.org/linux-media/20220119112024.11339-1-jacopo@jmondi.org/
> https://lore.kernel.org/linux-media/20220211180216.290133-1-jacopo@jmondi.org/
> v1:
> https://lore.kernel.org/linux-media/20220214184318.409208-1-jacopo@jmondi.org/T/#t
> 
> Which can now be marked as superseded.
> 
> The first 2 patches performs the de-staging of the imx7-mipi-csis driver and
> are now reviewed.
> 
> The rest of the series builds on top of the comment received on:
> https://lore.kernel.org/linux-media/20220119112024.11339-3-jacopo@jmondi.org/
> 
> If DUAL pixel mode is used in the CSIS driver, then the CSI block of the IMX8MM
> SoC needs to be operated in dual mode as well. To do so, use the image format
> sample size to determine in the CSI bridge if dual or single mode should be
> used.
> 
> Laurent could you test on MM to see if it works now ?

Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # On i.MX8MM

with and without the changes I've proposed in the reviews.

Have you tested 3/7 on an i.MX8MQ ?

> On top two small patches I was carrying in my tree to add more formats to the
> CSIS driver, the last one with the caveat that RGB24 is transmitted on the wire
> with one format and stored in memory with a different one.
> 
> Series based on top of the most recent media master branch.
> 
> Thanks
>   j
> 
> v1->v2:
> - Remove per-SoC handling in CSI bridge and only use image formats
> - Add TODO note to the staging driver
> - Fix PIXEL_DUAL mode comments for imx-mipi-csis
> - Add output format translation to imx-mipi-csis to handle RGB24
> 
> Jacopo Mondi (7):
>   media: imx: De-stage imx7-mipi-csis
>   media: imx: Rename imx7-mipi-csis.c to imx-mipi-csis.c
>   media: imx: imx7-media-csi: Use dual sampling for YUV 1X16
>   media: imx: imx-mipi-csis: Set PIXEL_MODE for YUV422
>   media: imx: imx-mipi-csis: Add RGB565_1X16
>   media: imx: imx-mipi-csis: Add BGR888
>   media: imx: imx-mipi-csis: Add output format
> 
>  Documentation/admin-guide/media/imx7.rst      |  2 +-
>  ...-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} |  2 +-
>  MAINTAINERS                                   |  4 +-
>  drivers/media/platform/Kconfig                |  1 +
>  drivers/media/platform/Makefile               |  1 +
>  drivers/media/platform/imx/Kconfig            | 24 ++++++++
>  drivers/media/platform/imx/Makefile           |  1 +
>  .../platform/imx/imx-mipi-csis.c}             | 59 +++++++++++++++++--
>  drivers/staging/media/imx/Makefile            |  1 -
>  drivers/staging/media/imx/TODO                | 26 ++++++++
>  drivers/staging/media/imx/imx7-media-csi.c    |  8 ++-
>  11 files changed, 117 insertions(+), 12 deletions(-)
>  rename Documentation/devicetree/bindings/media/{nxp,imx7-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} (98%)
>  create mode 100644 drivers/media/platform/imx/Kconfig
>  create mode 100644 drivers/media/platform/imx/Makefile
>  rename drivers/{staging/media/imx/imx7-mipi-csis.c => media/platform/imx/imx-mipi-csis.c} (95%)
Adam Ford Feb. 20, 2022, 6:19 p.m. UTC | #2
On Sun, Feb 20, 2022 at 8:56 AM Jacopo Mondi <jacopo@jmondi.org> wrote:
>
> Hello
>   this series includes patches from two series previously sent:
> https://lore.kernel.org/linux-media/20220119112024.11339-1-jacopo@jmondi.org/
> https://lore.kernel.org/linux-media/20220211180216.290133-1-jacopo@jmondi.org/
> v1:
> https://lore.kernel.org/linux-media/20220214184318.409208-1-jacopo@jmondi.org/T/#t
>
> Which can now be marked as superseded.
>
> The first 2 patches performs the de-staging of the imx7-mipi-csis driver and
> are now reviewed.
>
> The rest of the series builds on top of the comment received on:
> https://lore.kernel.org/linux-media/20220119112024.11339-3-jacopo@jmondi.org/
>
> If DUAL pixel mode is used in the CSIS driver, then the CSI block of the IMX8MM
> SoC needs to be operated in dual mode as well. To do so, use the image format
> sample size to determine in the CSI bridge if dual or single mode should be
> used.
>
> Laurent could you test on MM to see if it works now ?

Jacopo,

Do you have a repo I can clone?  If not, I need to know which branch
to apply to the series. I have an 8MM with an OV5640, and I'm willing
to test if Laurent can't.

adam
>
> On top two small patches I was carrying in my tree to add more formats to the
> CSIS driver, the last one with the caveat that RGB24 is transmitted on the wire
> with one format and stored in memory with a different one.
>
> Series based on top of the most recent media master branch.
>
> Thanks
>   j
>
> v1->v2:
> - Remove per-SoC handling in CSI bridge and only use image formats
> - Add TODO note to the staging driver
> - Fix PIXEL_DUAL mode comments for imx-mipi-csis
> - Add output format translation to imx-mipi-csis to handle RGB24
>
> Jacopo Mondi (7):
>   media: imx: De-stage imx7-mipi-csis
>   media: imx: Rename imx7-mipi-csis.c to imx-mipi-csis.c
>   media: imx: imx7-media-csi: Use dual sampling for YUV 1X16
>   media: imx: imx-mipi-csis: Set PIXEL_MODE for YUV422
>   media: imx: imx-mipi-csis: Add RGB565_1X16
>   media: imx: imx-mipi-csis: Add BGR888
>   media: imx: imx-mipi-csis: Add output format
>
>  Documentation/admin-guide/media/imx7.rst      |  2 +-
>  ...-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} |  2 +-
>  MAINTAINERS                                   |  4 +-
>  drivers/media/platform/Kconfig                |  1 +
>  drivers/media/platform/Makefile               |  1 +
>  drivers/media/platform/imx/Kconfig            | 24 ++++++++
>  drivers/media/platform/imx/Makefile           |  1 +
>  .../platform/imx/imx-mipi-csis.c}             | 59 +++++++++++++++++--
>  drivers/staging/media/imx/Makefile            |  1 -
>  drivers/staging/media/imx/TODO                | 26 ++++++++
>  drivers/staging/media/imx/imx7-media-csi.c    |  8 ++-
>  11 files changed, 117 insertions(+), 12 deletions(-)
>  rename Documentation/devicetree/bindings/media/{nxp,imx7-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} (98%)
>  create mode 100644 drivers/media/platform/imx/Kconfig
>  create mode 100644 drivers/media/platform/imx/Makefile
>  rename drivers/{staging/media/imx/imx7-mipi-csis.c => media/platform/imx/imx-mipi-csis.c} (95%)
>
> --
> 2.35.0
>
Laurent Pinchart Feb. 20, 2022, 10:41 p.m. UTC | #3
Hi Adam,

On Sun, Feb 20, 2022 at 12:19:30PM -0600, Adam Ford wrote:
> On Sun, Feb 20, 2022 at 8:56 AM Jacopo Mondi <jacopo@jmondi.org> wrote:
> >
> > Hello
> >   this series includes patches from two series previously sent:
> > https://lore.kernel.org/linux-media/20220119112024.11339-1-jacopo@jmondi.org/
> > https://lore.kernel.org/linux-media/20220211180216.290133-1-jacopo@jmondi.org/
> > v1:
> > https://lore.kernel.org/linux-media/20220214184318.409208-1-jacopo@jmondi.org/T/#t
> >
> > Which can now be marked as superseded.
> >
> > The first 2 patches performs the de-staging of the imx7-mipi-csis driver and
> > are now reviewed.
> >
> > The rest of the series builds on top of the comment received on:
> > https://lore.kernel.org/linux-media/20220119112024.11339-3-jacopo@jmondi.org/
> >
> > If DUAL pixel mode is used in the CSIS driver, then the CSI block of the IMX8MM
> > SoC needs to be operated in dual mode as well. To do so, use the image format
> > sample size to determine in the CSI bridge if dual or single mode should be
> > used.
> >
> > Laurent could you test on MM to see if it works now ?
> 
> Jacopo,
> 
> Do you have a repo I can clone?  If not, I need to know which branch
> to apply to the series. I have an 8MM with an OV5640, and I'm willing
> to test if Laurent can't.

I've applied the patches on top of v5.17-rc4 plus a few backports, and
pushed the result to
https://gitlab.com/ideasonboard/nxp/linux/-/tree/pinchartl/v5.17/csis.

> > On top two small patches I was carrying in my tree to add more formats to the
> > CSIS driver, the last one with the caveat that RGB24 is transmitted on the wire
> > with one format and stored in memory with a different one.
> >
> > Series based on top of the most recent media master branch.
> >
> > Thanks
> >   j
> >
> > v1->v2:
> > - Remove per-SoC handling in CSI bridge and only use image formats
> > - Add TODO note to the staging driver
> > - Fix PIXEL_DUAL mode comments for imx-mipi-csis
> > - Add output format translation to imx-mipi-csis to handle RGB24
> >
> > Jacopo Mondi (7):
> >   media: imx: De-stage imx7-mipi-csis
> >   media: imx: Rename imx7-mipi-csis.c to imx-mipi-csis.c
> >   media: imx: imx7-media-csi: Use dual sampling for YUV 1X16
> >   media: imx: imx-mipi-csis: Set PIXEL_MODE for YUV422
> >   media: imx: imx-mipi-csis: Add RGB565_1X16
> >   media: imx: imx-mipi-csis: Add BGR888
> >   media: imx: imx-mipi-csis: Add output format
> >
> >  Documentation/admin-guide/media/imx7.rst      |  2 +-
> >  ...-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} |  2 +-
> >  MAINTAINERS                                   |  4 +-
> >  drivers/media/platform/Kconfig                |  1 +
> >  drivers/media/platform/Makefile               |  1 +
> >  drivers/media/platform/imx/Kconfig            | 24 ++++++++
> >  drivers/media/platform/imx/Makefile           |  1 +
> >  .../platform/imx/imx-mipi-csis.c}             | 59 +++++++++++++++++--
> >  drivers/staging/media/imx/Makefile            |  1 -
> >  drivers/staging/media/imx/TODO                | 26 ++++++++
> >  drivers/staging/media/imx/imx7-media-csi.c    |  8 ++-
> >  11 files changed, 117 insertions(+), 12 deletions(-)
> >  rename Documentation/devicetree/bindings/media/{nxp,imx7-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} (98%)
> >  create mode 100644 drivers/media/platform/imx/Kconfig
> >  create mode 100644 drivers/media/platform/imx/Makefile
> >  rename drivers/{staging/media/imx/imx7-mipi-csis.c => media/platform/imx/imx-mipi-csis.c} (95%)
Jacopo Mondi Feb. 21, 2022, 7:58 a.m. UTC | #4
Hi Adam, Laurent,

On Mon, Feb 21, 2022 at 12:41:45AM +0200, Laurent Pinchart wrote:
> Hi Adam,
>
> On Sun, Feb 20, 2022 at 12:19:30PM -0600, Adam Ford wrote:
> > On Sun, Feb 20, 2022 at 8:56 AM Jacopo Mondi <jacopo@jmondi.org> wrote:
> > >
> > > Hello
> > >   this series includes patches from two series previously sent:
> > > https://lore.kernel.org/linux-media/20220119112024.11339-1-jacopo@jmondi.org/
> > > https://lore.kernel.org/linux-media/20220211180216.290133-1-jacopo@jmondi.org/
> > > v1:
> > > https://lore.kernel.org/linux-media/20220214184318.409208-1-jacopo@jmondi.org/T/#t
> > >
> > > Which can now be marked as superseded.
> > >
> > > The first 2 patches performs the de-staging of the imx7-mipi-csis driver and
> > > are now reviewed.
> > >
> > > The rest of the series builds on top of the comment received on:
> > > https://lore.kernel.org/linux-media/20220119112024.11339-3-jacopo@jmondi.org/
> > >
> > > If DUAL pixel mode is used in the CSIS driver, then the CSI block of the IMX8MM
> > > SoC needs to be operated in dual mode as well. To do so, use the image format
> > > sample size to determine in the CSI bridge if dual or single mode should be
> > > used.
> > >
> > > Laurent could you test on MM to see if it works now ?
> >
> > Jacopo,
> >
> > Do you have a repo I can clone?  If not, I need to know which branch
> > to apply to the series. I have an 8MM with an OV5640, and I'm willing
> > to test if Laurent can't.
>
> I've applied the patches on top of v5.17-rc4 plus a few backports, and
> pushed the result to
> https://gitlab.com/ideasonboard/nxp/linux/-/tree/pinchartl/v5.17/csis.
>

Oh, you've been slightly quicker then me :p

I was about to ask Adam if he was interested in a branch which also
contains
https://patchwork.linuxtv.org/project/linux-media/list/?series=7311

As he has an ov5640 :)

Adam, if you get here faster than me, please try Laurent's branch and
let me know. Otherwise I will provide a branch with a v3 of this
series and the ov5640 changes as well, if you're interested in testing
them.

Thanks
  j

> > > On top two small patches I was carrying in my tree to add more formats to the
> > > CSIS driver, the last one with the caveat that RGB24 is transmitted on the wire
> > > with one format and stored in memory with a different one.
> > >
> > > Series based on top of the most recent media master branch.
> > >
> > > Thanks
> > >   j
> > >
> > > v1->v2:
> > > - Remove per-SoC handling in CSI bridge and only use image formats
> > > - Add TODO note to the staging driver
> > > - Fix PIXEL_DUAL mode comments for imx-mipi-csis
> > > - Add output format translation to imx-mipi-csis to handle RGB24
> > >
> > > Jacopo Mondi (7):
> > >   media: imx: De-stage imx7-mipi-csis
> > >   media: imx: Rename imx7-mipi-csis.c to imx-mipi-csis.c
> > >   media: imx: imx7-media-csi: Use dual sampling for YUV 1X16
> > >   media: imx: imx-mipi-csis: Set PIXEL_MODE for YUV422
> > >   media: imx: imx-mipi-csis: Add RGB565_1X16
> > >   media: imx: imx-mipi-csis: Add BGR888
> > >   media: imx: imx-mipi-csis: Add output format
> > >
> > >  Documentation/admin-guide/media/imx7.rst      |  2 +-
> > >  ...-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} |  2 +-
> > >  MAINTAINERS                                   |  4 +-
> > >  drivers/media/platform/Kconfig                |  1 +
> > >  drivers/media/platform/Makefile               |  1 +
> > >  drivers/media/platform/imx/Kconfig            | 24 ++++++++
> > >  drivers/media/platform/imx/Makefile           |  1 +
> > >  .../platform/imx/imx-mipi-csis.c}             | 59 +++++++++++++++++--
> > >  drivers/staging/media/imx/Makefile            |  1 -
> > >  drivers/staging/media/imx/TODO                | 26 ++++++++
> > >  drivers/staging/media/imx/imx7-media-csi.c    |  8 ++-
> > >  11 files changed, 117 insertions(+), 12 deletions(-)
> > >  rename Documentation/devicetree/bindings/media/{nxp,imx7-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} (98%)
> > >  create mode 100644 drivers/media/platform/imx/Kconfig
> > >  create mode 100644 drivers/media/platform/imx/Makefile
> > >  rename drivers/{staging/media/imx/imx7-mipi-csis.c => media/platform/imx/imx-mipi-csis.c} (95%)
>
> --
> Regards,
>
> Laurent Pinchart
Laurent Pinchart Feb. 21, 2022, 8:24 a.m. UTC | #5
Hi Jacopo,

On Mon, Feb 21, 2022 at 08:58:59AM +0100, Jacopo Mondi wrote:
> On Mon, Feb 21, 2022 at 12:41:45AM +0200, Laurent Pinchart wrote:
> > On Sun, Feb 20, 2022 at 12:19:30PM -0600, Adam Ford wrote:
> > > On Sun, Feb 20, 2022 at 8:56 AM Jacopo Mondi wrote:
> > > >
> > > > Hello
> > > >   this series includes patches from two series previously sent:
> > > > https://lore.kernel.org/linux-media/20220119112024.11339-1-jacopo@jmondi.org/
> > > > https://lore.kernel.org/linux-media/20220211180216.290133-1-jacopo@jmondi.org/
> > > > v1:
> > > > https://lore.kernel.org/linux-media/20220214184318.409208-1-jacopo@jmondi.org/T/#t
> > > >
> > > > Which can now be marked as superseded.
> > > >
> > > > The first 2 patches performs the de-staging of the imx7-mipi-csis driver and
> > > > are now reviewed.
> > > >
> > > > The rest of the series builds on top of the comment received on:
> > > > https://lore.kernel.org/linux-media/20220119112024.11339-3-jacopo@jmondi.org/
> > > >
> > > > If DUAL pixel mode is used in the CSIS driver, then the CSI block of the IMX8MM
> > > > SoC needs to be operated in dual mode as well. To do so, use the image format
> > > > sample size to determine in the CSI bridge if dual or single mode should be
> > > > used.
> > > >
> > > > Laurent could you test on MM to see if it works now ?
> > >
> > > Jacopo,
> > >
> > > Do you have a repo I can clone?  If not, I need to know which branch
> > > to apply to the series. I have an 8MM with an OV5640, and I'm willing
> > > to test if Laurent can't.
> >
> > I've applied the patches on top of v5.17-rc4 plus a few backports, and
> > pushed the result to
> > https://gitlab.com/ideasonboard/nxp/linux/-/tree/pinchartl/v5.17/csis.
> >
> 
> Oh, you've been slightly quicker then me :p
> 
> I was about to ask Adam if he was interested in a branch which also
> contains
> https://patchwork.linuxtv.org/project/linux-media/list/?series=7311
> 
> As he has an ov5640 :)

Do you mean
https://gitlab.com/ideasonboard/nxp/linux/-/tree/pinchartl/v5.17/sensors/ov5640/v2
? :-)

> Adam, if you get here faster than me, please try Laurent's branch and
> let me know. Otherwise I will provide a branch with a v3 of this
> series and the ov5640 changes as well, if you're interested in testing
> them.
> 
> Thanks
>   j
> 
> > > > On top two small patches I was carrying in my tree to add more formats to the
> > > > CSIS driver, the last one with the caveat that RGB24 is transmitted on the wire
> > > > with one format and stored in memory with a different one.
> > > >
> > > > Series based on top of the most recent media master branch.
> > > >
> > > > Thanks
> > > >   j
> > > >
> > > > v1->v2:
> > > > - Remove per-SoC handling in CSI bridge and only use image formats
> > > > - Add TODO note to the staging driver
> > > > - Fix PIXEL_DUAL mode comments for imx-mipi-csis
> > > > - Add output format translation to imx-mipi-csis to handle RGB24
> > > >
> > > > Jacopo Mondi (7):
> > > >   media: imx: De-stage imx7-mipi-csis
> > > >   media: imx: Rename imx7-mipi-csis.c to imx-mipi-csis.c
> > > >   media: imx: imx7-media-csi: Use dual sampling for YUV 1X16
> > > >   media: imx: imx-mipi-csis: Set PIXEL_MODE for YUV422
> > > >   media: imx: imx-mipi-csis: Add RGB565_1X16
> > > >   media: imx: imx-mipi-csis: Add BGR888
> > > >   media: imx: imx-mipi-csis: Add output format
> > > >
> > > >  Documentation/admin-guide/media/imx7.rst      |  2 +-
> > > >  ...-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} |  2 +-
> > > >  MAINTAINERS                                   |  4 +-
> > > >  drivers/media/platform/Kconfig                |  1 +
> > > >  drivers/media/platform/Makefile               |  1 +
> > > >  drivers/media/platform/imx/Kconfig            | 24 ++++++++
> > > >  drivers/media/platform/imx/Makefile           |  1 +
> > > >  .../platform/imx/imx-mipi-csis.c}             | 59 +++++++++++++++++--
> > > >  drivers/staging/media/imx/Makefile            |  1 -
> > > >  drivers/staging/media/imx/TODO                | 26 ++++++++
> > > >  drivers/staging/media/imx/imx7-media-csi.c    |  8 ++-
> > > >  11 files changed, 117 insertions(+), 12 deletions(-)
> > > >  rename Documentation/devicetree/bindings/media/{nxp,imx7-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} (98%)
> > > >  create mode 100644 drivers/media/platform/imx/Kconfig
> > > >  create mode 100644 drivers/media/platform/imx/Makefile
> > > >  rename drivers/{staging/media/imx/imx7-mipi-csis.c => media/platform/imx/imx-mipi-csis.c} (95%)
Jacopo Mondi Feb. 21, 2022, 8:46 a.m. UTC | #6
Hi Laurent,

On Mon, Feb 21, 2022 at 10:24:32AM +0200, Laurent Pinchart wrote:
> Hi Jacopo,
>
> On Mon, Feb 21, 2022 at 08:58:59AM +0100, Jacopo Mondi wrote:
> > On Mon, Feb 21, 2022 at 12:41:45AM +0200, Laurent Pinchart wrote:
> > > On Sun, Feb 20, 2022 at 12:19:30PM -0600, Adam Ford wrote:
> > > > On Sun, Feb 20, 2022 at 8:56 AM Jacopo Mondi wrote:
> > > > >
> > > > > Hello
> > > > >   this series includes patches from two series previously sent:
> > > > > https://lore.kernel.org/linux-media/20220119112024.11339-1-jacopo@jmondi.org/
> > > > > https://lore.kernel.org/linux-media/20220211180216.290133-1-jacopo@jmondi.org/
> > > > > v1:
> > > > > https://lore.kernel.org/linux-media/20220214184318.409208-1-jacopo@jmondi.org/T/#t
> > > > >
> > > > > Which can now be marked as superseded.
> > > > >
> > > > > The first 2 patches performs the de-staging of the imx7-mipi-csis driver and
> > > > > are now reviewed.
> > > > >
> > > > > The rest of the series builds on top of the comment received on:
> > > > > https://lore.kernel.org/linux-media/20220119112024.11339-3-jacopo@jmondi.org/
> > > > >
> > > > > If DUAL pixel mode is used in the CSIS driver, then the CSI block of the IMX8MM
> > > > > SoC needs to be operated in dual mode as well. To do so, use the image format
> > > > > sample size to determine in the CSI bridge if dual or single mode should be
> > > > > used.
> > > > >
> > > > > Laurent could you test on MM to see if it works now ?
> > > >
> > > > Jacopo,
> > > >
> > > > Do you have a repo I can clone?  If not, I need to know which branch
> > > > to apply to the series. I have an 8MM with an OV5640, and I'm willing
> > > > to test if Laurent can't.
> > >
> > > I've applied the patches on top of v5.17-rc4 plus a few backports, and
> > > pushed the result to
> > > https://gitlab.com/ideasonboard/nxp/linux/-/tree/pinchartl/v5.17/csis.
> > >
> >
> > Oh, you've been slightly quicker then me :p
> >
> > I was about to ask Adam if he was interested in a branch which also
> > contains
> > https://patchwork.linuxtv.org/project/linux-media/list/?series=7311
> >
> > As he has an ov5640 :)
>
> Do you mean
> https://gitlab.com/ideasonboard/nxp/linux/-/tree/pinchartl/v5.17/sensors/ov5640/v2
> ? :-)

Almost! Your branch does not contain csis changes.

I'll provide Adam a branch with csis-v3 + ov5640 on top once the
few questions I have on csis v2 have been clarified.

>
> > Adam, if you get here faster than me, please try Laurent's branch and
> > let me know. Otherwise I will provide a branch with a v3 of this
> > series and the ov5640 changes as well, if you're interested in testing
> > them.
> >
> > Thanks
> >   j
> >
> > > > > On top two small patches I was carrying in my tree to add more formats to the
> > > > > CSIS driver, the last one with the caveat that RGB24 is transmitted on the wire
> > > > > with one format and stored in memory with a different one.
> > > > >
> > > > > Series based on top of the most recent media master branch.
> > > > >
> > > > > Thanks
> > > > >   j
> > > > >
> > > > > v1->v2:
> > > > > - Remove per-SoC handling in CSI bridge and only use image formats
> > > > > - Add TODO note to the staging driver
> > > > > - Fix PIXEL_DUAL mode comments for imx-mipi-csis
> > > > > - Add output format translation to imx-mipi-csis to handle RGB24
> > > > >
> > > > > Jacopo Mondi (7):
> > > > >   media: imx: De-stage imx7-mipi-csis
> > > > >   media: imx: Rename imx7-mipi-csis.c to imx-mipi-csis.c
> > > > >   media: imx: imx7-media-csi: Use dual sampling for YUV 1X16
> > > > >   media: imx: imx-mipi-csis: Set PIXEL_MODE for YUV422
> > > > >   media: imx: imx-mipi-csis: Add RGB565_1X16
> > > > >   media: imx: imx-mipi-csis: Add BGR888
> > > > >   media: imx: imx-mipi-csis: Add output format
> > > > >
> > > > >  Documentation/admin-guide/media/imx7.rst      |  2 +-
> > > > >  ...-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} |  2 +-
> > > > >  MAINTAINERS                                   |  4 +-
> > > > >  drivers/media/platform/Kconfig                |  1 +
> > > > >  drivers/media/platform/Makefile               |  1 +
> > > > >  drivers/media/platform/imx/Kconfig            | 24 ++++++++
> > > > >  drivers/media/platform/imx/Makefile           |  1 +
> > > > >  .../platform/imx/imx-mipi-csis.c}             | 59 +++++++++++++++++--
> > > > >  drivers/staging/media/imx/Makefile            |  1 -
> > > > >  drivers/staging/media/imx/TODO                | 26 ++++++++
> > > > >  drivers/staging/media/imx/imx7-media-csi.c    |  8 ++-
> > > > >  11 files changed, 117 insertions(+), 12 deletions(-)
> > > > >  rename Documentation/devicetree/bindings/media/{nxp,imx7-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} (98%)
> > > > >  create mode 100644 drivers/media/platform/imx/Kconfig
> > > > >  create mode 100644 drivers/media/platform/imx/Makefile
> > > > >  rename drivers/{staging/media/imx/imx7-mipi-csis.c => media/platform/imx/imx-mipi-csis.c} (95%)
>
> --
> Regards,
>
> Laurent Pinchart
Adam Ford Feb. 21, 2022, 1:36 p.m. UTC | #7
On Mon, Feb 21, 2022 at 2:24 AM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Jacopo,
>
> On Mon, Feb 21, 2022 at 08:58:59AM +0100, Jacopo Mondi wrote:
> > On Mon, Feb 21, 2022 at 12:41:45AM +0200, Laurent Pinchart wrote:
> > > On Sun, Feb 20, 2022 at 12:19:30PM -0600, Adam Ford wrote:
> > > > On Sun, Feb 20, 2022 at 8:56 AM Jacopo Mondi wrote:
> > > > >
> > > > > Hello
> > > > >   this series includes patches from two series previously sent:
> > > > > https://lore.kernel.org/linux-media/20220119112024.11339-1-jacopo@jmondi.org/
> > > > > https://lore.kernel.org/linux-media/20220211180216.290133-1-jacopo@jmondi.org/
> > > > > v1:
> > > > > https://lore.kernel.org/linux-media/20220214184318.409208-1-jacopo@jmondi.org/T/#t
> > > > >
> > > > > Which can now be marked as superseded.
> > > > >
> > > > > The first 2 patches performs the de-staging of the imx7-mipi-csis driver and
> > > > > are now reviewed.
> > > > >
> > > > > The rest of the series builds on top of the comment received on:
> > > > > https://lore.kernel.org/linux-media/20220119112024.11339-3-jacopo@jmondi.org/
> > > > >
> > > > > If DUAL pixel mode is used in the CSIS driver, then the CSI block of the IMX8MM
> > > > > SoC needs to be operated in dual mode as well. To do so, use the image format
> > > > > sample size to determine in the CSI bridge if dual or single mode should be
> > > > > used.
> > > > >
> > > > > Laurent could you test on MM to see if it works now ?
> > > >
> > > > Jacopo,
> > > >
> > > > Do you have a repo I can clone?  If not, I need to know which branch
> > > > to apply to the series. I have an 8MM with an OV5640, and I'm willing
> > > > to test if Laurent can't.
> > >
> > > I've applied the patches on top of v5.17-rc4 plus a few backports, and
> > > pushed the result to
> > > https://gitlab.com/ideasonboard/nxp/linux/-/tree/pinchartl/v5.17/csis.
> > >
> >
> > Oh, you've been slightly quicker then me :p
> >
> > I was about to ask Adam if he was interested in a branch which also
> > contains
> > https://patchwork.linuxtv.org/project/linux-media/list/?series=7311
> >
> > As he has an ov5640 :)
>
> Do you mean
> https://gitlab.com/ideasonboard/nxp/linux/-/tree/pinchartl/v5.17/sensors/ov5640/v2
> ? :-)
>
> > Adam, if you get here faster than me, please try Laurent's branch and
> > let me know. Otherwise I will provide a branch with a v3 of this
> > series and the ov5640 changes as well, if you're interested in testing
> > them.

I should be able to get to this today.  Are there specific resolutions
or formats you want me to test?  I assume I should test the new ones,
but I wasn't if there were some that were less confident.

adam
> >
> > Thanks
> >   j
> >
> > > > > On top two small patches I was carrying in my tree to add more formats to the
> > > > > CSIS driver, the last one with the caveat that RGB24 is transmitted on the wire
> > > > > with one format and stored in memory with a different one.
> > > > >
> > > > > Series based on top of the most recent media master branch.
> > > > >
> > > > > Thanks
> > > > >   j
> > > > >
> > > > > v1->v2:
> > > > > - Remove per-SoC handling in CSI bridge and only use image formats
> > > > > - Add TODO note to the staging driver
> > > > > - Fix PIXEL_DUAL mode comments for imx-mipi-csis
> > > > > - Add output format translation to imx-mipi-csis to handle RGB24
> > > > >
> > > > > Jacopo Mondi (7):
> > > > >   media: imx: De-stage imx7-mipi-csis
> > > > >   media: imx: Rename imx7-mipi-csis.c to imx-mipi-csis.c
> > > > >   media: imx: imx7-media-csi: Use dual sampling for YUV 1X16
> > > > >   media: imx: imx-mipi-csis: Set PIXEL_MODE for YUV422
> > > > >   media: imx: imx-mipi-csis: Add RGB565_1X16
> > > > >   media: imx: imx-mipi-csis: Add BGR888
> > > > >   media: imx: imx-mipi-csis: Add output format
> > > > >
> > > > >  Documentation/admin-guide/media/imx7.rst      |  2 +-
> > > > >  ...-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} |  2 +-
> > > > >  MAINTAINERS                                   |  4 +-
> > > > >  drivers/media/platform/Kconfig                |  1 +
> > > > >  drivers/media/platform/Makefile               |  1 +
> > > > >  drivers/media/platform/imx/Kconfig            | 24 ++++++++
> > > > >  drivers/media/platform/imx/Makefile           |  1 +
> > > > >  .../platform/imx/imx-mipi-csis.c}             | 59 +++++++++++++++++--
> > > > >  drivers/staging/media/imx/Makefile            |  1 -
> > > > >  drivers/staging/media/imx/TODO                | 26 ++++++++
> > > > >  drivers/staging/media/imx/imx7-media-csi.c    |  8 ++-
> > > > >  11 files changed, 117 insertions(+), 12 deletions(-)
> > > > >  rename Documentation/devicetree/bindings/media/{nxp,imx7-mipi-csi2.yaml => nxp,imx-mipi-csi2.yaml} (98%)
> > > > >  create mode 100644 drivers/media/platform/imx/Kconfig
> > > > >  create mode 100644 drivers/media/platform/imx/Makefile
> > > > >  rename drivers/{staging/media/imx/imx7-mipi-csis.c => media/platform/imx/imx-mipi-csis.c} (95%)
>
> --
> Regards,
>
> Laurent Pinchart