From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v3 06/13] drm: bridge: Add LVDS encoder driver
Date: Wed, 04 Jan 2017 15:08:02 +0200 [thread overview]
Message-ID: <5172242.1xI6ry2aS1@avalon> (raw)
In-Reply-To: <20170104081818.xhj6xqp5elwe3szf@phenom.ffwll.local>
Hi Daniel,
On Wednesday 04 Jan 2017 09:18:18 Daniel Vetter wrote:
> On Tue, Nov 29, 2016 at 10:57:07PM +0200, Laurent Pinchart wrote:
> > On Tuesday 29 Nov 2016 10:54:09 Daniel Vetter wrote:
> >> On Tue, Nov 29, 2016 at 11:04:36AM +0200, Laurent Pinchart wrote:
> >>> The LVDS encoder driver is a DRM bridge driver that supports the
> >>> parallel to LVDS encoders that don't require any configuration. The
> >>> driver thus doesn't interact with the device, but creates an LVDS
> >>> connector for the panel and exposes its size and timing based on
> >>> information retrieved from DT.
> >>>
> >>> Signed-off-by: Laurent Pinchart
> >>> <laurent.pinchart+renesas@ideasonboard.com>
> >>
> >> Since it's 100% dummy, why put LVDS into the name? This little thing
> >> here could be our generic "wrap drm_panel and attach it to a chain"
> >> helper. So what about calling this _The_ drm_panel_bridge, and also
> >> linking it into docs to feature it a bit more prominently.
> >
> > I'm not opposed to that, except that this driver should not be considered
> > as just a helper to link a panel. It should only be used to support a
> > real hardware bridge that requires no control.
> >
> >> I came up with this because I spotted some refactoring belows for
> >> building this helper, until I realized that this driver _is_ the helper I
> >> think we want ;-) Only thing missing is an exported function to
> >> instantiate a bridge with just a drm_panel as the parameter. And putting
> >> it into the drm_kms_helper.ko module.
> >
> > What would that be used for ? The bridge should be instantiated by this
> > bridge driver, bound to a bridge device instantiated from DT (or the
> > platform firmware of your choice).
>
> Atm every driver using drm_panel needs a bit of glue to bind it into it's
> display chain. With this code, and bridge chaining, you'd get that for
> free, and I think that would be rather useful.
You would trade the bit of panel glue for a bit of bridge glue. Bridge
chaining could perhaps help slightly at runtime there, but at init time the
amount of glue would be similar.
I've noticed one piece of code that is LVDS-specific in this driver, and
that's connector creation. The connector type is hardcoded to LVDS. To make
the driver more generic, we would need a way to find the connector type at
runtime. I'm wondering whether I should do this now, or keep the driver LVDS-
specific until someone comes up with a similar need. Without several potential
users it's often hard to design a properly generic API.
> And from a software point of view I'd say if it quacks like a bridge, and
> walks like a bridge, it probably _is_ a bridge. Even if no one calls that,
> or if physical the only thing on the board at that spot are a bunch of dumb
> wires.
I dream of moving all encoders to DRM bridge, and then unifying drm_bridge and
drm_panel with a common set of operations that could be invoked on both
objects. That way the core could chain bridges and panels quite easily. I plan
to experiment with this when moving the omapdrm driver to DRM bridge and DRM
panel (it currently includes a bunch of custom encoder and panel drivers).
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2017-01-04 13:07 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 9:04 [PATCH v3 00/13] R-Car DU: Use drm bridge API Laurent Pinchart
2016-11-29 9:04 ` [PATCH v3 01/13] drm: Don't include <drm/drm_encoder.h> in <drm/drm_crtc.h> Laurent Pinchart
2016-11-29 9:30 ` Daniel Vetter
2016-11-29 9:37 ` Laurent Pinchart
2016-12-02 21:21 ` Sinclair Yeh
2016-11-29 9:04 ` [PATCH v3 02/13] drm: Fix compilation warning caused by static inline forward declaration Laurent Pinchart
2016-11-29 9:31 ` Daniel Vetter
2016-11-29 9:04 ` [PATCH v3 03/13] drm: bridge: Link encoder and bridge in core code Laurent Pinchart
2016-11-29 9:35 ` Daniel Vetter
2016-11-29 9:43 ` Laurent Pinchart
2016-11-29 10:05 ` Daniel Vetter
2016-11-29 18:02 ` Laurent Pinchart
2016-11-29 18:51 ` Laurent Pinchart
2016-11-29 10:27 ` Archit Taneja
2016-11-29 17:57 ` Laurent Pinchart
2016-11-30 5:05 ` Archit Taneja
2016-11-30 10:23 ` Laurent Pinchart
2016-11-30 11:00 ` Archit Taneja
2016-11-30 11:05 ` Laurent Pinchart
2016-11-30 13:27 ` Archit Taneja
2016-11-29 17:01 ` Stefan Agner
2016-11-29 19:58 ` Boris Brezillon
2016-11-30 15:30 ` Vincent ABRIOU
2016-11-29 9:04 ` [PATCH v3 04/13] drm: bridge: Detach bridge from encoder at encoder cleanup time Laurent Pinchart
2016-11-29 9:48 ` Daniel Vetter
2016-11-29 19:00 ` Laurent Pinchart
2016-11-29 10:34 ` Archit Taneja
2016-11-29 18:56 ` Laurent Pinchart
2016-11-29 20:22 ` Daniel Vetter
2016-11-29 9:04 ` [PATCH v3 05/13] drm: bridge: Add LVDS encoder DT bindings Laurent Pinchart
2016-11-29 9:04 ` [PATCH v3 06/13] drm: bridge: Add LVDS encoder driver Laurent Pinchart
2016-11-29 9:54 ` Daniel Vetter
2016-11-29 20:57 ` Laurent Pinchart
2017-01-04 1:33 ` Laurent Pinchart
2017-01-04 8:18 ` Daniel Vetter
2017-01-04 13:08 ` Laurent Pinchart [this message]
2017-01-04 13:51 ` Daniel Vetter
2017-01-04 14:33 ` Laurent Pinchart
2017-01-04 14:58 ` Daniel Vetter
2017-01-04 15:13 ` Laurent Pinchart
2017-03-02 0:30 ` Laurent Pinchart
2017-03-02 7:05 ` Daniel Vetter
2016-11-29 9:04 ` [PATCH v3 07/13] drm: bridge: vga-dac: Add adi,adv7123 compatible string Laurent Pinchart
2016-11-29 9:50 ` Maxime Ripard
2016-11-29 9:04 ` [PATCH v3 08/13] drm: bridge: lvds-encoder: Add thine,thc63lvdm83d " Laurent Pinchart
2016-11-29 9:04 ` [PATCH v3 09/13] drm: Add encoder_type field to the drm_bridge structure Laurent Pinchart
2016-11-29 9:56 ` Daniel Vetter
2016-11-29 9:58 ` Laurent Pinchart
2016-11-29 10:27 ` Daniel Vetter
2016-11-29 17:49 ` Laurent Pinchart
2016-11-29 20:25 ` Daniel Vetter
2016-11-29 22:42 ` Laurent Pinchart
2016-11-29 9:04 ` [PATCH v3 10/13] drm: bridge: Set bridges' encoder type Laurent Pinchart
2016-11-29 9:04 ` [PATCH v3 11/13] drm: Set on-chip " Laurent Pinchart
2016-11-30 15:28 ` Vincent ABRIOU
2016-11-29 9:04 ` [PATCH v3 12/13] drm: rcar-du: Replace manual bridge implementation with DRM bridge Laurent Pinchart
2016-12-27 12:40 ` Geert Uytterhoeven
2016-11-29 9:04 ` [PATCH v3 13/13] drm: rcar-du: Initialize encoder's type based on the bridge's type Laurent Pinchart
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=5172242.1xI6ry2aS1@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-renesas-soc@vger.kernel.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