/[mcore-svn]/smage/trunk/core/xf86-video-intel/mcore/files/xf86-video-intel-2.11.0-mcore-dri-fixes.patch |
Contents of /smage/trunk/core/xf86-video-intel/mcore/files/xf86-video-intel-2.11.0-mcore-dri-fixes.patch
Parent Directory | Revision Log
Revision 499 -
(show annotations)
(download)
Fri May 7 20:44:24 2010 UTC (13 years, 11 months ago) by niro
File size: 9587 byte(s)
Fri May 7 20:44:24 2010 UTC (13 years, 11 months ago) by niro
File size: 9587 byte(s)
-added patches
1 | diff -Naur xf86-video-intel-2.11.0/configure.ac xf86-video-intel-2.11.0-mcore/configure.ac |
2 | --- xf86-video-intel-2.11.0/configure.ac 2010-03-29 20:23:03.000000000 +0200 |
3 | +++ xf86-video-intel-2.11.0-mcore/configure.ac 2010-05-07 19:00:19.000000000 +0200 |
4 | @@ -84,7 +84,7 @@ |
5 | # Checks for extensions |
6 | XORG_DRIVER_CHECK_EXT(RANDR, randrproto) |
7 | XORG_DRIVER_CHECK_EXT(RENDER, renderproto) |
8 | -XORG_DRIVER_CHECK_EXT(XF86DRI, xextproto x11) |
9 | +XORG_DRIVER_CHECK_EXT(XF86DRI, xextproto x11 xf86driproto glproto dri2proto) |
10 | XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) |
11 | |
12 | # Checks for pkg-config packages |
13 | @@ -98,37 +98,14 @@ |
14 | |
15 | sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` |
16 | |
17 | -save_CFLAGS="$CFLAGS" |
18 | -CFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS" |
19 | -CPPFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS" |
20 | -AC_MSG_CHECKING([whether to include DRI support]) |
21 | if test x$DRI != xno; then |
22 | - AC_CHECK_FILE([${sdkdir}/dri.h], |
23 | - [have_dri_h="yes"], [have_dri_h="no"]) |
24 | - AC_CHECK_FILE([${sdkdir}/sarea.h], |
25 | - [have_sarea_h="yes"], [have_sarea_h="no"]) |
26 | - AC_CHECK_FILE([${sdkdir}/dristruct.h], |
27 | - [have_dristruct_h="yes"], [have_dristruct_h="no"]) |
28 | + AC_CHECK_FILES([${sdkdir}/dri.h ${sdkdir}/sarea.h ${sdkdir}/dristruct.h], |
29 | + [DRI="yes" |
30 | + AC_DEFINE(HAVE_DRI,1,[Enable DRI driver support])], |
31 | + [DRI="no"]) |
32 | fi |
33 | -AC_MSG_CHECKING([whether to include DRI support]) |
34 | -if test x$DRI = xauto; then |
35 | - if test "$have_dri_h" = yes -a \ |
36 | - "$have_sarea_h" = yes -a \ |
37 | - "$have_dristruct_h" = yes; then |
38 | - DRI="yes" |
39 | - else |
40 | - DRI="no" |
41 | - fi |
42 | -fi |
43 | -AC_MSG_RESULT([$DRI]) |
44 | -CFLAGS="$save_CFLAGS $DEBUGFLAGS" |
45 | - |
46 | AM_CONDITIONAL(DRI, test x$DRI = xyes) |
47 | -if test "$DRI" = yes; then |
48 | - PKG_CHECK_MODULES(DRI, [xf86driproto glproto]) |
49 | - AC_DEFINE(XF86DRI,1,[Enable DRI driver support]) |
50 | - AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support]) |
51 | -fi |
52 | +AC_MSG_RESULT([$DRI]) |
53 | |
54 | AM_CONDITIONAL(VIDEO_DEBUG, test x$VIDEO_DEBUG = xyes) |
55 | if test "$VIDEO_DEBUG" = yes; then |
56 | @@ -152,8 +129,6 @@ |
57 | AC_DEFINE(KMS_ONLY,1,[Assume KMS support]) |
58 | fi |
59 | |
60 | -AC_SUBST([DRI_CFLAGS]) |
61 | - |
62 | DRIVER_NAME=intel |
63 | AC_SUBST([DRIVER_NAME]) |
64 | AC_SUBST([moduledir]) |
65 | diff -Naur xf86-video-intel-2.11.0/src/Makefile.am xf86-video-intel-2.11.0-mcore/src/Makefile.am |
66 | --- xf86-video-intel-2.11.0/src/Makefile.am 2010-03-04 02:05:10.000000000 +0100 |
67 | +++ xf86-video-intel-2.11.0-mcore/src/Makefile.am 2010-05-07 19:01:33.000000000 +0200 |
68 | @@ -26,7 +26,7 @@ |
69 | # _ladir passes a dummy rpath to libtool so the thing will actually link |
70 | # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. |
71 | |
72 | -AM_CFLAGS = @CWARNFLAGS@ @XORG_CFLAGS@ @DRM_CFLAGS@ @DRI_CFLAGS@ \ |
73 | +AM_CFLAGS = @CWARNFLAGS@ @XORG_CFLAGS@ @DRM_CFLAGS@ \ |
74 | @PCIACCESS_CFLAGS@ -I$(top_srcdir)/uxa -I$(top_srcdir)/src/render_program |
75 | |
76 | intel_drv_la_LTLIBRARIES = intel_drv.la |
77 | @@ -94,8 +94,6 @@ |
78 | if DRI |
79 | intel_drv_la_SOURCES += \ |
80 | $(INTEL_DRI_SRCS) |
81 | -intel_drv_la_LIBADD += \ |
82 | - $(DRI_LIBS) |
83 | endif |
84 | |
85 | if XVMC |
86 | diff -Naur xf86-video-intel-2.11.0/src/i810.h xf86-video-intel-2.11.0-mcore/src/i810.h |
87 | --- xf86-video-intel-2.11.0/src/i810.h 2010-03-04 02:05:10.000000000 +0100 |
88 | +++ xf86-video-intel-2.11.0-mcore/src/i810.h 2010-05-07 19:03:13.000000000 +0200 |
89 | @@ -52,7 +52,7 @@ |
90 | #include "xorg-server.h" |
91 | #include <pciaccess.h> |
92 | |
93 | -#ifdef XF86DRI |
94 | +#ifdef HAVE_DRI |
95 | #include "xf86drm.h" |
96 | #include "sarea.h" |
97 | #define _XF86DRI_SERVER_ |
98 | @@ -229,9 +229,9 @@ |
99 | I810ReadByteFunc readStandard; |
100 | |
101 | Bool directRenderingDisabled; /* DRI disabled in PreInit */ |
102 | - Bool directRenderingEnabled; /* false if XF86DRI not defined. */ |
103 | + Bool directRenderingEnabled; /* false if HAVE_DRI not defined. */ |
104 | |
105 | -#ifdef XF86DRI |
106 | +#ifdef HAVE_DRI |
107 | int LockHeld; |
108 | DRIInfoPtr pDRIInfo; |
109 | int drmSubFD; |
110 | @@ -272,7 +272,7 @@ |
111 | #define I810_SELECT_BACK 1 |
112 | #define I810_SELECT_DEPTH 2 |
113 | |
114 | -#ifdef XF86DRI |
115 | +#ifdef HAVE_DRI |
116 | extern Bool I810DRIScreenInit(ScreenPtr pScreen); |
117 | extern void I810DRICloseScreen(ScreenPtr pScreen); |
118 | extern Bool I810DRIFinishScreenInit(ScreenPtr pScreen); |
119 | diff -Naur xf86-video-intel-2.11.0/src/i810_accel.c xf86-video-intel-2.11.0-mcore/src/i810_accel.c |
120 | --- xf86-video-intel-2.11.0/src/i810_accel.c 2010-03-18 18:13:36.000000000 +0100 |
121 | +++ xf86-video-intel-2.11.0-mcore/src/i810_accel.c 2010-05-07 19:04:27.000000000 +0200 |
122 | @@ -213,7 +213,7 @@ |
123 | start); |
124 | I810PrintErrorState(pScrn); |
125 | ErrorF("space: %d wanted %d\n", ring->space, n); |
126 | -#ifdef XF86DRI |
127 | +#ifdef HAVE_DRI |
128 | if (pI810->directRenderingEnabled) { |
129 | DRIUnlock(screenInfo.screens[pScrn->scrnIndex]); |
130 | DRICloseScreen(screenInfo.screens[pScrn->scrnIndex]); |
131 | @@ -245,7 +245,7 @@ |
132 | if (I810_DEBUG & (DEBUG_VERBOSE_ACCEL | DEBUG_VERBOSE_SYNC)) |
133 | ErrorF("I810Sync\n"); |
134 | |
135 | -#ifdef XF86DRI |
136 | +#ifdef HAVE_DRI |
137 | /* VT switching tries to do this. |
138 | */ |
139 | if (!pI810->LockHeld && pI810->directRenderingEnabled) { |
140 | diff -Naur xf86-video-intel-2.11.0/src/i810_driver.c xf86-video-intel-2.11.0-mcore/src/i810_driver.c |
141 | --- xf86-video-intel-2.11.0/src/i810_driver.c 2010-03-18 18:13:36.000000000 +0100 |
142 | +++ xf86-video-intel-2.11.0-mcore/src/i810_driver.c 2010-05-07 19:07:46.000000000 +0200 |
143 | @@ -72,7 +72,7 @@ |
144 | #include "i810.h" |
145 | #include "i830.h" |
146 | |
147 | -#ifdef XF86DRI |
148 | +#ifdef HAVE_DRI |
149 | #include "dri.h" |
150 | #endif |
151 | |
152 | @@ -282,7 +282,7 @@ |
153 | #endif |
154 | |
155 | #ifndef I830_ONLY |
156 | -#ifdef XF86DRI |
157 | +#ifdef HAVE_DRI |
158 | static int i810_pitches[] = { |
159 | 512, |
160 | 1024, |
161 | @@ -650,7 +650,7 @@ |
162 | } |
163 | } |
164 | |
165 | -#ifdef XF86DRI |
166 | +#ifdef HAVE_DRI |
167 | pI810->directRenderingDisabled = |
168 | !xf86ReturnOptValBool(pI810->Options, OPTION_DRI, TRUE); |
169 | |
170 | @@ -850,7 +850,7 @@ |
171 | |
172 | i = xf86ValidateModes(pScrn, pScrn->monitor->Modes, |
173 | pScrn->display->modes, clockRanges, |
174 | -#ifndef XF86DRI |
175 | +#ifndef HAVE_DRI |
176 | 0, 320, 1600, 64 * pScrn->bitsPerPixel, |
177 | #else |
178 | i810_pitches, 0, 0, 64 * pScrn->bitsPerPixel, |
179 | @@ -906,7 +906,7 @@ |
180 | pI810->allowPageFlip=FALSE; |
181 | enable = xf86ReturnOptValBool(pI810->Options, OPTION_PAGEFLIP, FALSE); |
182 | |
183 | -#ifdef XF86DRI |
184 | +#ifdef HAVE_DRI |
185 | if (!pI810->directRenderingDisabled) { |
186 | pI810->allowPageFlip = enable; |
187 | if (pI810->allowPageFlip == TRUE) |
188 | @@ -944,7 +944,7 @@ |
189 | pI810->numSurfaces = 0; |
190 | } |
191 | |
192 | -#ifdef XF86DRI |
193 | +#ifdef HAVE_DRI |
194 | /* Load the dri module if requested. */ |
195 | if (xf86ReturnOptValBool(pI810->Options, OPTION_DRI, FALSE)) { |
196 | xf86LoadSubModule(pScrn, "dri"); |
197 | @@ -1652,7 +1652,7 @@ |
198 | if (!I810SetMode(pScrn, mode)) |
199 | return FALSE; |
200 | |
201 | -#ifdef XF86DRI |
202 | +#ifdef HAVE_DRI |
203 | if (pI810->directRenderingEnabled) { |
204 | DRILock(screenInfo.screens[pScrn->scrnIndex], 0); |
205 | pI810->LockHeld = 1; |
206 | @@ -1661,7 +1661,7 @@ |
207 | |
208 | DoRestore(pScrn, &hwp->ModeReg, &pI810->ModeReg, FALSE); |
209 | |
210 | -#ifdef XF86DRI |
211 | +#ifdef HAVE_DRI |
212 | if (pI810->directRenderingEnabled) { |
213 | DRIUnlock(screenInfo.screens[pScrn->scrnIndex]); |
214 | pI810->LockHeld = 0; |
215 | @@ -1926,7 +1926,7 @@ |
216 | * memory. Wonder if this is going to be a problem... |
217 | */ |
218 | |
219 | -#ifdef XF86DRI |
220 | +#ifdef HAVE_DRI |
221 | /* |
222 | * Setup DRI after visuals have been established, but before fbScreenInit |
223 | * is called. fbScreenInit will eventually call into the drivers |
224 | @@ -1992,7 +1992,7 @@ |
225 | |
226 | xf86SetBlackWhitePixels(pScreen); |
227 | |
228 | -#ifdef XF86DRI |
229 | +#ifdef HAVE_DRI |
230 | if (pI810->LpRing->mem.Start == 0 && pI810->directRenderingEnabled) { |
231 | pI810->directRenderingEnabled = FALSE; |
232 | I810DRICloseScreen(pScreen); |
233 | @@ -2069,7 +2069,7 @@ |
234 | |
235 | I810InitVideo(pScreen); |
236 | |
237 | -#ifdef XF86DRI |
238 | +#ifdef HAVE_DRI |
239 | if (pI810->directRenderingEnabled) { |
240 | /* Now that mi, fb, drm and others have done their thing, |
241 | * complete the DRI setup. |
242 | @@ -2119,7 +2119,7 @@ |
243 | * If lockups on mode switch are still seen revisit this code. (EE) |
244 | */ |
245 | |
246 | -# ifdef XF86DRI |
247 | +# ifdef HAVE_DRI |
248 | if (pI810->directRenderingEnabled) { |
249 | if (I810_DEBUG & DEBUG_VERBOSE_DRI) |
250 | ErrorF("calling dri lock\n"); |
251 | @@ -2134,7 +2134,7 @@ |
252 | } |
253 | I810Restore(pScrn); |
254 | |
255 | -# ifdef XF86DRI |
256 | +# ifdef HAVE_DRI |
257 | if (pI810->directRenderingEnabled) { |
258 | if (!I810DRILeave(pScrn)) |
259 | return FALSE; |
260 | @@ -2208,7 +2208,7 @@ |
261 | { |
262 | ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; |
263 | |
264 | -#ifdef XF86DRI |
265 | +#ifdef HAVE_DRI |
266 | I810Ptr pI810 = I810PTR(pScrn); |
267 | #endif |
268 | |
269 | @@ -2218,7 +2218,7 @@ |
270 | if (!I810BindGARTMemory(pScrn)) { |
271 | return FALSE; |
272 | } |
273 | -#ifdef XF86DRI |
274 | +#ifdef HAVE_DRI |
275 | if (!I810DRIEnter(pScrn)) { |
276 | return FALSE; |
277 | } |
278 | @@ -2246,7 +2246,7 @@ |
279 | if (I810_DEBUG & DEBUG_VERBOSE_DRI) |
280 | ErrorF("\n\n\nLeave VT\n"); |
281 | |
282 | -#ifdef XF86DRI |
283 | +#ifdef HAVE_DRI |
284 | if (pI810->directRenderingEnabled) { |
285 | if (I810_DEBUG & DEBUG_VERBOSE_DRI) |
286 | ErrorF("calling dri lock\n"); |
287 | @@ -2264,7 +2264,7 @@ |
288 | |
289 | if (!I810UnbindGARTMemory(pScrn)) |
290 | return; |
291 | -#ifdef XF86DRI |
292 | +#ifdef HAVE_DRI |
293 | if (!I810DRILeave(pScrn)) |
294 | return; |
295 | #endif |
296 | @@ -2289,7 +2289,7 @@ |
297 | I810Restore(pScrn); |
298 | vgaHWLock(hwp); |
299 | } |
300 | -#ifdef XF86DRI |
301 | +#ifdef HAVE_DRI |
302 | if (pI810->directRenderingEnabled) { |
303 | I810DRICloseScreen(pScreen); |
304 | pI810->directRenderingEnabled = FALSE; |
305 | diff -Naur xf86-video-intel-2.11.0/src/i830.h xf86-video-intel-2.11.0-mcore/src/i830.h |
306 | --- xf86-video-intel-2.11.0/src/i830.h 2010-03-18 18:13:36.000000000 +0100 |
307 | +++ xf86-video-intel-2.11.0-mcore/src/i830.h 2010-05-07 19:08:25.000000000 +0200 |
308 | @@ -61,11 +61,6 @@ |
309 | #include "xorg-server.h" |
310 | #include <pciaccess.h> |
311 | |
312 | -#include "xf86drm.h" |
313 | -#include "sarea.h" |
314 | -#define _XF86DRI_SERVER_ |
315 | -#include "dri.h" |
316 | -#include "dri2.h" |
317 | #include "GL/glxint.h" |
318 | #include "intel_bufmgr.h" |
319 | #include "i915_drm.h" |