summaryrefslogtreecommitdiff
path: root/staging/xf86-video-trident/trident-1.3.4-git.patch
blob: 4e0cc27b2223e2f63a458c5a21f5b7331905b916 (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
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
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
diff --git a/configure.ac b/configure.ac
index be54427..0fc2066 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,47 +20,47 @@
 #
 # Process this file with autoconf to produce a configure script
 
-AC_PREREQ(2.57)
+# Initialize Autoconf
+AC_PREREQ([2.60])
 AC_INIT([xf86-video-trident],
-        1.3.4,
+        [1.3.4],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
-        xf86-video-trident)
-
+        [xf86-video-trident])
 AC_CONFIG_SRCDIR([Makefile.am])
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_AUX_DIR(.)
 
+# Initialize Automake
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
-
 AM_MAINTAINER_MODE
 
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
 m4_ifndef([XORG_MACROS_VERSION],
-          [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 
-# Checks for programs.
+# Initialize libtool
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
-AC_PROG_CC
 
 AH_TOP([#include "xorg-server.h"])
 
+# Define a configure option for an alternate module directory
 AC_ARG_WITH(xorg-module-dir,
-            AC_HELP_STRING([--with-xorg-module-dir=DIR],
+            AS_HELP_STRING([--with-xorg-module-dir=DIR],
                            [Default xorg module directory [[default=$libdir/xorg/modules]]]),
             [moduledir="$withval"],
             [moduledir="$libdir/xorg/modules"])
 
-# Checks for extensions
+# Store the list of server defined optional extensions in REQUIRED_MODULES
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
 XORG_DRIVER_CHECK_EXT(XV, videoproto)
 XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
 XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto)
 
-# Checks for pkg-config packages
+# Obtain compiler/linker options for the driver dependencies
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
 PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
                   HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
@@ -90,17 +90,14 @@ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
 
 # Checks for libraries.
 
-# Checks for header files.
-AC_HEADER_STDC
-
-AC_SUBST([XORG_CFLAGS])
 AC_SUBST([moduledir])
 
 DRIVER_NAME=trident
 AC_SUBST([DRIVER_NAME])
 
-AC_OUTPUT([
-	Makefile
-	src/Makefile
-	man/Makefile
+AC_CONFIG_FILES([
+                Makefile
+                src/Makefile
+                man/Makefile
 ])
+AC_OUTPUT
diff --git a/man/Makefile.am b/man/Makefile.am
index 8f2454b..b3688ce 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -31,25 +31,11 @@ EXTRA_DIST = @DRIVER_NAME@.man
 
 CLEANFILES = $(driverman_DATA)
 
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
-
-MAN_SUBSTS = \
-	-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-	-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-	-e 's|__xservername__|Xorg|g' \
-	-e 's|__xconfigfile__|xorg.conf|g' \
-	-e 's|__projectroot__|$(prefix)|g' \
-	-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-	-e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \
-	-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-	-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-	-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
+
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+
 
 SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
 
 .man.$(DRIVER_MAN_SUFFIX):
-	sed $(MAN_SUBSTS) < $< > $@
+	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
diff --git a/man/trident.man b/man/trident.man
index 8d04ed0..f461e10 100644
--- a/man/trident.man
+++ b/man/trident.man
@@ -1,4 +1,3 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident.man,v 1.14 2003/05/29 21:48:09 herrb Exp $ 
 .\" shorthand for double quote that works everywhere.
 .ds q \N'34'
 .TH TRIDENT __drivermansuffix__ __vendorversion__
diff --git a/src/blade_accel_exa.c b/src/blade_accel_exa.c
index 80e3f23..3129623 100644
--- a/src/blade_accel_exa.c
+++ b/src/blade_accel_exa.c
@@ -251,14 +251,6 @@ static void WaitMarker(ScreenPtr pScreen, int marker)
     }
 }
 
-static Bool PrepareAccess(PixmapPtr pPix, int index)
-{
-}
-
-static void FinishAccess(PixmapPtr pPix, int index)
-{
-}
-
 static void BladeInitializeAccelerator(ScrnInfoPtr pScrn)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
diff --git a/src/trident.h b/src/trident.h
index c15d39c..a28c9fc 100644
--- a/src/trident.h
+++ b/src/trident.h
@@ -70,7 +70,7 @@ typedef struct {
 typedef struct {
     ScrnInfoPtr		pScrn;
     pciVideoPtr		PciInfo;
-    PCITAG		PciTag;
+    uint32_t		PciTag;
     EntityInfoPtr	pEnt;
     ExaDriverPtr	EXADriverPtr;
     int			useEXA;
@@ -85,7 +85,7 @@ typedef struct {
     unsigned char *     IOBase;
     unsigned char *	FbBase;
     long		FbMapSize;
-    IOADDRESS		PIOBase;
+    unsigned long		PIOBase;
     Bool		NoAccel;
     Bool		HWCursor;
     Bool		UsePCIRetry;
diff --git a/src/trident_dga.c b/src/trident_dga.c
index 78fa8f4..dd836a6 100644
--- a/src/trident_dga.c
+++ b/src/trident_dga.c
@@ -83,15 +83,15 @@ TRIDENTDGAInit(ScreenPtr pScreen)
    while(pMode) {
 
 	if(0 /*pScrn->displayWidth != pMode->HDisplay*/) {
-	    newmodes = xrealloc(modes, (num + 2) * sizeof(DGAModeRec));
+	    newmodes = realloc(modes, (num + 2) * sizeof(DGAModeRec));
 	    oneMore = TRUE;
 	} else {
-	    newmodes = xrealloc(modes, (num + 1) * sizeof(DGAModeRec));
+	    newmodes = realloc(modes, (num + 1) * sizeof(DGAModeRec));
 	    oneMore = FALSE;
 	}
 
 	if(!newmodes) {
-	   xfree(modes);
+	   free(modes);
 	   return FALSE;
 	}
 	modes = newmodes;
diff --git a/src/trident_driver.c b/src/trident_driver.c
index 31cbb83..472c9b7 100644
--- a/src/trident_driver.c
+++ b/src/trident_driver.c
@@ -63,7 +63,7 @@
 
 #ifdef XFreeXDGA
 #define _XF86DGA_SERVER_
-#include <X11/extensions/xf86dgastr.h>
+#include <X11/extensions/xf86dgaproto.h>
 #endif
 
 #include "globals.h"
@@ -560,7 +560,7 @@ TRIDENTFreeRec(ScrnInfoPtr pScrn)
 {
     if (pScrn->driverPrivate == NULL)
 	return;
-    xfree(pScrn->driverPrivate);
+    free(pScrn->driverPrivate);
     pScrn->driverPrivate = NULL;
 }
 
@@ -900,7 +900,7 @@ TRIDENTProbe(DriverPtr drv, int flags)
 		    foundScreen = TRUE;
 		}
 	    }
-	    xfree(usedChips);
+	    free(usedChips);
 	}
     }
 
@@ -933,11 +933,11 @@ TRIDENTProbe(DriverPtr drv, int flags)
 		foundScreen = TRUE;
 	    }
 	}
-	xfree(usedChips);
+	free(usedChips);
     }
 #endif    
 
-    xfree(devSections);
+    free(devSections);
     return foundScreen;
 }
 	
