From: Pekka Paalanen <ppaalanen@gmail.com>
To: Rob Clark <robdclark@gmail.com>
Cc: Brian Norris <briannorris@chromium.org>,
Rob Clark <robdclark@chromium.org>,
Andrzej Hajda <andrzej.hajda@intel.com>,
David Airlie <airlied@linux.ie>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Doug Anderson <dianders@chromium.org>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>,
"Kristian H . Kristensen" <hoegsberg@google.com>,
dri-devel <dri-devel@lists.freedesktop.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
linux-input@vger.kernel.org
Subject: Re: [PATCH v2 1/2] drm/input_helper: Add new input-handling helper
Date: Fri, 19 Nov 2021 11:54:19 +0200 [thread overview]
Message-ID: <20211119115419.505155b5@eldfell> (raw)
In-Reply-To: <CAF6AEGuc9JbOsC4Lrvoqo8VzMHq+7ru7Y6_UwoZaGV2wHQ6E5g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4108 bytes --]
On Thu, 18 Nov 2021 15:30:38 -0800
Rob Clark <robdclark@gmail.com> wrote:
> On Thu, Nov 18, 2021 at 2:39 AM Pekka Paalanen <ppaalanen@gmail.com> wrote:
> >
> > On Wed, 17 Nov 2021 14:48:40 -0800
> > Brian Norris <briannorris@chromium.org> wrote:
> >
> > > A variety of applications have found it useful to listen to
> > > user-initiated input events to make decisions within a DRM driver, given
> > > that input events are often the first sign that we're going to start
> > > doing latency-sensitive activities:
> > >
> > > * Panel self-refresh: software-directed self-refresh (e.g., with
> > > Rockchip eDP) is especially latency sensitive. In some cases, it can
> > > take 10s of milliseconds for a panel to exit self-refresh, which can
> > > be noticeable. Rockchip RK3399 Chrome OS systems have always shipped
> > > with an input_handler boost, that preemptively exits self-refresh
> > > whenever there is input activity.
> > >
> > > * GPU drivers: on GPU-accelerated desktop systems, we may need to
> > > render new frames immediately after user activity. Powering up the
> > > GPU can take enough time that it is worthwhile to start this process
> > > as soon as there is input activity. Many Chrome OS systems also ship
> > > with an input_handler boost that powers up the GPU.
> > >
> > > This patch provides a small helper library that abstracts some of the
> > > input-subsystem details around picking which devices to listen to, and
> > > some other boilerplate. This will be used in the next patch to implement
> > > the first bullet: preemptive exit for panel self-refresh.
> > >
> > > Bits of this are adapted from code the Android and/or Chrome OS kernels
> > > have been carrying for a while.
> > >
> > > Signed-off-by: Brian Norris <briannorris@chromium.org>
> > > ---
> >
> > Thanks Simon for the CC.
> >
> > Hi Brian,
> >
> > while this feature in general makes sense and sounds good, to start
> > warming up display hardware early when something might start to happen,
> > this particular proposal has many problems from UAPI perspective (as it
> > has none). Comments below.
> >
> > Btw. if PSR is that slow to wake up from, how much do you actually gain
> > from this input event watching? I would imagine the improvement to not
> > be noticeable.
> >
> > I think some numbers about how much this feature helps would be really
> > good, even if they are quite specific use cases. You also need to
> > identify the userspace components, because I think different display
> > servers are very different in their reaction speed.
> >
> > If KMS gets a pageflip or modeset in no time after an input event, then
> > what's the gain. OTOH, if the display server is locking on to vblank,
> > there might be a delay worth avoiding. But then, is it worth
> > short-circuiting the wake-up in kernel vs. adding a new ioctl that
> > userspace could hit to start the warming up process?
>
> In my measurements, it takes userspace a frame or two to respond and
> get to the point of starting to build cmdstream (before eventually
> doing atomic/pageflip ioctl).. possibly longer if you don't also have
> a similar boost mechanism to spool up cpufreq
>
> But the important thing, IMO, is that atomic/pageflip ioctl is the
> cumulation of a long sequence of events.. input-boost is letting
> whatever it may be (PSR exit, GPU resume, etc) happen in parallel with
> that long sequence.
Right, exactly. That is why I was musing about a *new* ioctl that
userspace could hit as soon as any input device fd (or network fd!)
shows signs of life. Would that be enough, avoiding all the annoying
questions about which input and DRM devices should participate here
(and what about non-input devices that still want to trigger the
warm-up, like network traffic, e.g. remote control?), or does it really
need to be kernel internal to be fast enough?
As Brian wrote about his quick hack to test that via debugfs, sounds
like the userspace solution would be totally sufficient.
Thanks,
pq
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-11-19 9:54 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-17 22:48 [PATCH v2 0/2] drm: Support input-boosted panel self-refresh exit Brian Norris
2021-11-17 22:48 ` [PATCH v2 1/2] drm/input_helper: Add new input-handling helper Brian Norris
2021-11-18 9:05 ` Daniel Vetter
2021-11-18 19:30 ` Brian Norris
2021-11-19 10:01 ` Daniel Vetter
2021-11-19 19:07 ` Brian Norris
2021-11-25 15:25 ` Daniel Vetter
2021-11-18 10:39 ` Pekka Paalanen
2021-11-18 23:30 ` Rob Clark
2021-11-19 9:54 ` Pekka Paalanen [this message]
2021-11-19 15:53 ` Daniel Vetter
2021-11-19 16:04 ` Simon Ser
2021-11-19 16:11 ` Daniel Vetter
2021-11-22 9:43 ` Pekka Paalanen
2021-11-25 15:30 ` Daniel Vetter
2021-11-19 16:44 ` Rob Clark
2021-11-19 16:50 ` Doug Anderson
2021-11-19 1:46 ` Brian Norris
2021-11-19 10:38 ` Pekka Paalanen
2021-11-19 15:56 ` Daniel Vetter
2021-11-22 9:25 ` Pekka Paalanen
2021-11-30 20:35 ` Brian Norris
2021-12-07 3:16 ` Peter Hutterer
2021-11-17 22:48 ` [PATCH v2 2/2] drm/self_refresh: Disable self-refresh on input events Brian Norris
2021-11-18 9:11 ` Daniel Vetter
2021-11-18 8:34 ` [PATCH v2 0/2] drm: Support input-boosted panel self-refresh exit Simon Ser
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=20211119115419.505155b5@eldfell \
--to=ppaalanen@gmail.com \
--cc=airlied@linux.ie \
--cc=andrzej.hajda@intel.com \
--cc=briannorris@chromium.org \
--cc=dianders@chromium.org \
--cc=dmitry.torokhov@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hoegsberg@google.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.com \
--cc=tzimmermann@suse.de \
/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).