aboutsummaryrefslogtreecommitdiffstats
path: root/main/xf86-video-xgixp/git-fixes.patch
blob: 665739aad07a668076c0aa2608cb1e8cef6f14e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
From a84753dd495bcfd724406cae470e17d0c561d0c3 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Tue, 25 Sep 2012 12:55:05 +0000
Subject: Remove mibstore.h

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
diff --git a/src/xgi_driver.c b/src/xgi_driver.c
index 580a03a..8ce071b 100644
--- a/src/xgi_driver.c
+++ b/src/xgi_driver.c
@@ -53,8 +53,6 @@
 
 /* initialise a SW cursor */
 #include "mipointer.h"
-/* implementing backing store */
-#include "mibstore.h"
 
 /* colormap initialization */
 #include "micmap.h"
@@ -2041,10 +2039,6 @@ pScrn->pScreen = pScreen;
         xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "FB Manager init failed \n");
     }
 
-    /* If backing store is to be supported (as is usually the case), initialise it. */
-    miInitializeBackingStore(pScreen);
-    XGIDebug(DBG_FUNCTION, "[DBG] Jong 06142006-After miInitializeBackingStore()\n");
-
     xf86SetBackingStore(pScreen);
     XGIDebug(DBG_FUNCTION, "[DBG] Jong 06142006-After xf86SetBackingStore()\n");
 
--
cgit v0.9.0.2-2-gbebe
From e881cbb7cc4aa2d3a4477fd3e0681dc35075457a Mon Sep 17 00:00:00 2001
From: Egbert Eich <eich@freedesktop.org>
Date: Fri, 19 Jul 2013 12:10:57 +0200
Subject: Remove symbol lists as they are not used any more

Remove symbol lists once used by the old Metrolink module
loader to ensure that all symbols used by the driver are
present.
This module loader has been dropped ages ago, the function
calls into this module loader to perform this verification
has been dropped from this driver howver the symbol lists
have survived - not referenced from anywhere any more.

Reviewed-by:  <wharms@bfs.de>
Signed-off-by: Egbert Eich <eich@freedesktop.org>

diff --git a/src/xgi_driver.c b/src/xgi_driver.c
index 8ce071b..c98fcf7 100644
--- a/src/xgi_driver.c
+++ b/src/xgi_driver.c
@@ -149,149 +149,6 @@ static void xg47_setup_fb_wrap(ReadMemoryProcPtr *read_ptr,
     WriteMemoryProcPtr *write_ptr, DrawablePtr pDraw);
 static void xg47_finish_fb_wrap(DrawablePtr pDraw);
 
