summaryrefslogtreecommitdiff
path: root/extra/xf86-video-sisimedia/Untangle-XF86DRI.patch
blob: 55b9c9deb5465d333f2dd885c22e097b389b2c7a (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
diff -aur xf86-video-sis-0.9.1.pristine/configure.ac xf86-video-sis-0.9.1.new/configure.ac
--- xf86-video-sis-0.9.1.pristine/configure.ac	2012-03-17 04:52:35.410417514 +1100
+++ xf86-video-sis-0.9.1.new/configure.ac	2012-03-17 04:55:05.949412228 +1100
@@ -97,8 +97,8 @@
 AM_CONDITIONAL(DRI, test x$DRI = xyes)
 if test "$DRI" = yes; then
         PKG_CHECK_MODULES(DRI, [libdrm >= 2.0 xf86driproto])
-        AC_DEFINE(XF86DRI,1,[Enable DRI driver support])
-        AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
+        AC_DEFINE(SISDRI,1,[Enable DRI driver support])
+        AC_DEFINE(SISDRI_DEVEL,1,[Enable developmental DRI driver support])
 fi
 
 # technically this should be a configure flag.  meh.
diff -aur xf86-video-sis-0.9.1.pristine/src/sis_driver.c xf86-video-sis-0.9.1.new/src/sis_driver.c
--- xf86-video-sis-0.9.1.pristine/src/sis_driver.c	2012-03-17 04:52:35.380417061 +1100
+++ xf86-video-sis-0.9.1.new/src/sis_driver.c	2012-03-17 04:57:54.118679619 +1100
@@ -115,7 +115,7 @@
 #endif
 
 
-#ifdef XF86DRI
+#ifdef SISDRI
 #include "dri.h"
 #endif
 
@@ -5779,7 +5779,7 @@
     }
 
     /* Load the dri and glx modules if requested. */
