From: Daniel Vetter <daniel@ffwll.ch>
To: "Michel Dänzer" <michel@daenzer.net>
Cc: "Mario Kleiner" <mario.kleiner.de@gmail.com>,
"Vlastimil Babka" <vbabka@suse.cz>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
dri-devel@lists.freedesktop.org, mgraesslin@kde.org,
kwin@kde.org, "Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: linux-4.4 bisected: kwin5 stuck on kde5 loading screen with radeon
Date: Thu, 21 Jan 2016 11:09:05 +0100 [thread overview]
Message-ID: <20160121100905.GL19130@phenom.ffwll.local> (raw)
In-Reply-To: <56A0989E.30006@daenzer.net>
On Thu, Jan 21, 2016 at 05:36:46PM +0900, Michel Dänzer wrote:
> On 21.01.2016 16:58, Daniel Vetter wrote:
> > On Thu, Jan 21, 2016 at 03:41:27PM +0900, Michel Dänzer wrote:
> >> On 21.01.2016 15:38, Michel Dänzer wrote:
> >>> On 21.01.2016 14:31, Mario Kleiner wrote:
> >>>> On 01/21/2016 04:43 AM, Michel Dänzer wrote:
> >>>>> On 21.01.2016 05:32, Mario Kleiner wrote:
> >>>>>>
> >>>>>> So the problem is that AMDs hardware frame counters reset to
> >>>>>> zero during a modeset. The old DRM code dealt with drivers doing that by
> >>>>>> keeping vblank irqs enabled during modesets and incrementing vblank
> >>>>>> count by one during each vblank irq, i think that's what
> >>>>>> drm_vblank_pre_modeset() and drm_vblank_post_modeset() were meant for.
> >>>>>
> >>>>> Right, looks like there's been a regression breaking this. I suspect the
> >>>>> problem is that vblank->last isn't getting updated from
> >>>>> drm_vblank_post_modeset. Not sure which change broke that though, or how
> >>>>> to fix it. Ville?
> >>>>>
> >>>>
> >>>> The whole logic has changed and the software counter updates are now
> >>>> driven all the time by the hw counter.
> >>>>
> >>>>>
> >>>>> BTW, I'm seeing a similar issue with drm_vblank_on/off as well, which
> >>>>> exposed the bug fixed by 209e4dbc ("drm/vblank: Use u32 consistently for
> >>>>> vblank counters"). I've been meaning to track that down since then; one
> >>>>> of these days hopefully, but if anybody has any ideas offhand...
> >>>>
> >>>> I spent the last few hours reading through the drm and radeon code and i
> >>>> think what should probably work is to replace the
> >>>> drm_vblank_pre/post_modeset calls in radeon/amdgpu by drm_vblank_off/on
> >>>> calls. These are apparently meant for drivers whose hw counters reset
> >>>> during modeset, [...]
> >>>
> >>> ... just like drm_vblank_pre/post_modeset. That those were broken is a
> >>> regression which needs to be fixed anyway. I don't think switching to
> >>> drm_vblank_on/off is suitable for stable trees.
> >>
> >> Even more so since as I mentioned, there is (has been since at least
> >> about half a year ago) a counter jumping bug with drm_vblank_on/off as well.
> >
> > Hm, never noticed you reported that. I thought the reason for not picking
> > up my drm_vblank_on/off patches was that there's a bug in amdgpu userspace
> > where it tried to use vblank waits on a disabled pipe?
>
> http://lists.freedesktop.org/archives/dri-devel/2015-July/086451.html
>
> I don't know why it didn't get picked up.
Yeah, checking my tree your ack is indeed in there. I think I'll resend
them.
> > Can you please point me at the vblank on/off jump bug please?
>
> AFAIR I originally reported it in response to
> http://lists.freedesktop.org/archives/dri-devel/2015-August/087841.html
> , but I can't find that in the archives, so maybe that was just on IRC.
> See
> http://lists.freedesktop.org/archives/dri-devel/2016-January/099122.html
> . Basically, I ran into the bug fixed by your patch because the counter
> jumped forward on every DPMS off, so it hit the 32-bit boundary after
> just a few days.
Ok, so just uncovered the overflow bug.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2016-01-21 10:09 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-15 10:34 Vlastimil Babka
2016-01-15 12:26 ` Ville Syrjälä
2016-01-15 12:40 ` Vlastimil Babka
2016-01-16 4:24 ` Mario Kleiner
2016-01-18 10:49 ` Vlastimil Babka
2016-01-18 14:06 ` Vlastimil Babka
2016-01-18 14:14 ` Christian König
2016-01-20 20:25 ` Vlastimil Babka
2016-01-20 20:32 ` Mario Kleiner
2016-01-21 3:43 ` Michel Dänzer
2016-01-21 5:31 ` Mario Kleiner
2016-01-21 6:38 ` Michel Dänzer
2016-01-21 6:41 ` Michel Dänzer
2016-01-21 7:58 ` Daniel Vetter
2016-01-21 8:36 ` Michel Dänzer
2016-01-21 10:09 ` Daniel Vetter [this message]
2016-01-22 3:06 ` Michel Dänzer
2016-01-22 15:18 ` Ville Syrjälä
2016-01-22 18:29 ` Mario Kleiner
2016-01-23 18:23 ` Mario Kleiner
2016-01-25 4:15 ` Michel Dänzer
2016-01-25 13:16 ` Mario Kleiner
2016-01-25 13:23 ` Ville Syrjälä
2016-01-25 13:44 ` Mario Kleiner
2016-01-25 14:53 ` Ville Syrjälä
2016-01-25 16:38 ` Mario Kleiner
2016-01-25 18:51 ` Daniel Vetter
2016-01-25 19:30 ` Mario Kleiner
2016-01-25 20:32 ` Daniel Vetter
2016-01-25 21:42 ` Mario Kleiner
2016-01-25 22:05 ` Daniel Vetter
2016-01-21 8:28 ` Mario Kleiner
2016-01-21 9:15 ` Vlastimil Babka
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=20160121100905.GL19130@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kwin@kde.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.kleiner.de@gmail.com \
--cc=mgraesslin@kde.org \
--cc=michel@daenzer.net \
--cc=vbabka@suse.cz \
--cc=ville.syrjala@linux.intel.com \
/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
Powered by JetHome