devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>
To: Thierry Reding
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Laurent Pinchart
	<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
Cc: Laurent Pinchart
	<laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
	Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	Dave Airlie <airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [RFR 2/2] drm/panel: Add simple panel support
Date: Thu, 17 Oct 2013 13:22:21 +0300	[thread overview]
Message-ID: <525FBA5D.9000001@ti.com> (raw)
In-Reply-To: <20131017085342.GB2502-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 3623 bytes --]

On 17/10/13 11:53, Thierry Reding wrote:

> 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.

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?

>>> +static const struct drm_display_mode auo_b101aw03_mode = {
>>> +	.clock = 51450,
>>> +	.hdisplay = 1024,
>>> +	.hsync_start = 1024 + 156,
>>> +	.hsync_end = 1024 + 156 + 8,
>>> +	.htotal = 1024 + 156 + 8 + 156,
>>> +	.vdisplay = 600,
>>> +	.vsync_start = 600 + 16,
>>> +	.vsync_end = 600 + 16 + 6,
>>> +	.vtotal = 600 + 16 + 6 + 16,
>>> +	.vrefresh = 60,
>>> +};
>>
>> Instead of hardcoding the modes in the driver, which would then require to be 
>> updated for every new simple panel model (and we know there are lots of them), 
>> why don't you specify the modes in the panel DT node ? The simple panel driver 
>> would then become much more generic. It would also allow board designers to 
>> tweak h/v sync timings depending on the system requirements.
> 
> Sigh... we keep second-guessing ourselves. Back at the time when power
> sequences were designed (and NAKed at the last minute), we all decided
> that the right thing to do would be to use specific compatible values
> for individual panels, because that would allow us to encode the power
> sequencing within the driver. And when we already have the panel model
> encoded in the compatible value, we might just as well encode the mode
> within the driver for that panel. Otherwise we'll have to keep adding
> the same mode timings for every board that uses the same panel.

Oh, I didn't feel "we all decided that the right thing..." =).

> I do agree though that it might be useful to tweak the mode in case the
> default one doesn't work. How about we provide a means to override the
> mode encoded in the driver using one specified in the DT? That's
> obviously a backwards-compatible change, so it could be added if or when
> it becomes necessary.

This sounds good to me.

Although maybe it'd be good to have the driver compatible with something
like "generic-panel", so that you could have:

compatible = "foo,specific-panel", "generic-panel";

and if there's no need for any power/gpio setup for your board, you may
skip adding "foo,specific-panel" support to the panel driver. Later,
somebody else may need to implement fine grained power/gpio support for
"foo,specific-panel", and it would just work.

Maybe that would help us with the problem of adding support in the
driver for a hundred different simple panels each used only once on a
specific board.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

  parent reply	other threads:[~2013-10-17 10:22 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 18:25 [RFR 0/2] DRM display panel support Thierry Reding
     [not found] ` <1381947912-11741-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-10-16 18:25   ` [RFR 1/2] drm: Add " Thierry Reding
2013-10-16 18:25   ` [RFR 2/2] drm/panel: Add simple " Thierry Reding
     [not found]     ` <1381947912-11741-3-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-10-17  0:47       ` Laurent Pinchart
2013-10-17  8:28         ` Dave Airlie
     [not found]           ` <CAPM=9tzU36cwcM0pH0J_Vgc6UOj5MHdVNDvn3wpGNuihbMqdQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-17  8:49             ` Tomi Valkeinen
     [not found]               ` <525FA4B0.8060504-l0cyMroinI0@public.gmane.org>
2013-10-17  9:16                 ` Thierry Reding
     [not found]                   ` <20131017091614.GC2502-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-17  9:52                     ` Tomi Valkeinen
     [not found]                       ` <525FB368.6020003-l0cyMroinI0@public.gmane.org>
2013-10-17 10:48                         ` Thierry Reding
     [not found]                           ` <20131017104856.GA10993-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-17 11:07                             ` Laurent Pinchart
2013-10-20 22:07                               ` Stephen Warren
     [not found]                                 ` <52645428.9080607-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-10-24 11:20                                   ` Laurent Pinchart
2013-10-24 22:06                                     ` Stephen Warren
     [not found]                                       ` <526999DA.7080409-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-10-25  8:13                                         ` Thierry Reding
     [not found]                                           ` <20131025081314.GC19622-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-25 13:47                                             ` Laurent Pinchart
2013-10-25 14:10                                               ` Thierry Reding
     [not found]                                                 ` <20131025141029.GD1551-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-25 14:22                                                   ` Laurent Pinchart
2013-10-25 11:33                                         ` Laurent Pinchart
2013-10-25 12:29                                           ` Thierry Reding
     [not found]                                             ` <20131025122925.GA24720-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-25 13:49                                               ` Laurent Pinchart
2013-10-25 15:29                                           ` Stephen Warren
2013-10-17 11:21                             ` Tomi Valkeinen
2013-10-20 22:01                 ` Stephen Warren
2013-10-17  8:53         ` Thierry Reding
     [not found]           ` <20131017085342.GB2502-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-17 10:22             ` Tomi Valkeinen [this message]
     [not found]               ` <525FBA5D.9000001-l0cyMroinI0@public.gmane.org>
2013-10-17 11:05                 ` Thierry Reding
     [not found]                   ` <20131017110517.GC10993-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-17 11:15                     ` Laurent Pinchart
2013-10-17 12:06                       ` Thierry Reding
     [not found]                         ` <20131017120646.GE10993-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-17 12:23                           ` Laurent Pinchart
2013-10-17 12:55                             ` Thierry Reding
2013-10-17 11:50                     ` Tomi Valkeinen
     [not found]                       ` <525FCF07.6070006-l0cyMroinI0@public.gmane.org>
2013-10-17 12:12                         ` Thierry Reding
2013-10-17 11:02             ` Laurent Pinchart
2013-10-17 11:35               ` Tomi Valkeinen
     [not found]                 ` <525FCB95.6070401-l0cyMroinI0@public.gmane.org>
2013-10-17 11:51                   ` Laurent Pinchart
2013-10-17 11:59                     ` Tomi Valkeinen
     [not found]                       ` <525FD12D.3000200-l0cyMroinI0@public.gmane.org>
2013-10-17 12:17                         ` Laurent Pinchart
2013-10-17 12:32                           ` Tomi Valkeinen
     [not found]                             ` <525FD8DD.3090509-l0cyMroinI0@public.gmane.org>
2013-10-20 19:29                               ` Sylwester Nawrocki
2013-10-24 10:40                             ` Laurent Pinchart
2013-10-24 10:52                               ` Tomi Valkeinen
2013-10-25 10:54                                 ` Sylwester Nawrocki
2013-10-17 11:41               ` Thierry Reding
     [not found]                 ` <20131017114139.GD10993-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-17 12:14                   ` Laurent Pinchart
2013-10-17 12:46                     ` Thierry Reding
     [not found]                       ` <20131017124619.GG10993-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-24 11:05                         ` Laurent Pinchart
2013-10-24 11:48                           ` Thierry Reding
     [not found]                             ` <20131024114823.GC11296-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-25 11:27                               ` 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=525FBA5D.9000001@ti.com \
    --to=tomi.valkeinen-l0cymroini0@public.gmane.org \
    --cc=airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
    --cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
    --cc=linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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).