mbox series

[00/21] drm: mxsfb: Add i.MX7 support

Message ID 20200309195216.31042-1-laurent.pinchart@ideasonboard.com (mailing list archive)
Headers show
Series drm: mxsfb: Add i.MX7 support | expand

Message

Laurent Pinchart March 9, 2020, 7:51 p.m. UTC
Hello,

This patch series adds i.MX7 support to the mxsfb driver. The eLCDIF
instance found in the i.MX7 is backward-compatible with the already
supported LCDC v4, but has extended features amongst which the most
notable one is a second plane.

The first 9 patches (01/21 to 09/21) contain miscellaneous cleanups and
refactoring to prepare for what is to come. Patch 10/21 starts the real
work with removal of the DRM simple display pipeline helper, as it
doesn't support multiple planes. The next patch (11/21) is an additional
cleanup.

Patches 12/21 to 14/21 fix vblank handling that I found to be broken
when testing on my device. Patch 15/21 then performs an additional small
cleanup, and patch 16/21 starts official support for i.MX7 by mentioning
it in Kconfig.

Patch 17/21 adds a new device model for the i.MX6SX and i.MX7 eLCDIF.
After three additional cleanups in patches 18/21 to 20/21, patch 21/21
finally adds support for the second plane.

The code is based on drm-misc-next and has been tested on an i.MX7D
platform with a DPI panel.

Laurent Pinchart (21):
  drm: mxsfb: Remove fbdev leftovers
  drm: mxsfb: Use drm_panel_bridge
  drm: mxsfb: Use BIT() macro to define register bitfields
  drm: mxsfb: Remove unused macros from mxsfb_regs.h
  drm: mxsfb: Clarify format and bus width configuration
  drm: mxsfb: Pass mxsfb_drm_private pointer to mxsfb_reset_block()
  drm: mxsfb: Use LCDC_CTRL register name explicitly
  drm: mxsfb: Remove register definitions from mxsfb_crtc.c
  drm: mxsfb: Remove unneeded includes
  drm: mxsfb: Stop using DRM simple display pipeline helper
  drm: mxsfb: Rename mxsfb_crtc.c to mxsfb_kms.c
  drm: mxsfb: Move vblank event arm to CRTC .atomic_flush()
  drm: mxsfb: Don't touch AXI clock in IRQ context
  drm: mxsfb: Enable vblank handling
  drm: mxsfb: Remove mxsfb_devdata unused fields
  drm: mxsfb: Add i.MX7 to the list of supported SoCs in Kconfig
  drm: mxsfb: Update internal IP version number for i.MX6SX
  drm: mxsfb: Drop non-OF support
  drm: mxsfb: Turn mxsfb_set_pixel_fmt() into a void function
  drm: mxsfb: Merge mxsfb_set_pixel_fmt() and mxsfb_set_bus_fmt()
  drm: mxsfb: Support the alpha plane

 drivers/gpu/drm/mxsfb/Kconfig      |   4 +-
 drivers/gpu/drm/mxsfb/Makefile     |   2 +-
 drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 343 -----------------
 drivers/gpu/drm/mxsfb/mxsfb_drv.c  | 246 ++++---------
 drivers/gpu/drm/mxsfb/mxsfb_drv.h  |  42 ++-
 drivers/gpu/drm/mxsfb/mxsfb_kms.c  | 565 +++++++++++++++++++++++++++++
 drivers/gpu/drm/mxsfb/mxsfb_out.c  |  99 -----
 drivers/gpu/drm/mxsfb/mxsfb_regs.h | 107 +++---
 8 files changed, 730 insertions(+), 678 deletions(-)
 delete mode 100644 drivers/gpu/drm/mxsfb/mxsfb_crtc.c
 create mode 100644 drivers/gpu/drm/mxsfb/mxsfb_kms.c
 delete mode 100644 drivers/gpu/drm/mxsfb/mxsfb_out.c

Comments

Laurent Pinchart March 19, 2020, 9:36 a.m. UTC | #1
Hello,

Gentle ping.

