diff options
author | Ray Strode <rstrode@redhat.com> | 2015-08-26 17:02:45 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2015-09-03 17:29:28 -0400 |
commit | 6bd49c3dc87502534834b773490de355789179c9 (patch) | |
tree | 3b06195a191158fcb48337c3f10c0b75659fe52b | |
parent | 78c44ab132261ca2df37877c60eb528ead7b38ed (diff) | |
download | cogl-6bd49c3dc87502534834b773490de355789179c9.tar.gz |
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
-rw-r--r-- | cogl/winsys/cogl-winsys-egl-kms.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cogl/winsys/cogl-winsys-egl-kms.c b/cogl/winsys/cogl-winsys-egl-kms.c index 683bbc88..20c325cd 100644 --- a/cogl/winsys/cogl-winsys-egl-kms.c +++ b/cogl/winsys/cogl-winsys-egl-kms.c @@ -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; |