[PATCH v3 11/50] drm/bridge: Add bridge driver for display connectors

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Dec 18 01:45:45 UTC 2019


Hi Tomi,

On Mon, Dec 16, 2019 at 03:11:23PM +0200, Tomi Valkeinen wrote:
> On 11/12/2019 00:57, Laurent Pinchart wrote:
> > Display connectors are modelled in DT as a device node, but have so far
> > been handled manually in several bridge drivers. This resulted in
> > duplicate code in several bridge drivers, with slightly different (and
> > thus confusing) logics.
> > 
> > In order to fix this, implement a bridge driver for display connectors.
> > The driver centralises logic for the DVI, HDMI, VGAn composite and
> > S-video connectors and exposes corresponding bridge operations.
> > 
> > This driver in itself doesn't solve the issue completely, changes in
> > bridge and display controller drivers are needed to make use of the new
> > connector driver.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > Reviewed-by: Maxime Ripard <mripard at kernel.org>
> > ---
> > Changes since v2:
> > 
> > - Fall back to polling if the GPIO IRQ chip doesn't support
> >    edge-triggered interrupts
> > 
> > Changes since v1:
> > 
> > - Use drm_get_connector_type_name() instead of open-coding
> >    display_connector_type_name()
> > - Remove empty .hpd_enable() and .hpd_disable() operations
> > - Set bridge.ddc
> > ---
> >   drivers/gpu/drm/bridge/Kconfig             |  11 +
> >   drivers/gpu/drm/bridge/Makefile            |   1 +
> >   drivers/gpu/drm/bridge/display-connector.c | 292 +++++++++++++++++++++
> >   3 files changed, 304 insertions(+)
> >   create mode 100644 drivers/gpu/drm/bridge/display-connector.c
> 
> <snip>
> 
> > +	dev_info(&pdev->dev,
> > +		 "Found %s display connector '%s' %s DDC bus and %s HPD GPIO (ops 0x%x)\n",
> > +		 drm_get_connector_type_name(conn->bridge.type),
> > +		 conn->label ? conn->label : "<unlabelled>",
> > +		 conn->bridge.ddc ? "with" : "without",
> > +		 conn->hpd_gpio ? "with" : "without",
> > +		 conn->bridge.ops);
> 
> On AM5 EVM, we have HDMI output with DDC and HPD, but I get a kernel print:
> 
> display-connector connector: Found HDMI-A display connector 'hdmi' without DDC bus and without HPD 
> GPIO (ops 0x0)
> 
> I think that print may be quite confusing for someone who doesn't know the details of the drivers 
> involved.

I agree, but the information could be useful for developers. Do you
think it should be dropped ? Or do you have an alternative wording to
propose ?

-- 
Regards,

Laurent Pinchart


More information about the dri-devel mailing list