summaryrefslogtreecommitdiff
path: root/extra/xf86-video-sisimedia/0007-Remove-useless-loader-symbol-lists.patch
blob: 3952133753a60991443765993f46c3d33354def2 (plain)
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
From ae1a7dcebdac904c8068cc38fb77648c548f5075 Mon Sep 17 00:00:00 2001
From: Paulo Ricardo Zanoni <pzanoni@mandriva.com>
Date: Thu, 22 Apr 2010 11:19:29 -0300
Subject: [PATCH] Remove useless loader symbol lists

Adaption of xf86-video-sis patch 74553b5ee476a0dd28e136f5a33a546ea0c3ef28
---
 src/sis_driver.c |  150 +-----------------------------------------------------
 1 files changed, 1 insertions(+), 149 deletions(-)

diff --git a/src/sis_driver.c b/src/sis_driver.c
index d56182f..96255d3 100644
--- a/src/sis_driver.c
+++ b/src/sis_driver.c
@@ -227,126 +227,6 @@ static PciChipsets XGIPciChipsets[] = {
     { -1,                   -1,                 RES_UNDEFINED }
 };
 
-#ifdef SIS_USE_XAA
-static const char *xaaSymbols[] = {
-    "XAACreateInfoRec",
-    "XAADestroyInfoRec",
-    "XAAHelpPatternROP",
-    "XAAInit",
-    NULL
-};
-#endif
-
-#ifdef SIS_USE_EXA
-static const char *exaSymbols[] = {
-    "exaGetVersion",
-    "exaDriverInit",
-    "exaDriverFini",
-    "exaOffscreenAlloc",
-    "exaOffscreenFree",
-    NULL
-};
-#endif
-
-static const char *fbSymbols[] = {
-    "fbPictureInit",
-    "fbScreenInit",
-    NULL
-};
-
-static const char *shadowSymbols[] = {
-    "ShadowFBInit",
-    NULL
-};
-
-static const char *ramdacSymbols[] = {
-    "xf86CreateCursorInfoRec",
-    "xf86DestroyCursorInfoRec",
-    "xf86InitCursor",
-    NULL
-};
-
-static const char *ddcSymbols[] = {
-    "xf86PrintEDID",
-    "xf86InterpretEDID",
-    NULL
-};
-
-static const char *int10Symbols[] = {
-    "xf86FreeInt10",
-    "xf86InitInt10",
-    NULL
-};
-
-static const char *vbeSymbols[] = {
-#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,99,0,0)
-    "VBEInit",
-#else
-    "VBEExtendedInit",
-#endif
-    "vbeDoEDID",
-    "vbeFree",
-    "VBEGetVBEInfo",
-    "VBEFreeVBEInfo",
-    "VBEGetModeInfo",
-    "VBEFreeModeInfo",
-    "VBESaveRestore",
-    "VBESetVBEMode",
-    "VBEGetVBEMode",
-    "VBESetDisplayStart",
-    "VBESetGetLogicalScanlineLength",
-    NULL
-};
-
-#ifdef XF86DRI
-static const char *drmSymbols[] = {
-    "drmAddMap",
-    "drmAgpAcquire",
-    "drmAgpRelease",
-    "drmAgpAlloc",
-    "drmAgpFree",
-    "drmAgpBase",
-    "drmAgpBind",
-    "drmAgpUnbind",
-    "drmAgpEnable",
-    "drmAgpGetMode",
-    "drmCtlInstHandler",
-    "drmCtlUninstHandler",
-    "drmGetInterruptFromBusID",
-#ifndef SISHAVEDRMWRITE
-    "drmSiSAgpInit",
-#else
-    "drmCommandWrite",
-#endif
-#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,0,0,0)
-    "drmGetVersion",
-    "drmFreeVersion",
-#endif
-    NULL
-};
-
-static const char *driSymbols[] = {
-    "DRICreateInfoRec",
-    "DRIScreenInit",
-    "DRIFinishScreenInit",
-    "DRIDestroyInfoRec",
-    "DRICloseScreen",
-    "DRIGetSAREAPrivate",
-    "DRILock",
-    "DRIUnlock",
-    "DRIQueryVersion",
-    "GlxSetVisualConfigs",
-    NULL
-};
-
-#ifdef XFree86LOADER
-static const char *driRefSymbols[] = {
-    "DRICreatePCIBusID",  /* not REQUIRED, but eventually referenced */
-    NULL
-};
-#endif
-#endif  /* XF86DRI */
-
 #ifdef XFree86LOADER
 
 static MODULESETUPPROTO(sisSetup);
