From: Thierry Reding <thierry.reding@gmail.com>
To: Eric Anholt <eric@anholt.net>,
Mark Rutland <mark.rutland@arm.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Michael Turquette <mturquette@baylibre.com>,
Lee Jones <lee@kernel.org>, Stephen Boyd <sboyd@codeaurora.org>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Rob Herring <robh+dt@kernel.org>,
bcm-kernel-feedback-list@broadcom.com,
linux-rpi-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 09/11] drm/panel: Add support for the Raspberry Pi 7" Touchscreen.
Date: Tue, 31 Jan 2017 22:42:43 +0100 [thread overview]
Message-ID: <20170131214241.GE872@mithrandir.ba.sec> (raw)
In-Reply-To: <20170131211702.o2he5o6ktaztmrkx@phenom.ffwll.local>
[-- Attachment #1: Type: text/plain, Size: 1722 bytes --]
On Tue, Jan 31, 2017 at 10:17:02PM +0100, Daniel Vetter wrote:
> On Tue, Jan 31, 2017 at 10:07:19PM +0100, Thierry Reding wrote:
> > On Wed, Dec 14, 2016 at 11:46:19AM -0800, Eric Anholt wrote:
> > > +static int rpi_touchscreen_enable(struct drm_panel *panel)
> > > +{
> > > + struct rpi_touchscreen *ts = panel_to_ts(panel);
> > > + int i;
> > > +
> > > + rpi_touchscreen_i2c_write(ts, REG_POWERON, 1);
> > > + /* Wait for nPWRDWN to go low to indicate poweron is done. */
> > > + for (i = 0; i < 100; i++) {
> > > + if (rpi_touchscreen_i2c_read(ts, REG_PORTB) & 1)
> > > + break;
> > > + }
> >
> > Don't you want to fail when power on doesn't succeed? Seems kind of
> > pointless to continue if the panel doesn't power on.
>
> kms works under the assumption that even when the sink is dead, the
> display pipe (well, vblanks and pageflips) keep working. There's a patch
> floating around to give userspace more information about what's going
> wrong through an async uevent+read-only property for cases where an
> unresponsive sink is normal, i.e. link training for dp.
>
> But either way, continuing is generally the right thing to do, there's no
> way to report -EIO from here (because no reasons than that's where
> accidentally ended up with our evolved design ...).
I think this depends on the specific case. I was assuming that if the
panel fails to power up, then any subsequent operations like register
reads or writes would also fail, potentially causing a lot of confusing
error messages that could easily be avoided.
Also, the panel API is usually called from encoder or connector drivers
and propagating error codes might give them a chance of reacting.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: thierry.reding@gmail.com (Thierry Reding)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 09/11] drm/panel: Add support for the Raspberry Pi 7" Touchscreen.
Date: Tue, 31 Jan 2017 22:42:43 +0100 [thread overview]
Message-ID: <20170131214241.GE872@mithrandir.ba.sec> (raw)
In-Reply-To: <20170131211702.o2he5o6ktaztmrkx@phenom.ffwll.local>
On Tue, Jan 31, 2017 at 10:17:02PM +0100, Daniel Vetter wrote:
> On Tue, Jan 31, 2017 at 10:07:19PM +0100, Thierry Reding wrote:
> > On Wed, Dec 14, 2016 at 11:46:19AM -0800, Eric Anholt wrote:
> > > +static int rpi_touchscreen_enable(struct drm_panel *panel)
> > > +{
> > > + struct rpi_touchscreen *ts = panel_to_ts(panel);
> > > + int i;
> > > +
> > > + rpi_touchscreen_i2c_write(ts, REG_POWERON, 1);
> > > + /* Wait for nPWRDWN to go low to indicate poweron is done. */
> > > + for (i = 0; i < 100; i++) {
> > > + if (rpi_touchscreen_i2c_read(ts, REG_PORTB) & 1)
> > > + break;
> > > + }
> >
> > Don't you want to fail when power on doesn't succeed? Seems kind of
> > pointless to continue if the panel doesn't power on.
>
> kms works under the assumption that even when the sink is dead, the
> display pipe (well, vblanks and pageflips) keep working. There's a patch
> floating around to give userspace more information about what's going
> wrong through an async uevent+read-only property for cases where an
> unresponsive sink is normal, i.e. link training for dp.
>
> But either way, continuing is generally the right thing to do, there's no
> way to report -EIO from here (because no reasons than that's where
> accidentally ended up with our evolved design ...).
I think this depends on the specific case. I was assuming that if the
panel fails to power up, then any subsequent operations like register
reads or writes would also fail, potentially causing a lot of confusing
error messages that could easily be avoided.
Also, the panel API is usually called from encoder or connector drivers
and propagating error codes might give them a chance of reacting.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170131/c4b5d942/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding@gmail.com>
To: Eric Anholt <eric@anholt.net>,
Mark Rutland <mark.rutland@arm.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Michael Turquette <mturquette@baylibre.com>,
Lee Jones <lee@kernel.org>, Stephen Boyd <sboyd@codeaurora.org>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Rob Herring <robh+dt@kernel.org>,
bcm-kernel-feedback-list@broadcom.com,
linux-rpi-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 09/11] drm/panel: Add support for the Raspberry Pi 7" Touchscreen.
Date: Tue, 31 Jan 2017 22:42:43 +0100 [thread overview]
Message-ID: <20170131214241.GE872@mithrandir.ba.sec> (raw)
In-Reply-To: <20170131211702.o2he5o6ktaztmrkx@phenom.ffwll.local>
[-- Attachment #1.1: Type: text/plain, Size: 1722 bytes --]
On Tue, Jan 31, 2017 at 10:17:02PM +0100, Daniel Vetter wrote:
> On Tue, Jan 31, 2017 at 10:07:19PM +0100, Thierry Reding wrote:
> > On Wed, Dec 14, 2016 at 11:46:19AM -0800, Eric Anholt wrote:
> > > +static int rpi_touchscreen_enable(struct drm_panel *panel)
> > > +{
> > > + struct rpi_touchscreen *ts = panel_to_ts(panel);
> > > + int i;
> > > +
> > > + rpi_touchscreen_i2c_write(ts, REG_POWERON, 1);
> > > + /* Wait for nPWRDWN to go low to indicate poweron is done. */
> > > + for (i = 0; i < 100; i++) {
> > > + if (rpi_touchscreen_i2c_read(ts, REG_PORTB) & 1)
> > > + break;
> > > + }
> >
> > Don't you want to fail when power on doesn't succeed? Seems kind of
> > pointless to continue if the panel doesn't power on.
>
> kms works under the assumption that even when the sink is dead, the
> display pipe (well, vblanks and pageflips) keep working. There's a patch
> floating around to give userspace more information about what's going
> wrong through an async uevent+read-only property for cases where an
> unresponsive sink is normal, i.e. link training for dp.
>
> But either way, continuing is generally the right thing to do, there's no
> way to report -EIO from here (because no reasons than that's where
> accidentally ended up with our evolved design ...).
I think this depends on the specific case. I was assuming that if the
panel fails to power up, then any subsequent operations like register
reads or writes would also fail, potentially causing a lot of confusing
error messages that could easily be avoided.
Also, the panel API is usually called from encoder or connector drivers
and propagating error codes might give them a chance of reacting.
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
next prev parent reply other threads:[~2017-01-31 21:42 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-14 19:46 [PATCH 00/11] drm/vc4: DSI panel support + Raspberry Pi touchscreen Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2016-12-14 19:46 ` [PATCH 01/11] clk: bcm2835: Don't rate change PLLs on behalf of DSI PLL dividers Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2016-12-14 19:46 ` [PATCH 02/11] clk: bcm2835: Register the DSI0/DSI1 pixel clocks Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2016-12-21 23:14 ` Stephen Boyd
2016-12-21 23:14 ` Stephen Boyd
2016-12-21 23:14 ` Stephen Boyd
2016-12-22 1:23 ` Eric Anholt
2016-12-22 1:23 ` Eric Anholt
2016-12-22 1:23 ` Eric Anholt
2016-12-14 19:46 ` [PATCH 03/11] clk: bcm2835: Add leaf clock measurement support, disabled by default Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2016-12-14 19:46 ` [PATCH 04/11] drm/vc4: Set up SCALER_DISPCTRL at boot Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2017-01-31 19:35 ` Daniel Vetter
2017-01-31 19:35 ` Daniel Vetter
2017-01-31 19:35 ` Daniel Vetter
2016-12-14 19:46 ` [PATCH 05/11] drm/vc4: Add support for feeding DSI encoders from the pixel valve Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2017-01-31 19:39 ` Daniel Vetter
2017-01-31 19:39 ` Daniel Vetter
2017-01-31 19:39 ` Daniel Vetter
2017-01-31 19:54 ` Eric Anholt
2017-01-31 19:54 ` Eric Anholt
2017-01-31 19:54 ` Eric Anholt
2016-12-14 19:46 ` [PATCH 06/11] dt-bindings: Document the VC4 DSI module nodes Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2016-12-14 19:46 ` [PATCH 07/11] drm/vc4: Add DSI driver Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2017-01-31 19:51 ` Daniel Vetter
2017-01-31 19:51 ` Daniel Vetter
2017-01-31 19:51 ` Daniel Vetter
2016-12-14 19:46 ` [PATCH 08/11] dt-bindings: Document the Raspberry Pi Touchscreen nodes Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2016-12-14 19:46 ` [PATCH 09/11] drm/panel: Add support for the Raspberry Pi 7" Touchscreen Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2017-01-31 21:07 ` Thierry Reding
2017-01-31 21:07 ` Thierry Reding
2017-01-31 21:07 ` Thierry Reding
2017-01-31 21:17 ` Daniel Vetter
2017-01-31 21:17 ` Daniel Vetter
2017-01-31 21:17 ` Daniel Vetter
2017-01-31 21:42 ` Thierry Reding [this message]
2017-01-31 21:42 ` Thierry Reding
2017-01-31 21:42 ` Thierry Reding
2017-01-31 21:19 ` Daniel Vetter
2017-01-31 21:19 ` Daniel Vetter
2017-01-31 21:19 ` Daniel Vetter
2017-01-31 21:38 ` Thierry Reding
2017-01-31 21:38 ` Thierry Reding
2016-12-14 19:46 ` [PATCH 10/11] ARM: bcm2835: dt: Add the DSI module nodes and clocks Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2016-12-14 19:46 ` [PATCH 11/11] ARM: bcm2835: Enable the Raspberry Pi touchscreen panel Eric Anholt
2016-12-14 19:46 ` Eric Anholt
2016-12-14 19:46 ` Eric Anholt
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=20170131214241.GE872@mithrandir.ba.sec \
--to=thierry.reding@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=f.fainelli@gmail.com \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=mturquette@baylibre.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@codeaurora.org \
--cc=swarren@wwwdotorg.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.