kms-winsys: don't disable page flipping on EACCES

If the user switches VTs in the middle of a page flip, the
page flip operation may fail with EACCES. page flipping will
work next time the VT becomes active, so we shouldn't disable
page flipping in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=754540
This commit is contained in:
Ray Strode 2015-08-26 17:02:45 -04:00
parent 78c44ab132
commit 6bd49c3dc8

View File

@ -40,6 +40,7 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <errno.h>
#include <stddef.h>
#include <drm.h>
#include <xf86drm.h>
@ -601,7 +602,7 @@ flip_all_crtcs (CoglDisplay *display, CoglFlipKMS *flip, int fb_id)
ret = drmModePageFlip (kms_renderer->fd,
crtc->id, fb_id,
DRM_MODE_PAGE_FLIP_EVENT, flip);
if (ret)
if (ret != 0 && ret != -EACCES)
{
g_warning ("Failed to flip: %m");
kms_renderer->page_flips_not_supported = TRUE;