mbox series

[v3,0/4] Converter R-Car DU to the DRM bridge connector helper

Message ID 20210520065046.28978-1-laurent.pinchart+renesas@ideasonboard.com (mailing list archive)
Headers show
Series Converter R-Car DU to the DRM bridge connector helper | expand

Message

Laurent Pinchart May 20, 2021, 6:50 a.m. UTC
Hello,

This patch series converts the R-Car DU driver to use the DRM bridge
connector helper drm_bridge_connector_init().

The bulk of the v1 series was converting the adv7511, simple-bridge and
dw-hdmi drivers to make connector creation optional (through the
DRM_BRIDGE_ATTACH_NO_CONNECTOR flag), and have already been merged. v2
included the remaining patches and has bitrotten. v3 rebased the code
and should be ready for merge.

Patch 1/4 adds support to the dw-hdmi driver to attach to a downstream
bridge if one is specified in DT. As the DT port number corresponding to
the video output differs between platforms that integrate the dw-hdmi
(some of them even don't have a video output port, which should probably
be fixed, but that's out of scope for this series), the port number has
to be specified by the platform glue layer.

Patch 2/4 then addresses the rcar-lvds driver. Instead of implementing
direct support for DRM_BRIDGE_ATTACH_NO_CONNECTOR, it simply removes
code that shouldn't have been in the driver in the first place by
switching to the panel bridge helper.

Patch 3/4 specifies the port number in the R-Car dw-hdmi glue layer, as
required by 1/4.

Patch 4/4 finally makes use of the drm_bridge_connector_init() helper.

The series has been tested on the Renesas R-Car Salvator-XS and Draak
boards with the VGA, HDMI and LVDS outputs.

Laurent Pinchart (4):
  drm: bridge: dw-hdmi: Attach to next bridge if available
  drm: rcar-du: lvds: Convert to DRM panel bridge helper
  drm: rcar-du: dw-hdmi: Set output port number
  drm: rcar-du: Use drm_bridge_connector_init() helper

 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c |  54 +++++++++-
 drivers/gpu/drm/rcar-du/rcar_du_encoder.c |  26 ++++-
 drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c    |   1 +
 drivers/gpu/drm/rcar-du/rcar_lvds.c       | 120 +++-------------------
 include/drm/bridge/dw_hdmi.h              |   2 +
 5 files changed, 89 insertions(+), 114 deletions(-)

Comments

Kieran Bingham June 22, 2021, 9:53 p.m. UTC | #1
Hi Laurent,

On 20/05/2021 07:50, Laurent Pinchart wrote:
> Hello,
> 
> This patch series converts the R-Car DU driver to use the DRM bridge
> connector helper drm_bridge_connector_init().
> 
> The bulk of the v1 series was converting the adv7511, simple-bridge and
> dw-hdmi drivers to make connector creation optional (through the
> DRM_BRIDGE_ATTACH_NO_CONNECTOR flag), and have already been merged. v2
> included the remaining patches and has bitrotten. v3 rebased the code
> and should be ready for merge.
> 
> Patch 1/4 adds support to the dw-hdmi driver to attach to a downstream
> bridge if one is specified in DT. As the DT port number corresponding to
> the video output differs between platforms that integrate the dw-hdmi
> (some of them even don't have a video output port, which should probably
> be fixed, but that's out of scope for this series), the port number has
> to be specified by the platform glue layer.
> 
> Patch 2/4 then addresses the rcar-lvds driver. Instead of implementing
> direct support for DRM_BRIDGE_ATTACH_NO_CONNECTOR, it simply removes
> code that shouldn't have been in the driver in the first place by
> switching to the panel bridge helper.
> 
> Patch 3/4 specifies the port number in the R-Car dw-hdmi glue layer, as
> required by 1/4.
> 
> Patch 4/4 finally makes use of the drm_bridge_connector_init() helper.
> 
> The series has been tested on the Renesas R-Car Salvator-XS and Draak
> boards with the VGA, HDMI and LVDS outputs.

I'll start here,

This series fixes the connector issue I had on V3U, and removes the need
for me to carry a workaround. So that's excellent ;-)

For the series,

Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com> (on V3U)

> 
> Laurent Pinchart (4):
>   drm: bridge: dw-hdmi: Attach to next bridge if available
>   drm: rcar-du: lvds: Convert to DRM panel bridge helper
>   drm: rcar-du: dw-hdmi: Set output port number
>   drm: rcar-du: Use drm_bridge_connector_init() helper
> 
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c |  54 +++++++++-
>  drivers/gpu/drm/rcar-du/rcar_du_encoder.c |  26 ++++-
>  drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c    |   1 +
>  drivers/gpu/drm/rcar-du/rcar_lvds.c       | 120 +++-------------------
>  include/drm/bridge/dw_hdmi.h              |   2 +
>  5 files changed, 89 insertions(+), 114 deletions(-)
>