@@ -1109,7 +1109,12 @@ TRIDENTPreInit(ScrnInfoPtr pScrn, int flags)
     hwp = VGAHWPTR(pScrn);
     vgaHWGetIOBase(hwp);
     vgaIOBase = hwp->IOBase;
+
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
     pTrident->PIOBase = hwp->PIOOffset;
+#else
+    pTrident->PIOBase = 0;
+#endif
 
 #ifndef XSERVER_LIBPCIACCESS
     xf86SetOperatingState(resVga, pTrident->pEnt->index, ResUnusedOpr);
@@ -1163,7 +1168,7 @@ TRIDENTPreInit(ScrnInfoPtr pScrn, int flags)
     xf86CollectOptions(pScrn, NULL);
 
     /* Process the options */
-    if (!(pTrident->Options = xalloc(sizeof(TRIDENTOptions))))
+    if (!(pTrident->Options = malloc(sizeof(TRIDENTOptions))))
 	return FALSE;
     memcpy(pTrident->Options, TRIDENTOptions, sizeof(TRIDENTOptions));
     xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pTrident->Options);
@@ -2617,7 +2622,10 @@ TRIDENTModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
     TRIDENTRegPtr tridentReg;
 
-    if (!xf86IsPc98()) WAITFORVSYNC;
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
+    if (!xf86IsPc98())
+#endif
+        WAITFORVSYNC;
 
     TridentFindClock(pScrn,mode->Clock);
 
@@ -2709,8 +2717,10 @@ TRIDENTModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
 
     vgaHWProtect(pScrn, FALSE);
 
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
     if (xf86IsPc98())
 	PC98TRIDENTEnable(pScrn);
+#endif
 
     if (pTrident->TVChipset != 0)
        VIA_TVInit(pScrn);
@@ -2782,7 +2792,10 @@ TRIDENTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
     if (!TRIDENTMapMem(pScrn))
 	return FALSE;
 
