Best practice device tree design for display subsystems/DRM

Sascha Hauer s.hauer at pengutronix.de
Thu Jul 4 18:53:13 EST 2013


On Thu, Jul 04, 2013 at 10:45:40AM +0200, Sebastian Hesselbarth wrote:
> On 07/04/13 10:33, Sascha Hauer wrote:
> >
> >A componentized device never completes and it doesn't have to. A
> >componentized device can start once there is a path from an input
> >(crtc, i2s unit) to an output (connector, speaker).
> >
> >Consider what happens with a supernode approach. Your board provides a
> >devicetree which has a supernode with hdmi and lvds referenced. Now you
> >build a kernel with the hdmi driver disabled. You would still expect the
> >lvds port to be working without having the kernel wait for the supernode
> >being complete.
> >
> >Without supernode you can just start once you have everything between
> >the crtc and lvds nodes. If later a hdmi device joins in then you can
> >either notify the users (provided the DRM/KMS API supports it) or just
> >ignore it until the DRM device gets reopened.
> 
> Sascha,
> 
> that is what it is all about. You assume you a priori know what devices
> will be required for the componentized device to successfully output
> a video stream.
> 
> We have shown setups where you don't know what is required. Cubox
> _needs_ lcd0 and hdmi-transmitter,

Then your Cubox devicetree has a link (that's how they call it in v4l2,
a link doesn't necessarily is a direct connection but can have multiple
devices in it) between lcd0 and hdmi.

>  olpc just needs lcd0 and has built-in hdmi in the SoC (IIRC).

And olpc has a link with lcd0 as the source and the builtin hdmi.


> The driver needs to know what to wait for, and that is given by the DT super-node.

You need a source (described in the devicetree), a sink (also described
in the devicetree) and a link between them, nothing more.

> 
> I consider kernels with missing drivers compared to what is given in
> the DT as broken setup.

What if your devicetree describes components not yet in mainline. Would
you consider mainline kernels broken then?

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


More information about the devicetree-discuss mailing list