dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: David Airlie <airlied@linux.ie>,
	"open list:DRM PANEL DRIVERS" <dri-devel@lists.freedesktop.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/4] drm/simple_kms_helper: enable use of external encoder
Date: Thu, 7 Feb 2019 22:43:01 +0100	[thread overview]
Message-ID: <20190207214301.GB23159@phenom.ffwll.local> (raw)
In-Reply-To: <CACRpkda4Ts_Hemg_sWXG5AK4Ht7UmA7=SAtXvg8KDw2-0SdYBQ@mail.gmail.com>

On Thu, Feb 07, 2019 at 10:02:17PM +0100, Linus Walleij wrote:
> On Thu, Feb 7, 2019 at 10:17 AM Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Thu, Feb 07, 2019 at 09:36:44AM +0100, Linus Walleij wrote:
> 
> > > This makes it possible to pass a connector with an already
> > > attached external encoder into the simple KMS helper.
> > >
> > > This is helpful for my MCDE drivers, as it is pretty simple
> > > but uses DSI to communicate with the displays and bridges.
> > > DSI requires the use of the DSI bus which in turn requires
> > > us to set up a custom connector from the display driver.
> >
> > So the idea was that you'd just use a bridge for this, if you need more
> > than a dummy encoder. I'm a bit worried about mission creep for the simple
> > helpers, sooner or later we'll add extensions and then we're back to full
> > kms, except it's a hairball of classic midlayer mistake ...
> >
> > See drm_simple_display_pipe_attach_bridge().
> 
> Attaching bridges usually work fine for simple KMS drivers,
> like the panel bridge, or the dumb VGA bridge or even
> the HDMI encoder bridges so I'm on board with that.
> 
> The thing is that the DSI driver is using the panel bridge
> (and has a placeholder for using other bridges) already.
> So we end up wrapping the DSI host device(s) with a
> "my DSI bridge" using another
> bridge (panel) IIUC.
> 
> display driver -> custom DSI bridge -> panel bridge -> panel
> 
> The endpoint bridge (the panel) has all information on
> resolution etc. So this means we will need to just pass this
> information through to the next step in the pipe I
> suppose.

Hm, if you have you're mode_check functions working correctly (i.e. make
sure the mode userspace asks for is the one the panel ones), then the mode
will be in the crtc_state->requested_mode that the atomic helpers already
hand to all the bridges. Or well would, if bridge wouldn't have predated
atomic, so this is all a bit a more a mess than strictly needed. But you
should be getting the right mode already.

> I just want to confirm that I'm on the right track here before
> I code another thousand lines of code for this :)

bridges are supposed to be stackable, but I think you're the first to find
out whether that actually works. Afaiui the real stacking fun is if you
need to have some state between the bridges, because you e.g. have a
scaler or transcoder or something like that in-between.

Looking at your patch, converting the encoder into a bridge, and chaining
up the bridges in the right order, is all that should be needed really.
Not retyping the 1k lines of code that actually does stuff.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-02-07 21:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07  8:36 [PATCH 0/4] DRM driver for ST-Ericsson MCDE Linus Walleij
2019-02-07  8:36 ` [PATCH 1/4] drm/simple_kms_helper: enable use of external encoder Linus Walleij
2019-02-07  9:17   ` Daniel Vetter
2019-02-07 21:02     ` Linus Walleij
2019-02-07 21:43       ` Daniel Vetter [this message]
2019-02-07  8:36 ` [PATCH 2/4] drm/mcde: Add device tree bindings Linus Walleij
2019-02-25 22:31   ` Rob Herring
2019-02-07  8:36 ` [PATCH 3/4] drm/mcde: Add new driver for ST-Ericsson MCDE Linus Walleij
2019-02-07 22:22   ` Daniel Vetter
2019-02-07 22:28     ` Daniel Vetter
2019-02-08 19:31   ` Sam Ravnborg
2019-02-07  8:36 ` [PATCH 4/4] ARM: dts: Ux500: Add MCDE and Samsung display Linus Walleij

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=20190207214301.GB23159@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linus.walleij@linaro.org \
    --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).