summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/xorg-server/xserver-1.5-branch-4970d.patch
blob: 23cdab045eae391c7ba4fccca36682264167120d (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
diff -ruN xserver-4c6a89ee783d62fb75a738339351830c35b19a38/config/x11-input.fdi xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/config/x11-input.fdi
--- xserver-4c6a89ee783d62fb75a738339351830c35b19a38/config/x11-input.fdi	2008-11-05 20:39:01.000000000 +0000
+++ xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/config/x11-input.fdi	2008-12-16 19:19:00.000000000 +0000
@@ -64,8 +64,8 @@
       <merge key="input.x11_options.XkbRules" type="string">base</merge>
 
       <!-- If we're using Linux, we use evdev by default (falling back to
-           keyboard otherwise). -->
-      <merge key="input.x11_driver" type="string">keyboard</merge>
+           kbd otherwise). -->
+      <merge key="input.x11_driver" type="string">kbd</merge>
       <merge key="input.x11_options.XkbModel" type="string">pc105</merge>
       <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
              string="Linux">
diff -ruN xserver-4c6a89ee783d62fb75a738339351830c35b19a38/exa/exa_accel.c xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/exa/exa_accel.c
--- xserver-4c6a89ee783d62fb75a738339351830c35b19a38/exa/exa_accel.c	2008-11-05 20:39:01.000000000 +0000
+++ xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/exa/exa_accel.c	2008-12-16 19:19:00.000000000 +0000
@@ -398,6 +398,10 @@
     RegionPtr srcregion = NULL, dstregion = NULL;
     xRectangle *rects;
 
+    /* avoid doing copy operations if no boxes */
+    if (nbox == 0)
+	return;
+
     pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable);
     pDstPixmap = exaGetDrawablePixmap (pDstDrawable);
 
diff -ruN xserver-4c6a89ee783d62fb75a738339351830c35b19a38/hw/xfree86/common/xf86Helper.c xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/hw/xfree86/common/xf86Helper.c
--- xserver-4c6a89ee783d62fb75a738339351830c35b19a38/hw/xfree86/common/xf86Helper.c	2008-11-05 20:39:01.000000000 +0000
+++ xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/hw/xfree86/common/xf86Helper.c	2008-12-16 19:19:00.000000000 +0000
@@ -448,10 +448,6 @@
 #define GLOBAL_DEFAULT_DEPTH 24
 #endif
 
-#ifndef GLOBAL_DEFAULT_FBBPP
-#define GLOBAL_DEFAULT_FBBPP 32
-#endif
-
 _X_EXPORT Bool
 xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
 		int depth24flags)
@@ -529,7 +525,6 @@
 	    if (depth > 0)
 		scrp->depth = depth;
 	} else {
-	    scrp->bitsPerPixel = GLOBAL_DEFAULT_FBBPP;
 	    scrp->depth = GLOBAL_DEFAULT_DEPTH;
 	}
     }
diff -ruN xserver-4c6a89ee783d62fb75a738339351830c35b19a38/hw/xfree86/os-support/linux/int10/linux.c xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/hw/xfree86/os-support/linux/int10/linux.c
--- xserver-4c6a89ee783d62fb75a738339351830c35b19a38/hw/xfree86/os-support/linux/int10/linux.c	2008-11-05 20:39:01.000000000 +0000
+++ xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/hw/xfree86/os-support/linux/int10/linux.c	2008-12-16 19:19:00.000000000 +0000
@@ -1,6 +1,6 @@
 /*
  * linux specific part of the int10 module
- * Copyright 1999, 2000, 2001, 2002, 2003, 2004 Egbert Eich
+ * Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2008 Egbert Eich
  */
 #ifdef HAVE_XORG_CONFIG_H
 #include <xorg-config.h>
@@ -357,7 +357,10 @@
 		   "shmat(low_mem) error: %s\n",strerror(errno));
 	return FALSE;
     }
-    
+    if (mprotect((void*)0, V_RAM, PROT_READ|PROT_WRITE|PROT_EXEC) != 0)
+        xf86DrvMsg(pInt->scrnIndex, X_ERROR,
+		   "Cannot set EXEC bit on low memory: %s\n", strerror(errno));
+
     if (((linuxInt10Priv*)pInt->private)->highMem >= 0) {
 	addr = shmat(((linuxInt10Priv*)pInt->private)->highMem,
 		     (char*)HIGH_MEM, 0);
@@ -368,6 +371,11 @@
 		       "shmget error: %s\n",strerror(errno));
 	    return FALSE;
 	}