-
-static const char *vgahwSymbols[] = {
-    "vgaHWBlankScreen",
-    "vgaHWddc1SetSpeedWeak",
-    "vgaHWFreeHWRec",
-    "vgaHWGetHWRec",
-    "vgaHWGetIOBase",
-    "vgaHWGetIndex",
-    "vgaHWInit",
-    "vgaHWLock",
-    "vgaHWMapMem",
-    "vgaHWProtect",
-    "vgaHWRestore",
-    "vgaHWSave",
-    "vgaHWSaveScreen",
-    "vgaHWSetMmioFuncs",
-    "vgaHWUnlock",
-    NULL
-};
-
-static const char *ddcSymbols[] = {
-    "xf86DoEDID_DDC1",
-    "xf86DoEDID_DDC2",
-    "xf86PrintEDID",
-    "xf86SetDDCproperties",
-    NULL
-};
-
-static const char *i2cSymbols[] = {
-    "xf86CreateI2CBusRec",
-    "xf86I2CBusInit",
-    NULL
-};
-
-static const char *fbSymbols[] = {
-#if X_BYTE_ORDER == X_BIG_ENDIAN
-    "wfbPictureInit",
-    "wfbScreenInit",
-#else
-    "fbPictureInit",
-    "fbScreenInit",
-#endif
-    NULL
-};
-
-static const char *xaaSymbols[] = {
-    "XAACreateInfoRec",
-    "XAAestroyInfoRec",
-    "XAAFillSolidRects",
-    "XAAGetCopyROP",
-    "XAAGetPatternROP", 
-    "XAAInit",
-    "XAAScreenIndex",
-    "XAAStippleScanlineFuncLSBFirst",
-    "XAAOverlayFBfuncs",
-    "XAACachePlanarMonoStipple",
-    "XAAHelpPatternROP",
-    NULL
-};
-
-static const char *ramdacSymbols[] = {
-    "xf86CreateCursorInfoRec",
-    "xf86DestroyCursorInfoRec",
-    "xf86InitCursor",
-    NULL
-};
-
-static const char *drmSymbols[] = {
-    "drmGetInterruptFromBusID",
-    "drmCtlInstHandler",
-    "drmCtlUninstHandler",
-    "drmCommandNone",
-    "drmCommandRead",
-    "drmCommandWrite",
-    "drmCommandWriteRead",
-    "drmFreeVersion",
-    "drmGetLibVersion",
-    "drmGetVersion",
-    "drmMap",
-    "drmUnmap",
-    NULL
-};
-
-static const char *driSymbols[] = {
-    "DRICloseScreen",
-    "DRICreateInfoRec",
-    "DRIDestroyInfoRec",
-    "DRIFinishScreenInit",
-    "DRIGetContext",
-    "DRIGetDeviceInfo",
-    "DRIGetSAREAPrivate",
-    "DRILock",
-    "DRIQueryVersion",
-    "DRIScreenInit",
-    "DRIUnlock",
-    "DRICreatePCIBusID",
-    NULL
-};
-
-static const char *vbeSymbols[] = {
-    "VBEInit",
-    "VBEDPMSSet",
-    "vbeDoEDID",
-    "vbeFree",
-    NULL
-};
-
-static const char *int10Symbols[] = {
-    "xf86ExecX86int10",
-    "xf86FreeInt10",
-    "xf86InitInt10",
-    NULL
-};
-
-static const char *shadowSymbols[] = {
-    "shadowInit",
-    NULL
-};
-
-static const char *fbdevHWSymbols[] = {
-    "fbdevHWInit",
-    "fbdevHWUseBuildinMode",
-    "fbdevHWGetLineLength",
-    "fbdevHWGetVidmem",
-    "fbdevHWDPMSSet",
-    /* colormap */
-    "fbdevHWLoadPaletteWeak",
-    /* ScrnInfo hooks */
-    "fbdevHWAdjustFrameWeak",
-    "fbdevHWEnterVT",
-    "fbdevHWLeaveVT",
-    "fbdevHWModeInit",
-    "fbdevHWRestore",
-    "fbdevHWSave",
-    "fbdevHWSwitchModeWeak",
-    "fbdevHWValidModeWeak",
-    "fbdevHWMapMMIO",
-    "fbdevHWMapVidmem",
-    "fbdevHWUnmapMMIO",
-    "fbdevHWUnmapVidmem",
-    NULL
-};
-
 #ifdef XSERVER_LIBPCIACCESS
 #define XGI_DEVICE_MATCH(d, i) \
     { 0x18ca, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) }
-- 
cgit v0.10.2

From e5789dfd027424996711f366e036a933d1b98c3f Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Tue, 29 Jul 2014 09:37:18 -0400
Subject: shadow: shadowInit -> shadowAdd/Remove

Signed-off-by: Adam Jackson <ajax@redhat.com>

diff --git a/src/xgi.h b/src/xgi.h
index 8cbe77d..e122f1c 100644
--- a/src/xgi.h
+++ b/src/xgi.h
@@ -534,6 +534,7 @@ typedef struct {
     RefreshAreaFuncPtr  RefreshArea;
     CloseScreenProcPtr  CloseScreen;
     ScreenBlockHandlerProcPtr   BlockHandler;
+    CreateScreenResourcesProcPtr CreateScreenResources;
     xf86PointerMovedProc        *PointerMoved;
 
     struct xgi_regs           savedReg;
diff --git a/src/xgi_driver.c b/src/xgi_driver.c
index c98fcf7..637e360 100644
--- a/src/xgi_driver.c
+++ b/src/xgi_driver.c
@@ -1702,6 +1702,25 @@ Bool XGIFBManagerInit(ScreenPtr pScreen)
     return ret;
 }
 
