devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
	devicetree@vger.kernel.org,
	"Jeffy Chen" <jeffy.chen@rock-chips.com>,
	"Doug Anderson" <dianders@chromium.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	"Stéphane Marchesin" <marcheu@chromium.org>
Subject: Re: [PATCH 1/3] drm/panel: simple: Add ability to override typical timing
Date: Wed, 7 Feb 2018 10:51:16 +0100	[thread overview]
Message-ID: <20180207095116.GB2130@ulmo> (raw)
In-Reply-To: <CAL_JsqJer8ZrLyPHz=hBo9smSv7aXhtP3hOJzQojt7ofUiHo=w@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 4071 bytes --]

On Tue, Feb 06, 2018 at 02:19:34PM -0600, Rob Herring wrote:
> On Tue, Feb 6, 2018 at 10:56 AM, Sean Paul <seanpaul@chromium.org> wrote:
> > This patch adds the ability to override the typical display timing for a
> > given panel. This is useful for devices which have timing constraints
> > that do not apply across the entire display driver (eg: to avoid
> > crosstalk between panel and digitizer on certain laptops). The rules are
> > as follows:
> >
> > - panel must not specify fixed mode (since the override mode will
> >   either be the same as the fixed mode, or we'll be unable to
> >   check the bounds of the overried)
> > - panel must specify at least one display_timing range which will be
> >   used to ensure the override mode fits within its bounds
> >
> > Cc: Doug Anderson <dianders@chromium.org>
> > Cc: Heiko Stuebner <heiko@sntech.de>
> > Cc: Jeffy Chen <jeffy.chen@rock-chips.com>
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: Stéphane Marchesin <marcheu@chromium.org>
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Cc: devicetree@vger.kernel.org
> > Cc: dri-devel@lists.freedesktop.org
> > Cc: linux-rockchip@lists.infradead.org
> > Signed-off-by: Sean Paul <seanpaul@chromium.org>
> > ---
> >  .../bindings/display/panel/simple-panel.txt        | 20 +++++++
> 
> The binding should be a separate patch.
> 
> >  drivers/gpu/drm/panel/panel-simple.c               | 69 +++++++++++++++++++++-
> >  2 files changed, 88 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/simple-panel.txt b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
> > index 16d8ff088b7d..590bbff6fc90 100644
> > --- a/Documentation/devicetree/bindings/display/panel/simple-panel.txt
> > +++ b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
> > @@ -7,6 +7,14 @@ Optional properties:
> >  - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing
> >  - enable-gpios: GPIO pin to enable or disable the panel
> >  - backlight: phandle of the backlight device attached to the panel
> > +- override-mode: For devices which require a mode which differs from the
> 
> This is not a property, but a node so it needs its own section.
> 
> Also, it's not real clear from display-timing.txt, but the modes
> should be grouped under a display-timings node. Looks like we haven't
> been good at enforcing that as "panel-timing" is also common when
> there's a single mode. I'd rather not have another way. With a
> standard node name, we can validate the node more easily.
> 
> We'd lose the fact that this is explicitly an override, but I'd doubt
> Thierry is going to start letting in panels with no timings.

I was actually going to suggest the same change. I don't mind if the
name isn't explicit about this being an override. The important thing is
that we document this as being an override.

> Finally, since this is an override, is it valid to only override the
> parameters that need overriding? I don't really have an opinion either
> way. It just needs to be explicitly documented.

I've thought about that, but I think that'd be putting too much of a
burden on the panel drivers and/or display drivers. In the simplest case
it may be sufficient to restrict the pixel clock, in which case it would
be fairly easy for the driver to adjust the other parameters.

But what if you also need to restrict the porches. At some point it'll
become very difficult for the driver to automatically determine which of
the other parameters to adjust and how. Chances are that whoever needs
to deal with the restrictions already knows how to adjust the parameters
to fixup the mode.

I think this gives us a nice balance of simplicity when people don't
care (they'd just use the typical timings) and flexibility when they do
(adjust the mode to take into account display driver restrictions and
completely specify the mode if the restrictions are too complicated for
code to realistically apply them).

Thierry

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-02-07  9:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06 16:56 [PATCH 0/3] drm/panel: simple: Add mode support to devicetree Sean Paul
2018-02-06 16:56 ` [PATCH 1/3] drm/panel: simple: Add ability to override typical timing Sean Paul
     [not found]   ` <20180206165626.37692-2-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-02-06 20:19     ` Rob Herring
2018-02-06 21:48       ` Sean Paul
2018-02-07 17:41         ` Rob Herring
     [not found]           ` <CAL_JsqJDvPN3CtKtj980egDRuC-ZjiKOAWe5ECYVBSv4hVOnYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-07 19:27             ` Sean Paul
2018-02-07  9:51       ` Thierry Reding [this message]
2018-02-06 16:56 ` [PATCH 2/3] drm/panel: simple: Use display_timing for lq123p1jx31 Sean Paul
2018-02-06 16:56 ` [PATCH 3/3] arm64: dts: rockchip: Specify override mode for kevin panel Sean Paul
     [not found] ` <20180206165626.37692-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-02-07  9:16   ` [PATCH 0/3] drm/panel: simple: Add mode support to devicetree Eric Anholt
2018-02-07 15:27     ` Sean Paul

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=20180207095116.GB2130@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jeffy.chen@rock-chips.com \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=marcheu@chromium.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).