public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jagan Teki <jagan@amarulasolutions.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Robert Foss <robert.foss@linaro.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	devicetree@vger.kernel.org, linux-amarula@amarulasolutions.com
Subject: Re: [PATCH] drm: bridge: tc358764: Use drm panel_bridge API
Date: Mon, 13 Dec 2021 15:30:55 +0200	[thread overview]
Message-ID: <YbdLD7Bz/LC7La9w@pendragon.ideasonboard.com> (raw)
In-Reply-To: <CAMty3ZDiiK_LSqwY87RrZ5W6=gyxUXB8tyG5Zp5x_LJcZ-pRCA@mail.gmail.com>

On Mon, Dec 13, 2021 at 06:27:37PM +0530, Jagan Teki wrote:
> On Mon, Dec 13, 2021 at 6:16 PM Laurent Pinchart wrote:
> > On Mon, Dec 13, 2021 at 06:09:23PM +0530, Jagan Teki wrote:
> > > On Mon, Dec 13, 2021 at 6:02 PM Laurent Pinchart wrote:
> > > > On Mon, Dec 13, 2021 at 05:49:29PM +0530, Jagan Teki wrote:
> > > > > Replace the manual panel handling code by a drm panel_bridge via
> > > > > devm_drm_of_get_bridge().
> > > > >
> > > > > Adding panel_bridge handling,
> > > > >
> > > > > - Drops drm_connector and related operations as drm_bridge_attach
> > > > >   creates connector during attachment.
> > > > >
> > > > > - Drops panel pointer and panel healpers.
> > > > >
> > > > > This simplifies the driver and allows all components in the display
> > > > > pipeline to be treated as bridges.
> > > > >
> > > > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > > > ---
> > > > >  drivers/gpu/drm/bridge/tc358764.c | 99 ++-----------------------------
> > > > >  1 file changed, 6 insertions(+), 93 deletions(-)
> > > > >
> > > > > diff --git a/drivers/gpu/drm/bridge/tc358764.c b/drivers/gpu/drm/bridge/tc358764.c
> > > > > index c1e35bdf9232..28480bdc4287 100644
> > > > > --- a/drivers/gpu/drm/bridge/tc358764.c
> > > > > +++ b/drivers/gpu/drm/bridge/tc358764.c
> > > > > @@ -153,10 +153,9 @@ static const char * const tc358764_supplies[] = {
> > > > >  struct tc358764 {
> > > > >       struct device *dev;
> > > > >       struct drm_bridge bridge;
> > > > > -     struct drm_connector connector;
> > > > > +     struct drm_bridge *panel_bridge;
> > > >
> > > > s/panel_bridge/next_bridge/ as it may not be a panel.
> > >
> > > Sometime, I'm a strong believer of my own notation (I may be wrong)
> > > based on my understanding. This is downstream bridge and the only
> > > option it to connect is panel and panel in bridge terminology are
> > > treated as panel_bridge. This is the reason I have used panel_bridge.
> > > next_bridge notation will be used if the bridge connected to any
> > > downstream bridge, like we can use next_bridge notation in host bridge
> > > drivers as host bridge can be an option of connecting downstream
> > > bridge or panel.
> >
> > The downstream bridge doesn't have to be a DSI panel, it could be an
> > LVDS-to-DPI bridge for instance, or an LVDS-to-HDMI encoder.
> 
> Okay. What are use-cases where we can use panel_bridge?

The panel bridge wraps a drm_panel in a drm_bridge, which makes it
completely transparent for the other bridges in the chain whether their
output is connected to a panel or to something else. I would thus never
call a variable panel_bridge unless in the panel bridge driver itself.

-- 
Regards,

Laurent Pinchart

      reply	other threads:[~2021-12-13 13:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-13 12:19 [PATCH] drm: bridge: tc358764: Use drm panel_bridge API Jagan Teki
2021-12-13 12:31 ` Laurent Pinchart
2021-12-13 12:39   ` Jagan Teki
2021-12-13 12:45     ` Laurent Pinchart
2021-12-13 12:57       ` Jagan Teki
2021-12-13 13:30         ` Laurent Pinchart [this message]

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=YbdLD7Bz/LC7La9w@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jagan@amarulasolutions.com \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=m.szyprowski@samsung.com \
    --cc=narmstrong@baylibre.com \
    --cc=robert.foss@linaro.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