From: Brian Norris <briannorris@chromium.org>
To: "Michel Dänzer" <michel.daenzer@mailbox.org>
Cc: Neil Armstrong <neil.armstrong@linaro.org>,
kernelci-results@groups.io, bot@kernelci.org,
Jonas Karlman <jonas@kwiboo.se>,
Robert Foss <robert.foss@linaro.org>,
Douglas Anderson <dianders@chromium.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Mark Brown <broonie@kernel.org>,
Sean Paul <seanpaul@chromium.org>,
dri-devel@lists.freedesktop.org,
Andrzej Hajda <andrzej.hajda@intel.com>,
gtucker@collabora.com, linux-arm-kernel@lists.infradead.org,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Subject: Re: renesas/master bisection: igt-kms-rockchip.kms_vblank.pipe-A-wait-forked on rk3399-gru-kevin
Date: Thu, 5 Jan 2023 16:59:51 -0800 [thread overview]
Message-ID: <Y7dyh1AkJRZnf+Dq@google.com> (raw)
In-Reply-To: <9ff68af1-63f6-1a95-6380-d0d8503fe511@mailbox.org>
On Wed, Jan 04, 2023 at 10:11:46AM +0100, Michel Dänzer wrote:
> On 1/4/23 03:11, Brian Norris wrote:
> > On Tue, Jan 03, 2023 at 07:04:00PM +0100, Michel Dänzer wrote:
> >> On 12/21/22 23:02, Brian Norris wrote:
> >
> >>> 3. leave vblank enabled even in the presence of PSR
> >
> > I'm leaning toward this.
>
> If this means vblank interrupts will arrive as expected even while in PSR, that may be the ideal solution indeed.
Yes. And I think I have a working patchset for this now. It passes all
the igt-gpu-tools/kms_vblank tests for me now, and I don't think it
causes any other issues. I'll send it out shortly, after a bit more
testing.
Side note: I believe this vblank-disabled issue actually came in as an
upstream regression at commit 6c836d965bad ("drm/rockchip: Use the
helpers for PSR"); before that, we were doing this very differently, and
didn't touch vblank at all for PSR, similar to the "downstream" stuff I
mentioned earlier.
> >> 5. Go/stay out of PSR while vblank interrupts are enabled (probably want to make sure vblankoffdelay is set up such that vblank interrupts are disabled ASAP)
> >
> > That seems not extremely nice, to waste power. Based on the earlier
> > downstream implementation (which left vblank interrupts enabled), I'd
> > wager there's a much larger power win from PSR (on the display-transport
> > and memory-bandwidth costs), relative to the power cost of vblank
> > interrupts.
> >
> > Also, messing with vblankoffdelay sounds likely to trigger the races
> > mentioned in the drm_vblank.c kerneldoc.
>
> Not sure how likely that is, quite a few drivers are setting dev->vblank_disable_immediate = true.
>
> With that, vblank interrupts should generally be enabled only while there are screen updates as well[0], in which case PSR shouldn't be possible anyway.
>
> [0] There may be user space which uses the vblank ioctls even while there are no screen updates though, which would prevent PSR in this case.
OK. I'm just reading docs here; definitely not an expert.
> >>> [1] Or is it? I don't really know the DRM_IOCTL_WAIT_VBLANK ABI
> >>> contract in the presence of PSR, but I believe the upstream PSR
> >>> support has always worked this way. I could imagine
> >>> DRM_IOCTL_WAIT_VBLANK users might not love seeing EINVAL here
> >>> though.
> >>
> >> Yeah, that's pretty likely to cause issues with existing real-world user space.
> >
> > OK. Any hints as to what kind of user space uses this?
>
> I don't have any specific example, just thinking about how user space could respond to the vblank ioctls returning an error, and it would seem to be generally either of:
>
> * Just run non-throttled, which might negate any energy savings from PSR
> * Fail to work altogether
>
>
> > I'm in part simply curious, but I'm also wondering what the
> > error-handling and reliability (e.g., what if vblanks don't come?)
> > expectations might be in practice.
>
> If vblank events never come, user space might freeze.
Thanks. If my patchset works out like I expect, this should no longer be
noticeable to user space, so I don't really have to test out your
educated guesses :)
Thanks for the idea-bouncing.
Brian
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-01-06 1:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6398848e.170a0220.f8e8e.d44f@mx.google.com>
2022-12-13 16:51 ` renesas/master bisection: igt-kms-rockchip.kms_vblank.pipe-A-wait-forked on rk3399-gru-kevin Mark Brown
2022-12-14 10:06 ` Geert Uytterhoeven
2022-12-14 12:55 ` Guillaume Tucker
2022-12-14 13:50 ` Mark Brown
2022-12-14 14:27 ` Guillaume Tucker
2022-12-14 14:54 ` Mark Brown
2022-12-14 14:03 ` Geert Uytterhoeven
2022-12-14 14:16 ` Guillaume Tucker
2022-12-14 14:39 ` Mark Brown
2022-12-14 15:02 ` Geert Uytterhoeven
2022-12-14 15:06 ` Geert Uytterhoeven
2022-12-15 3:04 ` Brian Norris
2022-12-21 22:02 ` Brian Norris
2023-01-03 18:04 ` Michel Dänzer
2023-01-04 2:11 ` Brian Norris
2023-01-04 9:11 ` Michel Dänzer
2023-01-06 0:59 ` Brian Norris [this message]
2023-01-06 1:43 ` Brian Norris
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=Y7dyh1AkJRZnf+Dq@google.com \
--to=briannorris@chromium.org \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=andrzej.hajda@intel.com \
--cc=bot@kernelci.org \
--cc=broonie@kernel.org \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gtucker@collabora.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kernelci-results@groups.io \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=michel.daenzer@mailbox.org \
--cc=neil.armstrong@linaro.org \
--cc=robert.foss@linaro.org \
--cc=seanpaul@chromium.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).