On Mon, Mar 09, 2020 at 09:51:55PM +0200, Laurent Pinchart wrote:
> Hello,
> 
> This patch series adds i.MX7 support to the mxsfb driver. The eLCDIF
> instance found in the i.MX7 is backward-compatible with the already
> supported LCDC v4, but has extended features amongst which the most
> notable one is a second plane.
> 
> The first 9 patches (01/21 to 09/21) contain miscellaneous cleanups and
> refactoring to prepare for what is to come. Patch 10/21 starts the real
> work with removal of the DRM simple display pipeline helper, as it
> doesn't support multiple planes. The next patch (11/21) is an additional
> cleanup.
> 
> Patches 12/21 to 14/21 fix vblank handling that I found to be broken
> when testing on my device. Patch 15/21 then performs an additional small
> cleanup, and patch 16/21 starts official support for i.MX7 by mentioning
> it in Kconfig.
> 
> Patch 17/21 adds a new device model for the i.MX6SX and i.MX7 eLCDIF.
> After three additional cleanups in patches 18/21 to 20/21, patch 21/21
> finally adds support for the second plane.
> 
> The code is based on drm-misc-next and has been tested on an i.MX7D
> platform with a DPI panel.
> 
> Laurent Pinchart (21):
>   drm: mxsfb: Remove fbdev leftovers
>   drm: mxsfb: Use drm_panel_bridge
>   drm: mxsfb: Use BIT() macro to define register bitfields
>   drm: mxsfb: Remove unused macros from mxsfb_regs.h
>   drm: mxsfb: Clarify format and bus width configuration
>   drm: mxsfb: Pass mxsfb_drm_private pointer to mxsfb_reset_block()
>   drm: mxsfb: Use LCDC_CTRL register name explicitly
>   drm: mxsfb: Remove register definitions from mxsfb_crtc.c
>   drm: mxsfb: Remove unneeded includes
>   drm: mxsfb: Stop using DRM simple display pipeline helper
>   drm: mxsfb: Rename mxsfb_crtc.c to mxsfb_kms.c
>   drm: mxsfb: Move vblank event arm to CRTC .atomic_flush()
>   drm: mxsfb: Don't touch AXI clock in IRQ context
>   drm: mxsfb: Enable vblank handling
>   drm: mxsfb: Remove mxsfb_devdata unused fields
>   drm: mxsfb: Add i.MX7 to the list of supported SoCs in Kconfig
>   drm: mxsfb: Update internal IP version number for i.MX6SX
>   drm: mxsfb: Drop non-OF support
>   drm: mxsfb: Turn mxsfb_set_pixel_fmt() into a void function
>   drm: mxsfb: Merge mxsfb_set_pixel_fmt() and mxsfb_set_bus_fmt()
>   drm: mxsfb: Support the alpha plane
> 
>  drivers/gpu/drm/mxsfb/Kconfig      |   4 +-
>  drivers/gpu/drm/mxsfb/Makefile     |   2 +-
>  drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 343 -----------------
>  drivers/gpu/drm/mxsfb/mxsfb_drv.c  | 246 ++++---------
>  drivers/gpu/drm/mxsfb/mxsfb_drv.h  |  42 ++-
>  drivers/gpu/drm/mxsfb/mxsfb_kms.c  | 565 +++++++++++++++++++++++++++++
>  drivers/gpu/drm/mxsfb/mxsfb_out.c  |  99 -----
>  drivers/gpu/drm/mxsfb/mxsfb_regs.h | 107 +++---
>  8 files changed, 730 insertions(+), 678 deletions(-)
>  delete mode 100644 drivers/gpu/drm/mxsfb/mxsfb_crtc.c
>  create mode 100644 drivers/gpu/drm/mxsfb/mxsfb_kms.c
>  delete mode 100644 drivers/gpu/drm/mxsfb/mxsfb_out.c
Guido Günther April 12, 2020, 4:37 p.m. UTC | #2
Hi,
On Mon, Mar 09, 2020 at 09:51:55PM +0200, Laurent Pinchart wrote:
> Hello,
> 
> This patch series adds i.MX7 support to the mxsfb driver. The eLCDIF
> instance found in the i.MX7 is backward-compatible with the already
> supported LCDC v4, but has extended features amongst which the most
> notable one is a second plane.
> 
> The first 9 patches (01/21 to 09/21) contain miscellaneous cleanups and
> refactoring to prepare for what is to come. Patch 10/21 starts the real
> work with removal of the DRM simple display pipeline helper, as it
> doesn't support multiple planes. The next patch (11/21) is an additional
> cleanup.
> 
> Patches 12/21 to 14/21 fix vblank handling that I found to be broken
> when testing on my device. Patch 15/21 then performs an additional small
> cleanup, and patch 16/21 starts official support for i.MX7 by mentioning
> it in Kconfig.
> 
> Patch 17/21 adds a new device model for the i.MX6SX and i.MX7 eLCDIF.
> After three additional cleanups in patches 18/21 to 20/21, patch 21/21
> finally adds support for the second plane.
> 
> The code is based on drm-misc-next and has been tested on an i.MX7D
> platform with a DPI panel.

