1From 7dd0dfaa33f5efdb9fb0f527ae2a4452b20dd358 Mon Sep 17 00:00:00 2001
2From: Jeffy Chen <jeffy.chen@rock-chips.com>
3Date: Mon, 31 May 2021 01:41:57 +0800
4Subject: [PATCH 10/15] HACK: [ozone/wayland]: Force disable implicit external
5 sync
6
7The Mali's implicit external sync seems broken.
8
9Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
10---
11 ui/ozone/platform/wayland/gpu/gbm_surfaceless_wayland.cc | 3 ++-
12 1 file changed, 2 insertions(+), 1 deletion(-)
13
14diff --git a/ui/ozone/platform/wayland/gpu/gbm_surfaceless_wayland.cc b/ui/ozone/platform/wayland/gpu/gbm_surfaceless_wayland.cc
15index 2a9a88cf7..bb9e1d28b 100644
16--- a/ui/ozone/platform/wayland/gpu/gbm_surfaceless_wayland.cc
17+++ b/ui/ozone/platform/wayland/gpu/gbm_surfaceless_wayland.cc
18@@ -231,7 +231,8 @@ void GbmSurfacelessWayland::SwapBuffersAsync(
19   } else {
20     // TODO(fangzhoug): the following should be replaced by a per surface flush
21     // as it gets implemented in GL drivers.
22-    EGLSyncKHR fence = InsertFence(has_implicit_external_sync_);
23+    // HACK: The Mali's implicit external sync seems broken.
24+    EGLSyncKHR fence = InsertFence(/* has_implicit_external_sync_ */ false);
25     CHECK_NE(fence, EGL_NO_SYNC_KHR) << "eglCreateSyncKHR failed";
26
27     fence_wait_task = base::BindOnce(&WaitForEGLFence, GetDisplay(), fence);
28--
292.20.1
30
31