blob: 04fd623e8fc50b2371f8f9219b2acdeab92d5e3f [file] [log] [blame]
Brad Bishop26bdd442019-08-16 17:08:17 -04001From acdceb0b28d86199b8c2233880fa8a04cb24d4d4 Mon Sep 17 00:00:00 2001
2From: Kai Kang <kai.kang@windriver.com>
3Date: Wed, 24 Jul 2019 09:48:04 +0800
4Subject: [PATCH] Revert "compositor: Revert to GLX as default vblank method
5 (again)"
6
7This reverts commit e07574d6e7a2dbaa08c3ba4765c6306073d9493e.
8
9It sets the default vblank method (auto) to GLX from 4.13.2. But it
10fails to start xfwm4 on intel-x86-64 boards with error:
11
12| xfwm4: ../mesa-19.1.1/src/mesa/drivers/dri/i965/intel_mipmap_tree.c:1293:
13| intel_miptree_match_image: Assertion `image->TexObject->Target == mt->target' failed.
14| Aborted
15
16There is also a RHEL defect:
17https://bugzilla.redhat.com/show_bug.cgi?id=1678334
18
19Revert the commit to fix the issue.
20
21Upstream-Status: Inappropriate [workaround]
22
23Signed-off-by: Kai Kang <kai.kang@windriver.com>
24---
25 src/compositor.c | 41 +++++++++++++++++++----------------------
26 1 file changed, 19 insertions(+), 22 deletions(-)
27
28diff --git a/src/compositor.c b/src/compositor.c
29index 25615282..daced607 100644
30--- a/src/compositor.c
31+++ b/src/compositor.c
32@@ -4483,13 +4483,28 @@ compositorManageScreen (ScreenInfo *screen_info)
33 XClearArea (display_info->dpy, screen_info->output, 0, 0, 0, 0, TRUE);
34 TRACE ("manual compositing enabled");
35
36+#ifdef HAVE_PRESENT_EXTENSION
37+ screen_info->use_present = display_info->have_present &&
38+ (screen_info->vblank_mode == VBLANK_AUTO ||
39+ screen_info->vblank_mode == VBLANK_XPRESENT);
40+ if (screen_info->use_present)
41+ {
42+ screen_info->present_pending = FALSE;
43+ XPresentSelectInput (display_info->dpy,
44+ screen_info->output,
45+ PresentCompleteNotifyMask);
46+ }
47+#else /* HAVE_PRESENT_EXTENSION */
48+ screen_info->use_present = FALSE;
49+#endif /* HAVE_PRESENT_EXTENSION */
50+
51 #ifdef HAVE_EPOXY
52- screen_info->use_glx = (screen_info->vblank_mode == VBLANK_AUTO ||
53- screen_info->vblank_mode == VBLANK_GLX);
54+ screen_info->use_glx = !screen_info->use_present &&
55 #ifdef HAVE_XSYNC
56- screen_info->use_glx &= display_info->have_xsync;
57+ display_info->have_xsync &&
58 #endif /* HAVE_XSYNC */
59-
60+ (screen_info->vblank_mode == VBLANK_AUTO ||
61+ screen_info->vblank_mode == VBLANK_GLX);
62 if (screen_info->use_glx)
63 {
64 screen_info->glx_context = None;
65@@ -4503,24 +4518,6 @@ compositorManageScreen (ScreenInfo *screen_info)
66 screen_info->use_glx = FALSE;
67 #endif /* HAVE_EPOXY */
68
69-#ifdef HAVE_PRESENT_EXTENSION
70- screen_info->use_present = display_info->have_present &&
71-#ifdef HAVE_EPOXY
72- !screen_info->use_glx &&
73-#endif /* HAVE_EPOXY */
74- (screen_info->vblank_mode == VBLANK_AUTO ||
75- screen_info->vblank_mode == VBLANK_XPRESENT);
76- if (screen_info->use_present)
77- {
78- screen_info->present_pending = FALSE;
79- XPresentSelectInput (display_info->dpy,
80- screen_info->output,
81- PresentCompleteNotifyMask);
82- }
83-#else /* HAVE_PRESENT_EXTENSION */
84- screen_info->use_present = FALSE;
85-#endif /* HAVE_PRESENT_EXTENSION */
86-
87 if (screen_info->use_present)
88 {
89 g_info ("Compositor using XPresent for vsync");
90--
912.20.1
92