I've tested this with an imx8mq using both the current fsl,imx28-lcdif
and fsl,imx6sx-lcdif with the nwl DSI bridge and a dsi panel and both
worked well.
Cheers,
 -- Guido

> 
> Laurent Pinchart (21):
>   drm: mxsfb: Remove fbdev leftovers
>   drm: mxsfb: Use drm_panel_bridge
>   drm: mxsfb: Use BIT() macro to define register bitfields
>   drm: mxsfb: Remove unused macros from mxsfb_regs.h
>   drm: mxsfb: Clarify format and bus width configuration
>   drm: mxsfb: Pass mxsfb_drm_private pointer to mxsfb_reset_block()
>   drm: mxsfb: Use LCDC_CTRL register name explicitly
>   drm: mxsfb: Remove register definitions from mxsfb_crtc.c
>   drm: mxsfb: Remove unneeded includes
>   drm: mxsfb: Stop using DRM simple display pipeline helper
>   drm: mxsfb: Rename mxsfb_crtc.c to mxsfb_kms.c
>   drm: mxsfb: Move vblank event arm to CRTC .atomic_flush()
>   drm: mxsfb: Don't touch AXI clock in IRQ context
>   drm: mxsfb: Enable vblank handling
>   drm: mxsfb: Remove mxsfb_devdata unused fields
>   drm: mxsfb: Add i.MX7 to the list of supported SoCs in Kconfig
>   drm: mxsfb: Update internal IP version number for i.MX6SX
>   drm: mxsfb: Drop non-OF support
>   drm: mxsfb: Turn mxsfb_set_pixel_fmt() into a void function
>   drm: mxsfb: Merge mxsfb_set_pixel_fmt() and mxsfb_set_bus_fmt()
>   drm: mxsfb: Support the alpha plane
> 
>  drivers/gpu/drm/mxsfb/Kconfig      |   4 +-
>  drivers/gpu/drm/mxsfb/Makefile     |   2 +-
>  drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 343 -----------------
>  drivers/gpu/drm/mxsfb/mxsfb_drv.c  | 246 ++++---------
>  drivers/gpu/drm/mxsfb/mxsfb_drv.h  |  42 ++-
>  drivers/gpu/drm/mxsfb/mxsfb_kms.c  | 565 +++++++++++++++++++++++++++++
>  drivers/gpu/drm/mxsfb/mxsfb_out.c  |  99 -----
>  drivers/gpu/drm/mxsfb/mxsfb_regs.h | 107 +++---
>  8 files changed, 730 insertions(+), 678 deletions(-)
>  delete mode 100644 drivers/gpu/drm/mxsfb/mxsfb_crtc.c
>  create mode 100644 drivers/gpu/drm/mxsfb/mxsfb_kms.c
>  delete mode 100644 drivers/gpu/drm/mxsfb/mxsfb_out.c
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
Stefan Agner May 26, 2020, 3:13 p.m. UTC | #3
Hi Laurent,

