Re: [RFR 2/2] drm/panel: Add simple panel support

Started by Laurent Pinchart on Oct 17, 2013 · 2 messages from 2 authors · Last reply Oct 17, 2013

open the first message on its own page

Message details and related content
Hi Thierry,

On Thursday 17 October 2013 14:06:47 Thierry Reding wrote:
On Thu, Oct 17, 2013 at 01:15:22PM +0200, Laurent Pinchart wrote:
quoted
On Thursday 17 October 2013 13:05:18 Thierry Reding wrote:
quoted
On Thu, Oct 17, 2013 at 01:22:21PM +0300, Tomi Valkeinen wrote:
quoted
On 17/10/13 11:53, Thierry Reding wrote:
quoted
I keep wondering why we absolutely must have compatibility between
CDF and this simple panel binding. DT content is supposed to concern
itself with the description of hardware only. What about the
following isn't an accurate description of the panel hardware?

	panel: panel {
		compatible = "cptt,claa101wb01";
		
		power-supply = <&vdd_pnl_reg>;
		enable-gpios = <&gpio 90 0>;
		
		backlight = <&backlight>;
	};
	
	dsi-controller {
		panel = <&panel>;
	};
That's quite similar to how my current out-of-mainline OMAP DSS DT
bindings work. The difference is that I have a reference from the
panel node to the video source (dsi-controller), instead of the other
way around. I just find it more natural. It works the same way as,
say, regulators, gpios, etc.
I suppose that depends on the way you look at it. In the above proposal
I consider the output (DSI controller) to use the panel as a resource
that provides a certain set of services (query mode timings, provide a
way to enable or disable the panel). Similarly the panel uses the
backlight as a resource that provides a certain set of services (such as
changing the brightness).

The above also follows the natural order of control. The panel has no
way to control the DSI output. However, it is the output that controls
when a panel is required and turn it on as appropriate.
I'm no DSI expert, but I know enough about it to be sure that Tomi will

14 more quoted lines

Sure, but I don't think that's really related to the DT bindings. We don't 
have to model every electrical signal in a detailed way that matches the 
direction of the electrons flow :-) What we need to model is a connection 
between a display controller and a panel (possibly with a direction). What I'd 
like to do is to express that link in a way that can also express more complex 
pipeline topologies. I don't want to make it overly complex, I had hoped that 
my DT bindings proposal would be a good approach as it's both generic and 
still pretty simple.
Again, that's exactly how I2C works as well. I2C slaves, by definition,
do not control the I2C bus. However, I2C client drivers can do so by
using the (master) services provided by the I2C controller.

So for DSI what we could easily do is provide a DSI "adapter" to the
panel when it is attached to the DSI controller. If the DSI adapter
implements all of the required services, then the DSI panel driver is
easily capable of handling all the required special quirks.

I'm Cc'ing Rob and Daniel, both of whom have been working on this
lately. Actually I'm not sure if Daniel was directly involved, but at
least somebody from Intel's team was working on it.
quoted
quoted
quoted
However, one thing unclear is where the panel node should be. You seem
to have a DSI panel here. If the panel is truly not controlled in any
way, maybe having the panel as a normal platform device is ok. But if
the DSI panel is controlled with DSI messages, should it be a child of
the dsi-controller node, the same way i2c peripherals are children of
i2c master?
That's one possibility. In this particular case it's not even necessary
to use any of DSIs control methods to talk to the panel. The panel only
receives the data stream and "just works".

Even if the panel were to be controlled via DSI, I think keeping it as
a separate device node is equally valid. It's really boils down to what
I already said above. The output uses the panel as a resource, similar
to how other devices might use a GPIO controller to use a GPIO pin, or
an interrupt controller to request an IRQ.
Except that the display controller can also provides resources to the
panel. For DSI panels that support DSI commands, the control bus is
provided by the display controller. Much like an I2C device must be a
child of its I2C controller node, the DSI panel device should then be a
child of the display controller node.
I don't think resources is the right term here. The DSI controller
provides services. That's traditionally been handled in DT by handing
out phandles to the service providers.

37 more quoted lines

Then I might not have understood your answer :-)

-- 
Regards,

Laurent Pinchart
Message details and related content
On Thu, Oct 17, 2013 at 02:23:32PM +0200, Laurent Pinchart wrote:
Hi Thierry,

On Thursday 17 October 2013 14:06:47 Thierry Reding wrote:
quoted
On Thu, Oct 17, 2013 at 01:15:22PM +0200, Laurent Pinchart wrote:
quoted
On Thursday 17 October 2013 13:05:18 Thierry Reding wrote:
quoted
On Thu, Oct 17, 2013 at 01:22:21PM +0300, Tomi Valkeinen wrote:
quoted
On 17/10/13 11:53, Thierry Reding wrote:
quoted
I keep wondering why we absolutely must have compatibility between
CDF and this simple panel binding. DT content is supposed to concern
itself with the description of hardware only. What about the
following isn't an accurate description of the panel hardware?

	panel: panel {
		compatible = "cptt,claa101wb01";
		
		power-supply = <&vdd_pnl_reg>;
		enable-gpios = <&gpio 90 0>;
		
		backlight = <&backlight>;
	};
	
	dsi-controller {
		panel = <&panel>;
	};
That's quite similar to how my current out-of-mainline OMAP DSS DT
bindings work. The difference is that I have a reference from the
panel node to the video source (dsi-controller), instead of the other
way around. I just find it more natural. It works the same way as,
say, regulators, gpios, etc.
I suppose that depends on the way you look at it. In the above proposal
I consider the output (DSI controller) to use the panel as a resource
that provides a certain set of services (query mode timings, provide a
way to enable or disable the panel). Similarly the panel uses the
backlight as a resource that provides a certain set of services (such as
changing the brightness).

The above also follows the natural order of control. The panel has no
way to control the DSI output. However, it is the output that controls

26 more quoted lines

I get that, and for what it's worth I do think that your proposal looks
simple enough and if it can solve any of the problem you're facing with
CDF, then that's great.

But I don't think we should force inclusion of these properties on every
panel, even if it doesn't use any of the graph functionality. Is there
any problem with making them optional?

Thierry
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help