After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728979 - Call swap notify handler even when pageflip ioctl fails
Call swap notify handler even when pageflip ioctl fails
Status: RESOLVED FIXED
Product: cogl
Classification: Platform
Component: general
1.18.x
Other Linux
: Normal normal
: ---
Assigned To: Cogl maintainer(s)
Cogl maintainer(s)
wayland
Depends on:
Blocks: wayland
 
 
Reported: 2014-04-25 20:52 UTC by Kristian Høgsberg
Modified: 2014-04-30 16:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.48 KB, patch)
2014-04-25 20:52 UTC, Kristian Høgsberg
none Details | Review
patch v2 (3.28 KB, patch)
2014-04-29 12:53 UTC, Neil Roberts
none Details | Review

Description Kristian Høgsberg 2014-04-25 20:52:50 UTC
Created attachment 275168 [details] [review]
patch

This can happen when we dpms off the output or when login1 takes away
    drm master status from our drm fd.  In either case, we need to call
    the swap notify handler so that the compositor dosn't get stuck waiting
    for that notification.  The compositor should stop repainting shortly in
    both cases, as it's either going into dpms off mode or vt switching away.
Comment 1 Neil Roberts 2014-04-29 12:53:04 UTC
Created attachment 275420 [details] [review]
patch v2

Thanks for the patch. I think we need to make sure to set kms_onscreen->pending_swap_notify outside of the if-statement like it does in page_flip_handler in case there are multiple onscreens. I think the idea is that there is a single idle handler which will flush the pending swap notifies for all onscreens that have the flag set. It might also be nice to put that bit of a code in a little helper function so it can be shared with page_flip_handler. Here is a second version of the patch which does that. I've kept the commit author as Kristian. Would that be ok with you?
Comment 2 Kristian Høgsberg 2014-04-29 18:39:44 UTC
That makes sense, we want to set the flag for the onscreen even if the renderer already has an idle scheduled.  New patch looks good, thanks for reviewing.
Comment 3 Neil Roberts 2014-04-30 16:03:10 UTC
Ok, thanks. I've pushed v2 of the patch to master and the 1.18 branch:

https://git.gnome.org/browse/cogl/commit/?h=cogl-1.18&id=22378d572b039e4fe6c
https://git.gnome.org/browse/cogl/commit/?id=309bf866ca83664fe8b74f43d55