summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-10-29 20:07:56 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-10-29 20:11:49 -0700
commit343fc2a2b98ca9e93c031b7f7c3378563699b394 (patch)
treeed633e4c2ea885c296520b6c76bfbb96dc64daaf
parentb20007d04b9198188fd214d3ed7d850dd613bc97 (diff)
Disable PC98 code on newer servers
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r--src/trident_driver.c33
-rw-r--r--src/trident_video.c5
2 files changed, 31 insertions, 7 deletions
diff --git a/src/trident_driver.c b/src/trident_driver.c
index addf36e..472c9b7 100644
--- a/src/trident_driver.c
+++ b/src/trident_driver.c
@@ -2622,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);
@@ -2714,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);
@@ -2787,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);
@@ -2801,7 +2809,7 @@ TRIDENTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
}
}
}
-
+
hwp = VGAHWPTR(pScrn);
if (IsPciCard && UseMMIO) {
@@ -2818,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))
@@ -3205,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);
}
@@ -3230,15 +3243,18 @@ 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) {
@@ -3329,8 +3345,10 @@ TRIDENTEnableMMIO(ScrnInfoPtr pScrn)
* 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);
@@ -3371,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);
@@ -3400,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)
@@ -3642,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 1ed7db2..0ae1d14 100644
--- a/src/trident_video.c
+++ b/src/trident_video.c
@@ -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;
}