On 2020-03-09 20:51, Laurent Pinchart wrote:
> Hello,
> 
> This patch series adds i.MX7 support to the mxsfb driver. The eLCDIF
> instance found in the i.MX7 is backward-compatible with the already
> supported LCDC v4, but has extended features amongst which the most
> notable one is a second plane.
> 
> The first 9 patches (01/21 to 09/21) contain miscellaneous cleanups and
> refactoring to prepare for what is to come. Patch 10/21 starts the real
> work with removal of the DRM simple display pipeline helper, as it
> doesn't support multiple planes. The next patch (11/21) is an additional
> cleanup.
> 
> Patches 12/21 to 14/21 fix vblank handling that I found to be broken
> when testing on my device. Patch 15/21 then performs an additional small
> cleanup, and patch 16/21 starts official support for i.MX7 by mentioning
> it in Kconfig.
> 
> Patch 17/21 adds a new device model for the i.MX6SX and i.MX7 eLCDIF.
> After three additional cleanups in patches 18/21 to 20/21, patch 21/21
> finally adds support for the second plane.
> 
> The code is based on drm-misc-next and has been tested on an i.MX7D
> platform with a DPI panel.

Did you plan to update this series? I guess some of the changes I could
already merge now.

--
Stefan

> 
> Laurent Pinchart (21):
>   drm: mxsfb: Remove fbdev leftovers
>   drm: mxsfb: Use drm_panel_bridge
>   drm: mxsfb: Use BIT() macro to define register bitfields
>   drm: mxsfb: Remove unused macros from mxsfb_regs.h
>   drm: mxsfb: Clarify format and bus width configuration
>   drm: mxsfb: Pass mxsfb_drm_private pointer to mxsfb_reset_block()
>   drm: mxsfb: Use LCDC_CTRL register name explicitly
>   drm: mxsfb: Remove register definitions from mxsfb_crtc.c
>   drm: mxsfb: Remove unneeded includes
>   drm: mxsfb: Stop using DRM simple display pipeline helper
>   drm: mxsfb: Rename mxsfb_crtc.c to mxsfb_kms.c
>   drm: mxsfb: Move vblank event arm to CRTC .atomic_flush()
>   drm: mxsfb: Don't touch AXI clock in IRQ context
>   drm: mxsfb: Enable vblank handling
>   drm: mxsfb: Remove mxsfb_devdata unused fields
>   drm: mxsfb: Add i.MX7 to the list of supported SoCs in Kconfig
>   drm: mxsfb: Update internal IP version number for i.MX6SX
>   drm: mxsfb: Drop non-OF support
>   drm: mxsfb: Turn mxsfb_set_pixel_fmt() into a void function
>   drm: mxsfb: Merge mxsfb_set_pixel_fmt() and mxsfb_set_bus_fmt()
>   drm: mxsfb: Support the alpha plane
> 
>  drivers/gpu/drm/mxsfb/Kconfig      |   4 +-
>  drivers/gpu/drm/mxsfb/Makefile     |   2 +-
>  drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 343 -----------------
>  drivers/gpu/drm/mxsfb/mxsfb_drv.c  | 246 ++++---------
>  drivers/gpu/drm/mxsfb/mxsfb_drv.h  |  42 ++-
>  drivers/gpu/drm/mxsfb/mxsfb_kms.c  | 565 +++++++++++++++++++++++++++++
>  drivers/gpu/drm/mxsfb/mxsfb_out.c  |  99 -----
>  drivers/gpu/drm/mxsfb/mxsfb_regs.h | 107 +++---
>  8 files changed, 730 insertions(+), 678 deletions(-)
>  delete mode 100644 drivers/gpu/drm/mxsfb/mxsfb_crtc.c
>  create mode 100644 drivers/gpu/drm/mxsfb/mxsfb_kms.c
>  delete mode 100644 drivers/gpu/drm/mxsfb/mxsfb_out.c
Laurent Pinchart May 30, 2020, 12:29 a.m. UTC | #4
Hi Stefan,