+	if (mprotect((void*)HIGH_MEM, HIGH_MEM_SIZE,
+		     PROT_READ|PROT_WRITE|PROT_EXEC) != 0)
+	    xf86DrvMsg(pInt->scrnIndex, X_ERROR,
+		       "Cannot set EXEC bit on high memory: %s\n",
+		       strerror(errno));
     } else {
 	if ((fd = open(DEV_MEM, O_RDWR, 0)) >= 0) {
 	    if (mmap((void *)(V_BIOS), SYS_BIOS - V_BIOS,
diff -ruN xserver-4c6a89ee783d62fb75a738339351830c35b19a38/hw/xfree86/xaa/xaa.h xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/hw/xfree86/xaa/xaa.h
--- xserver-4c6a89ee783d62fb75a738339351830c35b19a38/hw/xfree86/xaa/xaa.h	2008-11-05 20:39:01.000000000 +0000
+++ xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/hw/xfree86/xaa/xaa.h	2008-12-16 19:19:00.000000000 +0000
@@ -2,6 +2,10 @@
 #ifndef _XAA_H
 #define _XAA_H
 
+#define XAA_VERSION_MAJOR   1
+#define XAA_VERSION_MINOR   2
+#define XAA_VERSION_RELEASE 1
+
 /*
 
    ******** OPERATION SPECIFIC FLAGS *********
diff -ruN xserver-4c6a89ee783d62fb75a738339351830c35b19a38/hw/xfree86/xaa/xaaInitAccel.c xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/hw/xfree86/xaa/xaaInitAccel.c
--- xserver-4c6a89ee783d62fb75a738339351830c35b19a38/hw/xfree86/xaa/xaaInitAccel.c	2008-11-05 20:39:01.000000000 +0000
+++ xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/hw/xfree86/xaa/xaaInitAccel.c	2008-12-16 19:19:00.000000000 +0000
@@ -103,7 +103,9 @@
 	MODINFOSTRING1,
 	MODINFOSTRING2,
 	XORG_VERSION_CURRENT,
-	1, 2, 0,
+	XAA_VERSION_MAJOR,
+	XAA_VERSION_MINOR,
+	XAA_VERSION_RELEASE,
 	ABI_CLASS_VIDEODRV,		/* requires the video driver ABI */
 	ABI_VIDEODRV_VERSION,
 	MOD_CLASS_NONE,
diff -ruN xserver-4c6a89ee783d62fb75a738339351830c35b19a38/hw/xfree86/xaa/xaawrap.h xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/hw/xfree86/xaa/xaawrap.h
--- xserver-4c6a89ee783d62fb75a738339351830c35b19a38/hw/xfree86/xaa/xaawrap.h	2008-11-05 20:39:01.000000000 +0000
+++ xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/hw/xfree86/xaa/xaawrap.h	2008-12-16 19:19:00.000000000 +0000
@@ -48,8 +48,8 @@
     XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\
     GCFuncs *oldFuncs = pGC->funcs;\
     pGC->funcs = pGCPriv->wrapFuncs;\
-    pGC->ops = pGCPriv->wrapOps
-
+    pGC->ops = pGCPriv->wrapOps; \
+    SYNC_CHECK(pGC)
     
 #define XAA_PIXMAP_OP_EPILOGUE(pGC)\
     pGCPriv->wrapOps = pGC->ops;\
diff -ruN xserver-4c6a89ee783d62fb75a738339351830c35b19a38/mi/miinitext.c xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/mi/miinitext.c
--- xserver-4c6a89ee783d62fb75a738339351830c35b19a38/mi/miinitext.c	2008-11-05 20:39:01.000000000 +0000
+++ xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/mi/miinitext.c	2008-12-16 19:19:00.000000000 +0000
@@ -661,7 +661,8 @@
 #endif
 
 #ifdef GLXEXT
-    GlxPushProvider(&__glXDRISWRastProvider);
+    if (serverGeneration == 1)
+	GlxPushProvider(&__glXDRISWRastProvider);
     if (!noGlxExtension) GlxExtensionInit();
 #endif
 }
diff -ruN xserver-4c6a89ee783d62fb75a738339351830c35b19a38/os/utils.c xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/os/utils.c
--- xserver-4c6a89ee783d62fb75a738339351830c35b19a38/os/utils.c	2008-11-05 20:39:01.000000000 +0000
+++ xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/os/utils.c	2008-12-16 19:19:00.000000000 +0000
@@ -1702,7 +1702,7 @@
     int pid;
 } *pidlist;
 
-void (*old_alarm)(int) = NULL; /* XXX horrible awful hack */
+OsSigHandlerPtr old_alarm = NULL; /* XXX horrible awful hack */
 
 pointer
 Popen(char *command, char *type)
@@ -1726,7 +1726,7 @@
     }
 
     /* Ignore the smart scheduler while this is going on */
-    old_alarm = signal(SIGALRM, SIG_IGN);
+    old_alarm = OsSignal(SIGALRM, SIG_IGN);
     if (old_alarm == SIG_ERR) {
       perror("signal");
       return NULL;
@@ -1737,7 +1737,7 @@
 	close(pdes[0]);
 	close(pdes[1]);
 	xfree(cur);
-	if (signal(SIGALRM, old_alarm) == SIG_ERR)
+	if (OsSignal(SIGALRM, old_alarm) == SIG_ERR)
 	  perror("signal");
 	return NULL;
     case 0:	/* child */
@@ -1914,7 +1914,7 @@
     /* allow EINTR again */
     OsReleaseSignals ();
     
-    if (old_alarm && signal(SIGALRM, old_alarm) == SIG_ERR) {
+    if (old_alarm && OsSignal(SIGALRM, old_alarm) == SIG_ERR) {
       perror("signal");
       return -1;
     }
diff -ruN xserver-4c6a89ee783d62fb75a738339351830c35b19a38/xkb/xkbEvents.c xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/xkb/xkbEvents.c
--- xserver-4c6a89ee783d62fb75a738339351830c35b19a38/xkb/xkbEvents.c	2008-11-05 20:39:01.000000000 +0000
+++ xserver-4970d757a7364c1d2fb4db4e404e88e8ad989ddb/xkb/xkbEvents.c	2008-12-16 19:19:00.000000000 +0000
@@ -109,7 +109,7 @@
 register CARD16	changed,bState;
 
     interest = kbd->xkb_interest;
-    if (!interest)
+    if (!interest || !kbd->key || !kbd->key->xkbInfo)
 	return;
     xkbi = kbd->key->xkbInfo;
     state= &xkbi->state;
@@ -168,6 +168,9 @@
 unsigned	time = 0,initialized;
 CARD16		changed;
 
+    if (!kbd->key || !kbd->key->xkbInfo)
+        return;
+
     xkbi = kbd->key->xkbInfo;
     initialized= 0;
 
@@ -291,7 +294,7 @@
 Time 		 	time = 0;
 
     interest = kbd->xkb_interest;
-    if (!interest)
+    if (!interest || !kbd->key || !kbd->key->xkbInfo)
 	return;
     xkbi = kbd->key->xkbInfo;
  
@@ -401,6 +404,9 @@
 Time 		time = 0;
 XID		winID = 0;
 
+    if (!kbd->key || !kbd->key->xkbInfo)
+        return;
+
     xkbi = kbd->key->xkbInfo;
 
     if ((force||(xkbi->desc->ctrls->enabled_ctrls&XkbAudibleBellMask))&&
@@ -616,11 +622,12 @@
 XkbInterestPtr	 interest;
 Time 		 time = 0;
 
-    xkbi = kbd->key->xkbInfo;
     interest = kbd->xkb_interest;
-    if (!interest)
+    if (!interest || !kbd->key || !kbd->key->xkbInfo)
 	return;
  
+    xkbi = kbd->key->xkbInfo;
+
     initialized = 0;
     pEv->mods= xkbi->state.mods;
     pEv->group= xkbi->state.group;
@@ -996,6 +1003,10 @@
 ClientPtr	client = NULL;
 
     found= False;
+
+    if (!dev->key || !dev->key->xkbInfo)
+        return found;
+
     autoCtrls= autoValues= 0;
     if ( dev->xkb_interest ) {
 	interest = dev->xkb_interest;