@@ -382,19 +262,6 @@ sisSetup(pointer module, pointer opts, int *errmaj, int *errmin)
     if(!setupDone) {
        setupDone = TRUE;
        xf86AddDriver(&SIS, module, SIS_HaveDriverFuncs);
-       LoaderRefSymLists(fbSymbols,
-#ifdef SIS_USE_XAA
-			 xaaSymbols,
-#endif
-#ifdef SIS_USE_EXA
-			 exaSymbols,
-#endif
-			 shadowSymbols, ramdacSymbols,
-			 vbeSymbols, int10Symbols,
-#ifdef XF86DRI
-			 drmSymbols, driSymbols, driRefSymbols,
-#endif
-			 NULL);
        return (pointer)TRUE;
     }
 
@@ -1068,7 +935,6 @@ SiS_LoadInitVBE(ScrnInfoPtr pScrn)
        return;
 
     if(xf86LoadSubModule(pScrn, "vbe")) {
-       xf86LoaderReqSymLists(vbeSymbols, NULL);
 #if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,99,0,0)
        pSiS->pVbe = VBEInit(pSiS->pInt, pSiS->pEnt->index);
 #else
@@ -1092,7 +958,6 @@ SiSLoadInitDDCModule(ScrnInfoPtr pScrn)
        return TRUE;
 
     if(xf86LoadSubModule(pScrn, "ddc")) {
-       xf86LoaderReqSymLists(ddcSymbols, NULL);
        pSiS->haveDDC = TRUE;
        return TRUE;
     }
@@ -3586,7 +3451,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 	  xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 		"Initializing adapter through int10\n");
 	  if(xf86LoadSubModule(pScrn, "int10")) {
-	     xf86LoaderReqSymLists(int10Symbols, NULL);
 	     pSiS->pInt = xf86InitInt10(pSiS->pEnt->index);
 	  } else {
 	     SISErrorLog(pScrn, "Failed to load int10 module\n");
@@ -3683,7 +3547,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
        SISErrorLog(pScrn, "Could not load ramdac module\n");
        goto my_error_1;
     }
-    xf86LoaderReqSymLists(ramdacSymbols, NULL);
 
     /* Set pScrn->monitor */
     pScrn->monitor = pScrn->confScreen->monitor;
@@ -5868,22 +5731,18 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 	SISErrorLog(pScrn, "Unsupported framebuffer bpp (%d)\n", pScrn->bitsPerPixel);
 	goto my_error_1;
     }
-    xf86LoaderReqSymLists(fbSymbols, NULL);
 
     /* Load XAA/EXA (if needed) */
     if(!pSiS->NoAccel) {
        char *modName = NULL;
-       const char **symNames = NULL;
 #ifdef SIS_USE_XAA
        if(!pSiS->useEXA) {
 	  modName = "xaa";
-	  symNames = xaaSymbols;
        }
 #endif
 #ifdef SIS_USE_EXA
        if(pSiS->useEXA) {
 	  modName = "exa";
-	  symNames = exaSymbols;
        }
 #endif
        if(modName && (!xf86LoadSubModule(pScrn, modName))) {
@@ -5894,9 +5753,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 	     pSiS->NoXvideo = TRUE;
 	  }
 #endif
-       } else if(symNames) {
-	  xf86LoaderReqSymLists(symNames, NULL);
-	  xf86DrvMsg(pScrn->scrnIndex, X_INFO, "2D acceleration enabled, modename %s\n",modName);
        }
     }
 
@@ -5909,8 +5765,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 	     pSiS->ShadowFB = FALSE;
 	     pSiS->Rotate = pSiS->Reflect = 0;
 	  }
-       } else {
-          xf86LoaderReqSymLists(shadowSymbols, NULL);
        }
     }
 
@@ -5920,9 +5774,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
        if(!xf86LoaderCheckSymbol("DRIScreenInit")) {
 	  if(xf86LoadSubModule(pScrn, "dri")) {
 	     if(!xf86LoaderCheckSymbol("GlxSetVisualConfigs")) {
-	        if(xf86LoadSubModule(pScrn, "glx")) {
-		   xf86LoaderReqSymLists(driSymbols, drmSymbols, NULL);
-		} else {
+	        if(! xf86LoadSubModule(pScrn, "glx")) {
 		   SISErrorLog(pScrn, "Failed to load glx module\n");
 		}
 	     }
-- 
1.6.4.4