On Tue, May 26, 2020 at 05:13:42PM +0200, Stefan Agner wrote:
> On 2020-03-09 20:51, Laurent Pinchart wrote:
> > Hello,
> > 
> > This patch series adds i.MX7 support to the mxsfb driver. The eLCDIF
> > instance found in the i.MX7 is backward-compatible with the already
> > supported LCDC v4, but has extended features amongst which the most
> > notable one is a second plane.
> > 
> > The first 9 patches (01/21 to 09/21) contain miscellaneous cleanups and
> > refactoring to prepare for what is to come. Patch 10/21 starts the real
> > work with removal of the DRM simple display pipeline helper, as it
> > doesn't support multiple planes. The next patch (11/21) is an additional
> > cleanup.
> > 
> > Patches 12/21 to 14/21 fix vblank handling that I found to be broken
> > when testing on my device. Patch 15/21 then performs an additional small
> > cleanup, and patch 16/21 starts official support for i.MX7 by mentioning
> > it in Kconfig.
> > 
> > Patch 17/21 adds a new device model for the i.MX6SX and i.MX7 eLCDIF.
> > After three additional cleanups in patches 18/21 to 20/21, patch 21/21
> > finally adds support for the second plane.
> > 
> > The code is based on drm-misc-next and has been tested on an i.MX7D
> > platform with a DPI panel.
> 
> Did you plan to update this series? I guess some of the changes I could
> already merge now.

I'm resuming work on it now, will incorporate your review comments and
send a v2. Feel free to apply some of the changes already if you want
to.

> > Laurent Pinchart (21):
> >   drm: mxsfb: Remove fbdev leftovers
> >   drm: mxsfb: Use drm_panel_bridge
> >   drm: mxsfb: Use BIT() macro to define register bitfields
> >   drm: mxsfb: Remove unused macros from mxsfb_regs.h
> >   drm: mxsfb: Clarify format and bus width configuration
> >   drm: mxsfb: Pass mxsfb_drm_private pointer to mxsfb_reset_block()
> >   drm: mxsfb: Use LCDC_CTRL register name explicitly
> >   drm: mxsfb: Remove register definitions from mxsfb_crtc.c
> >   drm: mxsfb: Remove unneeded includes
> >   drm: mxsfb: Stop using DRM simple display pipeline helper
> >   drm: mxsfb: Rename mxsfb_crtc.c to mxsfb_kms.c
> >   drm: mxsfb: Move vblank event arm to CRTC .atomic_flush()
> >   drm: mxsfb: Don't touch AXI clock in IRQ context
> >   drm: mxsfb: Enable vblank handling
> >   drm: mxsfb: Remove mxsfb_devdata unused fields
> >   drm: mxsfb: Add i.MX7 to the list of supported SoCs in Kconfig
> >   drm: mxsfb: Update internal IP version number for i.MX6SX
> >   drm: mxsfb: Drop non-OF support
> >   drm: mxsfb: Turn mxsfb_set_pixel_fmt() into a void function
> >   drm: mxsfb: Merge mxsfb_set_pixel_fmt() and mxsfb_set_bus_fmt()
> >   drm: mxsfb: Support the alpha plane
> > 
> >  drivers/gpu/drm/mxsfb/Kconfig      |   4 +-
> >  drivers/gpu/drm/mxsfb/Makefile     |   2 +-
> >  drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 343 -----------------
> >  drivers/gpu/drm/mxsfb/mxsfb_drv.c  | 246 ++++---------
> >  drivers/gpu/drm/mxsfb/mxsfb_drv.h  |  42 ++-
> >  drivers/gpu/drm/mxsfb/mxsfb_kms.c  | 565 +++++++++++++++++++++++++++++
> >  drivers/gpu/drm/mxsfb/mxsfb_out.c  |  99 -----
> >  drivers/gpu/drm/mxsfb/mxsfb_regs.h | 107 +++---
> >  8 files changed, 730 insertions(+), 678 deletions(-)
> >  delete mode 100644 drivers/gpu/drm/mxsfb/mxsfb_crtc.c
> >  create mode 100644 drivers/gpu/drm/mxsfb/mxsfb_kms.c
> >  delete mode 100644 drivers/gpu/drm/mxsfb/mxsfb_out.c