1From e80e73ced69b15662103d0fd6837db4ce6c6eb5b Mon Sep 17 00:00:00 2001
2From: Dave Airlie <airlied@redhat.com>
3Date: Mon, 13 Jul 2020 09:20:15 +1000
4Subject: [PATCH] nouveau: fixup driver for new X server ABI
5
6Downloaded from upstream commit
7https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/-/commit/e80e73ced69b15662103d0fd6837db4ce6c6eb5b
8
9Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
10---
11 src/compat-api.h  | 4 ++++
12 src/nouveau_exa.c | 2 +-
13 src/nv_driver.c   | 6 +++---
14 3 files changed, 8 insertions(+), 4 deletions(-)
15
16diff --git a/src/compat-api.h b/src/compat-api.h
17index fde2f4b..8a1fcf9 100644
18--- a/src/compat-api.h
19+++ b/src/compat-api.h
20@@ -102,4 +102,8 @@
21
22 #endif
23
24+#if ABI_VIDEODRV_VERSION < SET_ABI_VERSION(25, 2)
25+#define secondary_dst slave_dst
26+#endif
27+
28 #endif
29diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
30index 55df6f8..db3b112 100644
31--- a/src/nouveau_exa.c
32+++ b/src/nouveau_exa.c
33@@ -157,7 +157,7 @@ nouveau_exa_destroy_pixmap(ScreenPtr pScreen, void *priv)
34
35 #ifdef NOUVEAU_PIXMAP_SHARING
36 static Bool
37-nouveau_exa_share_pixmap_backing(PixmapPtr ppix, ScreenPtr slave, void **handle_p)
38+nouveau_exa_share_pixmap_backing(PixmapPtr ppix, ScreenPtr secondary, void **handle_p)
39 {
40 	struct nouveau_bo *bo = nouveau_pixmap_bo(ppix);
41 	struct nouveau_pixmap *nvpix = nouveau_pixmap(ppix);
42diff --git a/src/nv_driver.c b/src/nv_driver.c
43index e72a6b6..f9ab4af 100644
44--- a/src/nv_driver.c
45+++ b/src/nv_driver.c
46@@ -559,16 +559,16 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty)
47 {
48 	RegionRec pixregion;
49
50-	PixmapRegionInit(&pixregion, dirty->slave_dst);
51+	PixmapRegionInit(&pixregion, dirty->secondary_dst);
52
53-	DamageRegionAppend(&dirty->slave_dst->drawable, &pixregion);
54+	DamageRegionAppend(&dirty->secondary_dst->drawable, &pixregion);
55 #ifdef HAS_DIRTYTRACKING_ROTATION
56 	PixmapSyncDirtyHelper(dirty);
57 #else
58 	PixmapSyncDirtyHelper(dirty, &pixregion);
59 #endif
60
61-	DamageRegionProcessPending(&dirty->slave_dst->drawable);
62+	DamageRegionProcessPending(&dirty->secondary_dst->drawable);
63 	RegionUninit(&pixregion);
64 }
65
66--
67GitLab
68
69