-    if (!xf86IsPc98()) {
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
+    if (!xf86IsPc98())
+#endif
+    {
 #ifdef VBE_INFO
 	if (pTrident->vbeModes) {
 	    pTrident->pVbe = VBEInit(NULL,pTrident->pEnt->index);
@@ -2796,7 +2809,7 @@ TRIDENTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 	    }
 	}
     }
-    
+
     hwp = VGAHWPTR(pScrn);
 
     if (IsPciCard && UseMMIO) {
@@ -2813,9 +2826,12 @@ TRIDENTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
      * Some Trident chip on PC-9821 needs setup,
      * because VGA chip is not initialized by VGA BIOS.
      */
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
     if (IsPciCard && xf86IsPc98()) {
 	 PC98TRIDENTInit(pScrn);
-    } else tridentSetModeBIOS(pScrn,pScrn->currentMode);
+    } else
+#endif
+    tridentSetModeBIOS(pScrn,pScrn->currentMode);
 
     /* Initialise the first mode */
     if (!TRIDENTModeInit(pScrn, pScrn->currentMode))
@@ -2868,7 +2884,7 @@ TRIDENTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 
     if(pTrident->ShadowFB) {
  	pTrident->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * width);
-        pTrident->ShadowPtr = xalloc(pTrident->ShadowPitch * height);
+        pTrident->ShadowPtr = malloc(pTrident->ShadowPitch * height);
 	displayWidth = pTrident->ShadowPitch / (pScrn->bitsPerPixel >> 3);
         FBStart = pTrident->ShadowPtr;
     } else {
@@ -2958,7 +2974,7 @@ TRIDENTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 		(miBankProcPtr)TVGA8900SetReadWrite;
 	if (!miInitializeBanking(pScreen, pScrn->virtualX, pScrn->virtualY,
 				 pScrn->displayWidth, pBankInfo)) {
-	    xfree(pBankInfo);
+	    free(pBankInfo);
 	    pBankInfo = NULL;
 	    if (pTrident->pVbe)
 	    	vbeFree(pTrident->pVbe);
@@ -3200,8 +3216,10 @@ TRIDENTLeaveVT(int scrnIndex, int flags)
     TRIDENTRestore(pScrn);
     vgaHWLock(hwp);
 
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
     if (xf86IsPc98())
 	PC98TRIDENTDisable(pScrn);
+#endif
 
     if (IsPciCard && UseMMIO) TRIDENTDisableMMIO(pScrn);
 }
@@ -3225,28 +3243,31 @@ TRIDENTCloseScreen(int scrnIndex, ScreenPtr pScreen)
 	pTrident->AccelInfoRec->Sync(pScrn);
     else if (!pTrident->NoAccel && pTrident->useEXA)
 	pTrident->EXADriverPtr->WaitMarker(pScreen, 0);
-	
+
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
     if (xf86IsPc98())
 	PC98TRIDENTDisable(pScrn);
+#endif
 
     	TRIDENTRestore(pScrn);
     	vgaHWLock(hwp);
 	if (IsPciCard && UseMMIO) TRIDENTDisableMMIO(pScrn);
     	TRIDENTUnmapMem(pScrn);
     }
+
     if (pTrident->AccelInfoRec)
 	XAADestroyInfoRec(pTrident->AccelInfoRec);
     if (pTrident->EXADriverPtr) {
 	exaDriverFini(pScreen);
-	xfree(pTrident->EXADriverPtr);
+	free(pTrident->EXADriverPtr);
 	pTrident->EXADriverPtr = NULL;
     }	
     if (pTrident->CursorInfoRec)
 	xf86DestroyCursorInfoRec(pTrident->CursorInfoRec);
     if (pTrident->ShadowPtr)
-	xfree(pTrident->ShadowPtr);
+	free(pTrident->ShadowPtr);
     if (pTrident->DGAModes)
-	xfree(pTrident->DGAModes);
+	free(pTrident->DGAModes);
     pScrn->vtSema = FALSE;
 
     if(pTrident->BlockHandler)
@@ -3317,15 +3338,17 @@ static void
 TRIDENTEnableMMIO(ScrnInfoPtr pScrn)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
-    IOADDRESS vgaIOBase = pTrident->PIOBase + VGAHWPTR(pScrn)->IOBase;
+    unsigned long vgaIOBase = pTrident->PIOBase + VGAHWPTR(pScrn)->IOBase;
     CARD8 temp = 0, protect = 0;
 
     /*
      * Skip MMIO Enable in PC-9821 PCI Trident Card!!
      * Because of lack of non PCI VGA port
      */
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
     if (IsPciCard && xf86IsPc98())
       return;
+#endif
 
     /* Goto New Mode */
     outb(pTrident->PIOBase + 0x3C4, 0x0B);
