Blame SOURCES/eglstream-mailbox-mode.patch

776610
From 6cfab9d2140aecff2f7e267bfb97c810c38823f2 Mon Sep 17 00:00:00 2001
776610
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
776610
Date: Fri, 11 Jan 2019 16:05:09 +0100
776610
Subject: [PATCH 1/2] renderer/native: Make EGLStream page flip errors
776610
 non-fatal
776610
776610
Just continue rendering; we don't care if we were busy once, as it'll most
776610
likely work when we flip the next time.
776610
---
776610
 src/backends/native/meta-renderer-native.c | 8 +-------
776610
 1 file changed, 1 insertion(+), 7 deletions(-)
776610
776610
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
776610
index 470da8845..130ca5268 100644
776610
--- a/src/backends/native/meta-renderer-native.c
776610
+++ b/src/backends/native/meta-renderer-native.c
776610
@@ -96,8 +96,6 @@ typedef struct _MetaRendererNativeGpuData
776610
 #ifdef HAVE_EGL_DEVICE
776610
   struct {
776610
     EGLDeviceEXT device;
776610
-
776610
-    gboolean no_egl_output_drm_flip_event;
776610
   } egl;
776610
 #endif
776610
 
776610
@@ -1293,8 +1291,6 @@ flip_egl_stream (MetaOnscreenNative *onscreen_native,
776610
   renderer_gpu_data =
776610
     meta_renderer_native_get_gpu_data (onscreen_native->renderer_native,
776610
                                        onscreen_native->render_gpu);
776610
-  if (renderer_gpu_data->egl.no_egl_output_drm_flip_event)
776610
-    return FALSE;
776610
 
776610
   closure_container =
776610
     meta_gpu_kms_wrap_flip_closure (onscreen_native->render_gpu, flip_closure);
776610
@@ -1315,9 +1311,7 @@ flip_egl_stream (MetaOnscreenNative *onscreen_native,
776610
       if (error->domain != META_EGL_ERROR ||
776610
           error->code != EGL_RESOURCE_BUSY_EXT)
776610
         {
776610
-          g_warning ("Failed to flip EGL stream (%s), relying on clock from "
776610
-                     "now on", error->message);
776610
-          renderer_gpu_data->egl.no_egl_output_drm_flip_event = TRUE;
776610
+          g_warning ("Failed to flip EGL stream: %s", error->message);
776610
         }
776610
       g_error_free (error);
776610
       meta_gpu_kms_flip_closure_container_free (closure_container);
776610
-- 
776610
2.19.2
776610
776610
776610
From 7c22e8434348b16ff433494026a69d2892f3e48d Mon Sep 17 00:00:00 2001
776610
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
776610
Date: Fri, 11 Jan 2019 16:03:37 +0100
776610
Subject: [PATCH 2/2] renderer/native: Make the EGLStreams operate in mailbox
776610
 mode
776610
776610
This means eglSwapBuffers() wont dead lock if there is an old buffer pending
776610
page flip. This could happen after e.g. mode changes or for other reasons.
776610
---
776610
 src/backends/native/meta-renderer-native.c | 2 +-
776610
 1 file changed, 1 insertion(+), 1 deletion(-)
776610
776610
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
776610
index 130ca5268..af5693b6e 100644
776610
--- a/src/backends/native/meta-renderer-native.c
776610
+++ b/src/backends/native/meta-renderer-native.c
776610
@@ -2122,7 +2122,7 @@ meta_renderer_native_create_surface_egl_device (CoglOnscreen       *onscreen,
776610
   EGLOutputLayerEXT output_layer;
776610
   EGLAttrib output_attribs[3];
776610
   EGLint stream_attribs[] = {
776610
-    EGL_STREAM_FIFO_LENGTH_KHR, 1,
776610
+    EGL_STREAM_FIFO_LENGTH_KHR, 0,
776610
     EGL_CONSUMER_AUTO_ACQUIRE_EXT, EGL_FALSE,
776610
     EGL_NONE
776610
   };
776610
-- 
776610
2.19.2
776610