-#ifdef XF86DRI
+#ifdef SISDRI
     if(pSiS->loadDRI) {
        if(!xf86LoaderCheckSymbol("DRIScreenInit")) {
 	  if(xf86LoadSubModule(pScrn, "dri")) {
@@ -9469,7 +9469,7 @@
 
     pSiS->cmdQueueLen = 0; /* Force an EngineIdle() at start */
 
-#ifdef XF86DRI
+#ifdef SISDRI
     if(pSiS->loadDRI) {
 #ifdef SISDUALHEAD
        /* No DRI in dual head mode */
@@ -9802,7 +9802,7 @@
 #endif
 
    /* Finish DRI initialisation */
-#ifdef XF86DRI
+#ifdef SISDRI
     if(pSiS->loadDRI) {
        if(pSiS->directRenderingEnabled) {
           /* Now that mi, drm and others have done their thing,
@@ -10359,7 +10359,7 @@
     }
 /* Mark for 3D full-screen bug */
 /*
-#ifdef XF86DRI    
+#ifdef SISDRI    
     if(pSiS->directRenderingEnabled) {       
 	DRILock(screenInfo.screens[scrnIndex], DRM_LOCK_QUIESCENT);
     }
@@ -10388,7 +10388,7 @@
 #endif
 /* Mark for 3D full-screen bug */
 /*
-#ifdef XF86DRI
+#ifdef SISDRI
     if(pSiS->directRenderingEnabled) {
        DRIUnlock(screenInfo.screens[scrnIndex]);
     }
@@ -10601,7 +10601,7 @@
 
 /* Mark for 3D full-screen bug */
 /*
-#ifdef XF86DRI
+#ifdef SISDRI
     if(pSiS->directRenderingEnabled) {
        DRIUnlock(screenInfo.screens[scrnIndex]);
     }
@@ -10629,7 +10629,7 @@
 {
     ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
     SISPtr pSiS = SISPTR(pScrn);
-#ifdef XF86DRI
+#ifdef SISDRI
     ScreenPtr pScreen;
 
     if(pSiS->directRenderingEnabled) {
@@ -10715,7 +10715,7 @@
        SiSCtrlExtUnregister(pSiS, pScrn->scrnIndex);
     }
 
-#ifdef XF86DRI
+#ifdef SISDRI
     if(pSiS->directRenderingEnabled) {
        SISDRICloseScreen(pScreen);
        pSiS->directRenderingEnabled = FALSE;
diff -aur xf86-video-sis-0.9.1.pristine/src/sis.h xf86-video-sis-0.9.1.new/src/sis.h
--- xf86-video-sis-0.9.1.pristine/src/sis.h	2012-03-17 04:52:35.357083354 +1100
+++ xf86-video-sis-0.9.1.new/src/sis.h	2012-03-17 04:56:36.814150836 +1100
@@ -215,7 +215,13 @@
 
 #undef SISHAVEDRMWRITE
 #undef SISNEWDRI
-#ifdef XF86DRI
+
+/* if the server was built without DRI support, force-disable DRI */
+#ifndef XF86DRI
+#undef SISDRI
+#endif
+
+#ifdef SISDRI
 #if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,2,99,3,0)
 #define SISHAVEDRMWRITE
 #endif
@@ -229,7 +235,7 @@
 #include "dri.h"
 #include "GL/glxint.h"
 #include "sis_dri.h"
-#endif /* XF86DRI */
+#endif /* SISDRI */
 
 #include "sis_config.h"
 
@@ -884,7 +890,7 @@
     ScrnInfoPtr		pScrn_2;
     UChar		*BIOS;
     struct SiS_Private	*SiS_Pr;
-#ifdef XF86DRI
+#ifdef SISDRI
     SISAGPHTYPE		agpHandle;
     ULong		agpAddr;
     UChar		*agpBase;
@@ -1291,7 +1297,7 @@
     unsigned int	cmdQueueSize_div2;
     unsigned int	cmdQueueSize_div4;
     unsigned int	cmdQueueSize_4_3;
-#ifdef XF86DRI
+#ifdef SISDRI
     SISAGPHTYPE		agpHandle;
     ULong		agpAddr;
     UChar 		*agpBase;
@@ -1351,7 +1357,7 @@
     /* DRI */
     Bool		loadDRI;
     Bool		DRIEnabled;
-#ifdef XF86DRI
+#ifdef SISDRI
     Bool		directRenderingEnabled;
     DRIInfoPtr 		pDRIInfo;
     int			drmSubFD;
diff -aur xf86-video-sis-0.9.1.pristine/src/sis_hwmc.c xf86-video-sis-0.9.1.new/src/sis_hwmc.c
--- xf86-video-sis-0.9.1.pristine/src/sis_hwmc.c        2012-03-17 04:52:35.330416274 +1100
+++ xf86-video-sis-0.9.1.new/src/sis_hwmc.c     2012-03-17 05:22:17.014636372 +1100
@@ -53,7 +53,9 @@
 #include "regionstr.h"
 
 #include "sis.h"
+#ifdef SISDRI
 #include "sis_dri.h"
+#endif
 
 #include "xf86xv.h"
 #include "xf86xvmc.h"
diff -aur xf86-video-sis-0.9.1/src/sis_opt.c xf86-video-sis-0.9.1.new/src/sis_opt.c
--- xf86-video-sis-0.9.1/src/sis_opt.c	2012-03-17 07:36:12.285566154 +1100
+++ xf86-video-sis-0.9.1.new/src/sis_opt.c	2012-03-17 07:34:59.451106475 +1100
@@ -494,7 +494,7 @@
     pSiS->ShadowFB = FALSE;
     pSiS->loadDRI = FALSE;
     pSiS->DRIEnabled = FALSE;
-#ifdef XF86DRI
+#ifdef SISDRI
     pSiS->agpWantedPages = AGP_PAGES;
 #endif
     pSiS->VESA = -1;
@@ -2160,7 +2160,7 @@
     }
 
 
-#ifdef XF86DRI
+#ifdef SISDRI
     /* DRI */
     from = X_DEFAULT;
     if(xf86GetOptValBool(pSiS->Options, OPTION_DRI, &pSiS->loadDRI)) {