[cogl/cogl-1.22] kms-winsys: don't disable page flipping on EACCES
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/cogl-1.22] kms-winsys: don't disable page flipping on EACCES
- Date: Thu, 3 Sep 2015 21:29:51 +0000 (UTC)
commit 6bd49c3dc87502534834b773490de355789179c9
Author: Ray Strode <rstrode redhat com>
Date: Wed Aug 26 17:02:45 2015 -0400
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
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 683bbc8..20c325c 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]