summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2006-04-16 01:51:35 +0200
committerLuc Verhaegen <libv@skynet.be>2006-04-16 01:51:35 +0200
commitc6e9810cf5129e54f9f2f96811f4accf95a13e48 (patch)
tree087575325c8d6919cb1c09e86f81e5e2d56107f6
parent26ef6400d83b3173a73815da85ae75dac71b7c0c (diff)
Remove pATI->IsVGAWonder by replacing it with
((pATI->Chip < ATI_CHIP_264CT) && pATI->IsVGA).
-rw-r--r--src/atiadjust.c12
-rw-r--r--src/aticlock.c6
-rw-r--r--src/atilock.c4
-rw-r--r--src/atimode.c10
-rw-r--r--src/atipreinit.c16
-rw-r--r--src/atiprint.c2
-rw-r--r--src/atistruct.h3
7 files changed, 23 insertions, 30 deletions
diff --git a/src/atiadjust.c b/src/atiadjust.c
index b558fa2..9fd4163 100644
--- a/src/atiadjust.c
+++ b/src/atiadjust.c
@@ -70,17 +70,11 @@ ATIAdjustPreInit
case ATI_CRTC_VGA:
if (pATI->Chip >= ATI_CHIP_264CT)
- {
pATI->AdjustMaxBase = MaxBits(CRTC_OFFSET_VGA) << 2;
- }
- else if (!pATI->IsVGAWonder)
- {
+ else if (!pATI->IsVGA) /* GX/CX with VGA strap */
pATI->AdjustMaxBase = 0xFFFFU << 3;
- }
- else /* Mach32 & Mach64 */
- {
+ else /* GX/CX without VGA strap */
pATI->AdjustMaxBase = 0x0FFFFFU << 3;
- }
break;
#endif /* AVOID_CPIO */
@@ -160,7 +154,7 @@ ATIAdjustFrame
PutReg(CRTX(pATI->CPIO_VGABase), 0x0CU, GetByte(Base, 1));
PutReg(CRTX(pATI->CPIO_VGABase), 0x0DU, GetByte(Base, 0));
- if (pATI->IsVGAWonder) {
+ if (pATI->IsVGA) { /* GX/CX with VGA strap */
ATIModifyExtReg(pATI, 0xB0U, -1, 0xBFU, Base >> 10);
ATIModifyExtReg(pATI, 0xA3U, -1, 0xEFU, Base >> 13);
diff --git a/src/aticlock.c b/src/aticlock.c
index c7b1d58..89ae036 100644
--- a/src/aticlock.c
+++ b/src/aticlock.c
@@ -734,7 +734,7 @@ ProbeClocks:
ATIModeSave(pScreenInfo, pATI, &pATI->OldHW);
/* Ensure clock select pins are not OR'ed with anything */
- if (pATI->IsVGAWonder && (pATI->OldHW.crtc == ATI_CRTC_VGA))
+ if ((pATI->Chip < ATI_CHIP_264CT) && (pATI->OldHW.crtc == ATI_CRTC_VGA))
ATIModifyExtReg(pATI, 0xB5U, pATI->OldHW.b5, 0x7FU, 0x00U);
}
@@ -764,7 +764,7 @@ ProbeClocks:
/* Get generic two low-order bits */
genmo = (inb(R_GENMO) & 0xF3U) | ((Index << 2) & 0x0CU);
- if (pATI->IsVGAWonder) {
+ if ((pATI->Chip < ATI_CHIP_264CT) && pATI->IsVGA) {
/* Start sequencer reset */
PutReg(SEQX, 0x00U, 0x00U);
@@ -1280,7 +1280,7 @@ ATIClockCalculate
pATIHW->genmo = (pATIHW->genmo & 0xF3U) |
((ClockSelect << 2) & 0x0CU);
- if (pATI->IsVGAWonder) {
+ if ((pATI->Chip < ATI_CHIP_264CT) && pATI->IsVGA) {
/* Set ATI clock select bits */
pATIHW->be = (pATIHW->be & 0xEFU) |
((ClockSelect << 2) & 0x10U);
diff --git a/src/atilock.c b/src/atilock.c
index f310ce3..10920cc 100644
--- a/src/atilock.c
+++ b/src/atilock.c
@@ -173,7 +173,7 @@ ATIUnlock
}
if (pATI->IsVGA) {
- if (pATI->IsVGAWonder) {
+ if (pATI->Chip < ATI_CHIP_264CT) {
/*
* Ensure all registers are read/write and disable all non-VGA
* emulations.
@@ -444,7 +444,7 @@ ATILock
ATIMach64PutLCDReg(LCD_GEN_CNTL, saved_lcd_gen_ctrl);
}
- if (pATI->IsVGAWonder) {
+ if (pATI->Chip < ATI_CHIP_264CT) {
/*
* Restore emulation and protection bits in ATI extended VGA
* registers.
diff --git a/src/atimode.c b/src/atimode.c
index 171d750..d9c962d 100644
--- a/src/atimode.c
+++ b/src/atimode.c
@@ -267,7 +267,7 @@ ATIModePreInit
ATIVGAPreInit(pATI, pATIHW);
/* Fill in VGA Wonder data */
- if (pATI->IsVGAWonder)
+ if (pATI->Chip < ATI_CHIP_264CT)
ATIVGAWonderPreInit(pATI, pATIHW);
}
@@ -425,7 +425,7 @@ ATIModeSave
ATIVGASave(pATI, pATIHW);
/* Save VGA Wonder data */
- if (pATI->IsVGAWonder)
+ if (pATI->Chip < ATI_CHIP_264CT)
ATIVGAWonderSave(pATI, pATIHW);
}
@@ -587,7 +587,7 @@ ATIModeCalculate
ATIVGACalculate(pATI, pATIHW, pMode);
/* Fill in VGA Wonder data */
- if (pATI->IsVGAWonder)
+ if ((pATI->Chip < ATI_CHIP_264CT) && pATI->IsVGA)
ATIVGAWonderCalculate(pATI, pATIHW, pMode);
if (pATI->Chip >= ATI_CHIP_264CT) {
@@ -1070,7 +1070,7 @@ ATIModeSet
ATIRGB514Set(pATI, pATIHW);
/* Load VGA Wonder */
- if (pATI->IsVGAWonder)
+ if ((pATI->Chip < ATI_CHIP_264CT) && pATI->IsVGA)
ATIVGAWonderSet(pATI, pATIHW);
/* Load VGA device */
@@ -1127,7 +1127,7 @@ ATIModeSet
PutReg(SEQX, 0x02U, pATIHW->seq[2]);
PutReg(SEQX, 0x04U, pATIHW->seq[4]);
PutReg(GRAX, 0x06U, pATIHW->gra[6]);
- if (pATI->IsVGAWonder)
+ if ((pATI->Chip < ATI_CHIP_264CT) && pATI->IsVGA)
ATIModifyExtReg(pATI, 0xB6U, -1, 0x00U, pATIHW->b6);
}
diff --git a/src/atipreinit.c b/src/atipreinit.c
index 6048c37..f5dd9db 100644
--- a/src/atipreinit.c
+++ b/src/atipreinit.c
@@ -264,10 +264,9 @@ ATIMach64Probe(ATIPtr pATI)
if (pATI->Chip == ATI_CHIP_88800CX)
IOValue |= CFG_VGA_EN;
- if (IOValue == (CFG_VGA_EN | CFG_CHIP_EN)) {
+ if (IOValue == (CFG_VGA_EN | CFG_CHIP_EN))
pATI->IsVGA = TRUE;
- pATI->IsVGAWonder = TRUE;
- } else
+ else
pATI->IsVGA = FALSE;
} else
pATI->IsVGA = TRUE;
@@ -295,7 +294,7 @@ ATIClaimVGAResources(ATIPtr pATI)
{
xf86ClaimFixedResources(resVgaShared, pATI->iEntity);
- if (pATI->IsVGAWonder) {
+ if (pATI->Chip < ATI_CHIP_264CT) {
resRange Resources[2] = {{0, 0, 0}, _END};
Resources[0].type = ResShrIoSparse | ResBus;
Resources[0].rBase = WONDER_IO;
@@ -1347,7 +1346,7 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags)
(pATI->CPIODecoding == SPARSE_IO) ? "sparse" : "block",
pATI->CPIOBase);
- if (pATI->IsVGAWonder)
+ if ((pATI->Chip < ATI_CHIP_264CT) && pATI->IsVGA)
xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED,
"VGA Wonder registers at I/O port 0x%04X.\n", WONDER_IO);
@@ -1502,7 +1501,7 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags)
xf86FreeResList(pResources);
}
- if (pATI->IsVGAWonder) {
+ if (pATI->Chip < ATI_CHIP_264CT) {
pResources = xf86SetOperatingState(pATI->VGAWonderResources,
pATI->iEntity, ResUnusedOpr);
if (pResources) {
@@ -2125,7 +2124,7 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags)
#ifndef AVOID_CPIO
AcceleratorVideoRAM = pScreenInfo->videoRam;
- if (pATI->IsVGAWonder) {
+ if ((pATI->Chip < ATI_CHIP_264CT) && pATI->IsVGA) {
/*
* XXX There's an assumption here that the values retrieved are those
* set by BIOS initialisation.
@@ -2678,7 +2677,8 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags)
* Don't exceed the memory clock on VGA Wonder capables
* with less than 1 MB, if using a packed mode.
*/
- if (pATI->IsVGAWonder && (pATI->VideoRAM < 1024))
+ if ((pATI->Chip < ATI_CHIP_264CT) && pATI->IsVGA &&
+ (pATI->VideoRAM < 1024))
DefaultmaxClock =
(GetBits(BIOSByte(0x44U), 0x04U) * 5000) + 40000;
else
diff --git a/src/atiprint.c b/src/atiprint.c
index bbc9175..d44f24f 100644
--- a/src/atiprint.c
+++ b/src/atiprint.c
@@ -467,7 +467,7 @@ ATIPrintRegisters
ATIPrintIndexedRegisters(GRAX, 0, 16, "Graphics controller", 0);
ATIPrintIndexedRegisters(SEQX, 0, 8, "Sequencer", 0);
- if (pATI->IsVGAWonder)
+ if (pATI->Chip < ATI_CHIP_264CT)
ATIPrintIndexedRegisters(WONDER_IO, 0x80U, 0xC0U,
"ATI extended VGA", 0);
}
diff --git a/src/atistruct.h b/src/atistruct.h
index c01cee6..44aec36 100644
--- a/src/atistruct.h
+++ b/src/atistruct.h
@@ -198,8 +198,7 @@ typedef struct _ATIRec
IOADDRESS CPIO_VGABase;
/* Processor I/O port definitions for VGA Wonder. */
- Bool IsVGAWonder;
- CARD8 B2Reg; /* The B2 mirror */
+ CARD8 B2Reg; /* The B2 mirror -- banked memory stuff */
#endif /* AVOID_CPIO */