[PATCH 2/3] present: Query the Window's CRTC every time

Michel Dänzer michel at daenzer.net
Tue May 26 23:32:48 PDT 2015


On 27.05.2015 06:30, Keith Packard wrote:
> Michel Dänzer <michel at daenzer.net> writes:
> 
>> The problem I was hitting was that this code was running for an MSC wait
>> when the CRTC referenced by window_priv->crtc was already disabled for
>> DPMS off. This caused hangs at the GNOME lock screen. This patch seems
>> to fix that problem.
> 
> Why isn't your queue_vblank function bailing when asked to queue a
> request for a CRTC which is disabled? If it simply fails,
> present_execute will get called immediately and the client would
> continue happily along.

That would mean all PresentNotifyMSC requests would send their
PresentCompleteKindNotifyMS events immediately during DPMS off, wouldn't
it? Won't that confuse apps which actually care about the MSC values and
timing?

I guess that could be solved by making present_queue_vblank() fall back
to present_fake_queue_vblank() if the driver hook fails.


>> So, I vote for applying this patch (possibly with a better commit log)
>> to master ASAP and backporting it to stable branches.
> 
> It looks like this will only solve the problem of how to deal with new
> PresentNotifyMSC requests; any PresentPixmap or PresentNotifyMSC
> requests which are pending when the CRTC is disabled may end up getting
> wedged too?

That's possible, but it's a different issue. Let's fix the known hangs
happening in practice now and then worry about potential other hangs?


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list