+static Bool
+XGICreateScreenResources(ScreenPtr pScreen)
+{
+    ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+    XGIPtr pXGI = XGIPTR(pScrn);
+    Bool ret;
+
+    pScreen->CreateScreenResources = pXGI->CreateScreenResources;
+    ret = pScreen->CreateScreenResources(pScreen);
+    pXGI->CreateScreenResources = pScreen->CreateScreenResources;
+    pScreen->CreateScreenResources = XGICreateScreenResources;
+
+    if (ret)
+	ret = shadowAdd(pScreen, pScreen->GetScreenPixmap(pScreen),
+			XGIShadowUpdate, NULL, 0, 0);
+
+    return ret;
+}
+
 /* Called at the start of each server generation. */
 Bool XGIScreenInit(SCREEN_INIT_ARGS_DECL)
 {
@@ -2011,7 +2030,10 @@ pScrn->pScreen = pScreen;
         {
             pXGI->RefreshArea = XGIRefreshArea;
         }
-        shadowInit(pScreen, XGIShadowUpdate, 0);
+        if (!shadowSetup(pScreen))
+	    return FALSE;
+	pXGI->CreateScreenResources = pScreen->CreateScreenResources;
+	pScreen->CreateScreenResources = XGICreateScreenResources;
     }
     XGIDebug(DBG_FUNCTION, "[DBG] Jong 06142006-After pXGI->isShadowFB\n");
 
@@ -2272,8 +2294,10 @@ static Bool XGICloseScreen(CLOSE_SCREEN_ARGS_DECL)
 
     if (pXGI->pShadow)
     {
+	shadowRemove(pScreen, pScreen->GetScreenPixmap(pScreen));
         free(pXGI->pShadow);
         pXGI->pShadow = NULL;
+	pScreen->CreateScreenResources = pXGI->CreateScreenResources;
     }
 
     if (pXGI->pDgaModes)
-- 
cgit v0.10.2

From cb0ebfa54639619c11ea8277ab7573a5db7484f9 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Tue, 29 Jul 2014 09:37:44 -0400
Subject: Stop using deprecated xf86PciInfo.h

Signed-off-by: Adam Jackson <ajax@redhat.com>

diff --git a/src/xgi_driver.c b/src/xgi_driver.c
index 637e360..b440e85 100644
--- a/src/xgi_driver.c
+++ b/src/xgi_driver.c
@@ -43,9 +43,6 @@
 #include <xf86RandR12.h>
 #include "vbe.h"
 
-/* PCI vendor/device definitions */
-#include "xf86PciInfo.h"
-
 /* fbdevhw & vgahw */
 #include "fbdevhw.h"
 #include "vgaHW.h"
-- 
cgit v0.10.2

From e36331f3f2641900efe8363fe3dc15877a72c027 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Wed, 8 Oct 2014 10:34:45 +0200
Subject: Update for new damage API

Signed-off-by: Adam Jackson <ajax@redhat.com>

diff --git a/src/xgi_shadow.c b/src/xgi_shadow.c
index 80f3645..c146ce4 100644
--- a/src/xgi_shadow.c
+++ b/src/xgi_shadow.c
@@ -86,7 +86,7 @@ void XGIRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
 
 void XGIShadowUpdate (ScreenPtr pScreen, shadowBufPtr pBuf)
 {
-    RegionPtr       pRegion = &pBuf->damage;
+    RegionPtr       pRegion = DamageRegion(pBuf->pDamage);
     ScrnInfoPtr     pScrn;
     pScrn = xf86ScreenToScrn(pScreen);
 
-- 
cgit v0.10.2