Blame SOURCES/0008-modesetting-Add-glamor_finish-convenience-macro.patch

cf7b2a
From 7f1bedcf27cfd09162544ff1b18c21c8e5695a9d Mon Sep 17 00:00:00 2001
cf7b2a
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
cf7b2a
Date: Fri, 22 Nov 2019 18:05:04 +0100
cf7b2a
Subject: [PATCH xserver 08/11] modesetting: Add glamor_finish() convenience
cf7b2a
 macro
cf7b2a
cf7b2a
This will simplify backporting the following fix to the 1.20 branch.
cf7b2a
cf7b2a
Reviewed-by: Adam Jackson <ajax@redhat.com>
cf7b2a
(cherry picked from commit 06ef320e9bc1f1098df9cd5581f072528f28128e)
cf7b2a
---
cf7b2a
 hw/xfree86/drivers/modesetting/driver.c          | 2 +-
cf7b2a
 hw/xfree86/drivers/modesetting/driver.h          | 2 ++
cf7b2a
 hw/xfree86/drivers/modesetting/drmmode_display.c | 2 +-
cf7b2a
 3 files changed, 4 insertions(+), 2 deletions(-)
cf7b2a
cf7b2a
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
cf7b2a
index 4f4db67b7..afba8538a 100644
cf7b2a
--- a/hw/xfree86/drivers/modesetting/driver.c
cf7b2a
+++ b/hw/xfree86/drivers/modesetting/driver.c
cf7b2a
@@ -615,7 +615,7 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty, int *timeout)
cf7b2a
          * the shared pixmap, but not all).
cf7b2a
          */
cf7b2a
         if (ms->drmmode.glamor)
cf7b2a
-            ms->glamor.finish(screen);
cf7b2a
+            glamor_finish(screen);
cf7b2a
 #endif
cf7b2a
         /* Ensure the slave processes the damage immediately */
cf7b2a
         if (timeout)
cf7b2a
diff --git a/hw/xfree86/drivers/modesetting/driver.h b/hw/xfree86/drivers/modesetting/driver.h
cf7b2a
index 5e4d2509a..c6e7cd0c8 100644
cf7b2a
--- a/hw/xfree86/drivers/modesetting/driver.h
cf7b2a
+++ b/hw/xfree86/drivers/modesetting/driver.h
cf7b2a
@@ -158,6 +158,8 @@ typedef struct _modesettingRec {
cf7b2a
 
cf7b2a
 } modesettingRec, *modesettingPtr;
cf7b2a
 
cf7b2a
+#define glamor_finish(screen) ms->glamor.finish(screen)
cf7b2a
+
cf7b2a
 #define modesettingPTR(p) ((modesettingPtr)((p)->driverPrivate))
cf7b2a
 modesettingEntPtr ms_ent_priv(ScrnInfoPtr scrn);
cf7b2a
 
cf7b2a
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
cf7b2a
index 28609db7c..6516fac5f 100644
cf7b2a
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
cf7b2a
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
cf7b2a
@@ -770,7 +770,7 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
cf7b2a
 #ifdef GLAMOR_HAS_GBM
cf7b2a
     /* Make sure any pending drawing will be visible in a new scanout buffer */
cf7b2a
     if (drmmode->glamor)
cf7b2a
-        ms->glamor.finish(screen);
cf7b2a
+        glamor_finish(screen);
cf7b2a
 #endif
cf7b2a
 
cf7b2a
     if (ms->atomic_modeset) {
cf7b2a
-- 
cf7b2a
2.33.1
cf7b2a