linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] RFC: drm/pl111: Support using the VGA bridge as fallback
Date: Mon, 04 Sep 2017 12:51:20 +0300	[thread overview]
Message-ID: <4828013.uWK28amVrN@avalon> (raw)
In-Reply-To: <20170904074355.gjbf7he2dt5kszfg@phenom.ffwll.local>

Hello,

On Monday, 4 September 2017 10:43:55 EEST Daniel Vetter wrote:
> On Fri, Sep 01, 2017 at 11:46:29AM +0200, Linus Walleij wrote:
> > If we cannot find a panel, assume that the output from the
> > PL111 is connected directly to a "dumb" VGA connector,
> > so look up the connector from that bridge.
> > 
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> > ---
> > This is how the new API is used in the PL111.
> > ---
> > 
> >  drivers/gpu/drm/pl111/Kconfig     | 1 +
> >  drivers/gpu/drm/pl111/pl111_drv.c | 3 +++
> >  2 files changed, 4 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/pl111/Kconfig b/drivers/gpu/drm/pl111/Kconfig
> > index e5e2abd66491..82cb3e60ddc8 100644
> > --- a/drivers/gpu/drm/pl111/Kconfig
> > +++ b/drivers/gpu/drm/pl111/Kconfig
> > @@ -8,6 +8,7 @@ config DRM_PL111
> > 
> >  	select DRM_GEM_CMA_HELPER
> >  	select DRM_BRIDGE
> >  	select DRM_PANEL_BRIDGE
> > 
> > +	select DRM_DUMB_VGA_DAC
> > 
> >  	select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE
> >  	help
> >  	
> >  	  Choose this option for DRM support for the PL111 CLCD controller.
> > 
> > diff --git a/drivers/gpu/drm/pl111/pl111_drv.c
> > b/drivers/gpu/drm/pl111/pl111_drv.c index f5bc6f160e60..6db423bbd84e
> > 100644
> > --- a/drivers/gpu/drm/pl111/pl111_drv.c
> > +++ b/drivers/gpu/drm/pl111/pl111_drv.c
> > @@ -67,6 +67,7 @@
> > 
> >  #include <drm/drm_of.h>
> >  #include <drm/drm_bridge.h>
> >  #include <drm/drm_panel.h>
> > 
> > +#include <drm/dumb_vga_dac.h>
> > 
> >  #include "pl111_drm.h"
> >  #include "pl111_versatile.h"
> > 
> > @@ -128,6 +129,8 @@ static int pl111_modeset_init(struct drm_device *dev)
> > 
> >  	if (panel) {
> >  	
> >  		priv->panel = panel;
> >  		priv->connector = panel->connector;
> > 
> > +	} else {
> > +		priv->connector = drm_dumb_vga_get_connector(bridge);
> 
> Why do you need to set this? The only code I could find tries to set
> polarity values from bus_flags, and for VGA I'd assume you want to instead
> key this off the mode?
> 
> Wrt the more general problem: They way we solve this in the i915 atomic
> framework is that the various ->fixup calls fill out relevant fields in
> the drm_crtc_state. I guess we could add an ->atomic_check to bridges, add
> a bus_flags to drm_crtc_state (or maybe just let everyone patch up
> adjusted_mode->flags) instead?

Furthermore, if we needed to have access to the connector in the display 
controller driver, this would call for creating the connector there, not in 
the bridge driver. I've advocated this for a long time, and still haven't 
given up all hopes of fixing it.

> >  	}
> >  	priv->bridge = bridge;


-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2017-09-04  9:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-01  9:46 [PATCH 2/2] RFC: drm/pl111: Support using the VGA bridge as fallback Linus Walleij
2017-09-04  7:43 ` Daniel Vetter
2017-09-04  9:51   ` Laurent Pinchart [this message]
2017-09-07 13:26     ` Linus Walleij
2017-09-05 19:43   ` Eric Anholt
2017-09-07 18:46     ` Daniel Vetter
2017-09-07 12:59   ` Linus Walleij
2017-09-07 16:12     ` Noralf Trønnes
2017-09-07 18:44       ` Daniel Vetter

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=4828013.uWK28amVrN@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).