@@ -3366,8 +3389,10 @@ TRIDENTDisableMMIO(ScrnInfoPtr pScrn)
      * Skip MMIO Disable in PC-9821 PCI Trident Card!!
      * Because of lack of non PCI VGA port
      */
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
     if (IsPciCard && xf86IsPc98())
       return;
+#endif
 
     /* Goto New Mode */
     OUTB(0x3C4, 0x0B); temp = INB(0x3C5);
@@ -3395,6 +3420,7 @@ TRIDENTDisableMMIO(ScrnInfoPtr pScrn)
     outb(pTrident->PIOBase + 0x3C5, temp);
 }
 
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 /* Initialize VGA Block for Trident Chip on PC-98x1 */
 static void
 PC98TRIDENTInit(ScrnInfoPtr pScrn)
@@ -3637,7 +3663,7 @@ PC98TRIDENT96xxDisable(ScrnInfoPtr pScrn)
     outb(0x6A, 0x06);
     outb(0x68, 0x0F);
 }
-
+#endif
 
 /* 
  * This is a terrible hack! If we are on a notebook in a stretched
diff --git a/src/trident_video.c b/src/trident_video.c
index 0c5497b..0ae1d14 100644
--- a/src/trident_video.c
+++ b/src/trident_video.c
@@ -125,7 +125,7 @@ void TRIDENTInitVideo(ScreenPtr pScreen)
 	    adaptors = &newAdaptor;
 	} else {
 	    newAdaptors =  /* need to free this someplace */
-		xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*));
+		malloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*));
 	    if(newAdaptors) {
 		memcpy(newAdaptors, adaptors, num_adaptors * 
 					sizeof(XF86VideoAdaptorPtr));
@@ -140,7 +140,7 @@ void TRIDENTInitVideo(ScreenPtr pScreen)
         xf86XVScreenInit(pScreen, adaptors, num_adaptors);
 
     if(newAdaptors)
-	xfree(newAdaptors);
+	free(newAdaptors);
 
     if (pTrident->videoFlags)
 	xf86DrvMsgVerb(pScrn->scrnIndex,X_INFO,3,
@@ -321,7 +321,7 @@ TRIDENTSetupImageVideo(ScreenPtr pScreen)
     XF86VideoAdaptorPtr adapt;
     TRIDENTPortPrivPtr pPriv;
 
-    if(!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) +
+    if(!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) +
 			    sizeof(TRIDENTPortPrivRec) +
 			    sizeof(DevUnion))))
 	return NULL;
@@ -978,18 +978,18 @@ TRIDENTAllocateSurface(
     surface->width = w;
     surface->height = h;
 
-    if(!(surface->pitches = xalloc(sizeof(int)))) {
+    if(!(surface->pitches = malloc(sizeof(int)))) {
 	xf86FreeOffscreenLinear(linear);
 	return BadAlloc;
     }
-    if(!(surface->offsets = xalloc(sizeof(int)))) {
-	xfree(surface->pitches);
+    if(!(surface->offsets = malloc(sizeof(int)))) {
+	free(surface->pitches);
 	xf86FreeOffscreenLinear(linear);
 	return BadAlloc;
     }
-    if(!(pPriv = xalloc(sizeof(OffscreenPrivRec)))) {
-	xfree(surface->pitches);
-	xfree(surface->offsets);
+    if(!(pPriv = malloc(sizeof(OffscreenPrivRec)))) {
+	free(surface->pitches);
+	free(surface->offsets);
 	xf86FreeOffscreenLinear(linear);
 	return BadAlloc;
     }
@@ -1034,9 +1034,9 @@ TRIDENTFreeSurface(
     if(pPriv->isOn)
 	TRIDENTStopSurface(surface);
     xf86FreeOffscreenLinear(pPriv->linear);
-    xfree(surface->pitches);
-    xfree(surface->offsets);
-    xfree(surface->devPrivate.ptr);
+    free(surface->pitches);
+    free(surface->offsets);
+    free(surface->devPrivate.ptr);
 
     return Success;
 }
@@ -1128,7 +1128,7 @@ TRIDENTInitOffscreenImages(ScreenPtr pScreen)
     XF86OffscreenImagePtr offscreenImages;
 
     /* need to free this someplace */
-    if(!(offscreenImages = xalloc(sizeof(XF86OffscreenImageRec))))
+    if(!(offscreenImages = malloc(sizeof(XF86OffscreenImageRec))))
 	return;
 
     offscreenImages[0].image = &Images[0];
@@ -1342,7 +1342,10 @@ WaitForVBlank(ScrnInfoPtr pScrn)
      * full vblank has passed. 
      * - Alan.
      */
-    if (!xf86IsPc98()) {
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
+    if (!xf86IsPc98())
+#endif
+    {
        WAITFORVSYNC;
        WAITFORVSYNC;
     }