summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2006-03-21 01:20:35 +0000
committerLuc Verhaegen <libv@skynet.be>2006-03-21 01:20:35 +0000
commitedb779452ccf8ca5e949c066848acd16e6b559b3 (patch)
tree3c5e149f4cef9bf57836d80a7f7092353574e456
parent9880cc0faf4df3ecb23b1655d6d9b268f7aeb04f (diff)
Remove 1 and 4bpp support.
-rw-r--r--ChangeLog19
-rw-r--r--src/ati.c21
-rw-r--r--src/atiadjust.c9
-rw-r--r--src/atidac.c36
-rw-r--r--src/atidga.c2
-rw-r--r--src/atidsp.c10
-rw-r--r--src/atiload.c14
-rw-r--r--src/atiload.h6
-rw-r--r--src/atimach64.c30
-rw-r--r--src/atimode.c16
-rw-r--r--src/atipreinit.c617
-rw-r--r--src/atiscreen.c69
-rw-r--r--src/ativga.c44
-rw-r--r--src/atiwonder.c9
14 files changed, 248 insertions, 654 deletions
diff --git a/ChangeLog b/ChangeLog
index be29b4f..d120253 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2006-03-21 Luc Verhaegen <libv@skynet.be>
+
+ * src/ati.c: (ATISetup):
+ * src/atiadjust.c: (ATIAdjustPreInit), (ATIAdjustFrame):
+ * src/atidac.c: (ATIDACPreInit):
+ * src/atidga.c: (ATIDGAInit):
+ * src/atidsp.c: (ATIDSPCalculate):
+ * src/atiload.c: (ATILoadModules):
+ * src/atiload.h:
+ * src/atimach64.c: (ATIMach64PreInit), (ATIMach64Calculate):
+ * src/atimode.c: (ATIModeCalculate):
+ * src/atipreinit.c: (Mach64PreInitGetClockInfo), (ATIReportMemory),
+ (ATIPreInit):
+ * src/atiscreen.c: (ATIScreenInit):
+ * src/ativga.c: (ATIVGAPreInit):
+ * src/atiwonder.c: (ATIVGAWonderPreInit), (ATIVGAWonderCalculate):
+
+ Remove 1 and 4bpp support.
+
2006-03-20 Luc Verhaegen <libv@skynet.be>
* src/atiadjust.c: (ATIAdjustPreInit), (ATIAdjustFrame):
diff --git a/src/ati.c b/src/ati.c
index 315ca69..33905b6 100644
--- a/src/ati.c
+++ b/src/ati.c
@@ -124,22 +124,6 @@ const char *ATIvbeSymbols[] =
NULL
};
-#ifndef AVOID_CPIO
-
-const char *ATIxf1bppSymbols[] =
-{
- "xf1bppScreenInit",
- NULL
-};
-
-const char *ATIxf4bppSymbols[] =
-{
- "xf4bppScreenInit",
- NULL
-};
-
-#endif /* AVOID_CPIO */
-
#ifdef XF86DRI_DEVEL
const char *ATIdrmSymbols[] = {
@@ -254,11 +238,6 @@ ATISetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
xf86LoaderRefSymLists(ATIint10Symbols,
ATIddcSymbols,
ATIvbeSymbols,
-#ifndef AVOID_CPIO
- ATIxf1bppSymbols,
- ATIxf4bppSymbols,
-#endif /* AVOID_CPIO */
-
#ifdef XF86DRI_DEVEL
ATIdrmSymbols,
ATIdriSymbols,
diff --git a/src/atiadjust.c b/src/atiadjust.c
index 4c2b49c..e95af55 100644
--- a/src/atiadjust.c
+++ b/src/atiadjust.c
@@ -72,8 +72,6 @@ ATIAdjustPreInit
if (pATI->Chip >= ATI_CHIP_264CT)
{
pATI->AdjustMaxBase = MaxBits(CRTC_OFFSET_VGA) << 2;
- if (pATI->depth <= 4)
- pATI->AdjustMaxBase <<= 1;
}
else if (!pATI->CPIO_VGAWonder)
{
@@ -182,13 +180,6 @@ ATIAdjustFrame
* the CRTC's offset register to more than 256k needs to be done through
* the accelerator port.
*/
- if (pATI->depth <= 4)
- {
- outr(CRTC_OFF_PITCH, SetBits(pATI->displayWidth >> 4, CRTC_PITCH) |
- SetBits(Base, CRTC_OFFSET));
- }
- else
-
#endif /* AVOID_CPIO */
{
diff --git a/src/atidac.c b/src/atidac.c
index 7eb4515..34b698c 100644
--- a/src/atidac.c
+++ b/src/atidac.c
@@ -187,42 +187,6 @@ ATIDACPreInit
}
#ifndef AVOID_CPIO
-
- if (pATI->depth == 1)
- {
- rgb blackColour = pScreenInfo->display->blackColour,
- whiteColour = pScreenInfo->display->whiteColour;
-
- if (blackColour.red > maxColour)
- blackColour.red = maxColour;
- if (blackColour.green > maxColour)
- blackColour.green = maxColour;
- if (blackColour.blue > maxColour)
- blackColour.blue = maxColour;
- if (whiteColour.red > maxColour)
- whiteColour.red = maxColour;
- if (whiteColour.green > maxColour)
- whiteColour.green = maxColour;
- if (whiteColour.blue > maxColour)
- whiteColour.blue = maxColour;
-
- if ((blackColour.red == whiteColour.red) &&
- (blackColour.green == whiteColour.green) &&
- (blackColour.blue == whiteColour.blue))
- {
- blackColour.red ^= maxColour;
- blackColour.green ^= maxColour;
- blackColour.blue ^= maxColour;
- }
-
- pATIHW->lut[(MONO_BLACK * 3) + 0] = blackColour.red;
- pATIHW->lut[(MONO_BLACK * 3) + 1] = blackColour.green;
- pATIHW->lut[(MONO_BLACK * 3) + 2] = blackColour.blue;
- pATIHW->lut[(MONO_WHITE * 3) + 0] = whiteColour.red;
- pATIHW->lut[(MONO_WHITE * 3) + 1] = whiteColour.green;
- pATIHW->lut[(MONO_WHITE * 3) + 2] = whiteColour.blue;
- }
-
if (pATIHW->crtc == ATI_CRTC_VGA)
{
/* Initialise overscan to black */
diff --git a/src/atidga.c b/src/atidga.c
index e4c20b3..70245d3 100644
--- a/src/atidga.c
+++ b/src/atidga.c
@@ -407,7 +407,7 @@ ATIDGAInit
* banked framebuffers. Also, disable DGA when non-DGA server modes
* are planar.
*/
- if (pATI->BankInfo.BankSize || (pScreenInfo->depth <= 4))
+ if (pATI->BankInfo.BankSize)
return FALSE;
#endif /* AVOID_CPIO */
diff --git a/src/atidsp.c b/src/atidsp.c
index d7a3b4b..d487ea0 100644
--- a/src/atidsp.c
+++ b/src/atidsp.c
@@ -223,15 +223,7 @@ ATIDSPCalculate
pATI->ClockDescriptor.PostDividers[pATIHW->PostDivider];
Divider = pATIHW->FeedbackDivider * pATI->XCLKReferenceDivider;
-#ifndef AVOID_CPIO
-
- if (pATI->depth >= 8)
-
-#endif /* AVOID_CPIO */
-
- {
- Divider *= pATI->bitsPerPixel / 4;
- }
+ Divider *= pATI->bitsPerPixel / 4;
/* Start by assuming a display FIFO width of 64 bits */
vshift = (6 - 2) - pATI->XCLKPostDivider;
diff --git a/src/atiload.c b/src/atiload.c
index bd1a403..16a1446 100644
--- a/src/atiload.c
+++ b/src/atiload.c
@@ -85,19 +85,7 @@ ATILoadModules
return NULL;
/* Load depth-specific entry points */
- switch (pATI->bitsPerPixel)
- {
-
-#ifndef AVOID_CPIO
-
- case 1:
- return ATILoadModule(pScreenInfo, "xf1bpp", ATIxf1bppSymbols);
-
- case 4:
- return ATILoadModule(pScreenInfo, "xf4bpp", ATIxf4bppSymbols);
-
-#endif /* AVOID_CPIO */
-
+ switch (pATI->bitsPerPixel) {
case 8:
case 16:
case 24:
diff --git a/src/atiload.h b/src/atiload.h
index 96606e3..bf78eea 100644
--- a/src/atiload.h
+++ b/src/atiload.h
@@ -35,12 +35,6 @@
extern const char *ATIint10Symbols[], *ATIddcSymbols[], *ATIvbeSymbols[],
-#ifndef AVOID_CPIO
-
- *ATIxf1bppSymbols[], *ATIxf4bppSymbols[],
-
-#endif /* AVOID_CPIO */
-
#ifdef XF86DRI_DEVEL
*ATIdrmSymbols[], *ATIdriSymbols[],
diff --git a/src/atimach64.c b/src/atimach64.c
index 95a9c07..055cf9b 100644
--- a/src/atimach64.c
+++ b/src/atimach64.c
@@ -84,19 +84,7 @@ ATIMach64PreInit
CARD32 bus_cntl, config_cntl;
int tmp;
-#ifndef AVOID_CPIO
-
- if (pATI->depth <= 4)
- {
- pATIHW->crtc_off_pitch = SetBits(pATI->displayWidth >> 4, CRTC_PITCH);
- }
- else
-
-#endif /* AVOID_CPIO */
-
- {
- pATIHW->crtc_off_pitch = SetBits(pATI->displayWidth >> 3, CRTC_PITCH);
- }
+ pATIHW->crtc_off_pitch = SetBits(pATI->displayWidth >> 3, CRTC_PITCH);
if ((pATI->LockData.crtc_gen_cntl & CRTC_CSYNC_EN) && !pATI->OptionCSync)
{
@@ -685,21 +673,7 @@ ATIMach64Calculate
CRTC_VGA_TEXT_132 | CRTC_CUR_B_TEST);
pATIHW->crtc_gen_cntl |=
CRTC_EXT_DISP_EN | CRTC_EN | CRTC_VGA_LINEAR | CRTC_CNT_EN;
- switch (pATI->depth)
- {
-
-#ifndef AVOID_CPIO
-
- case 1:
- pATIHW->crtc_gen_cntl |= SetBits(PIX_WIDTH_1BPP, CRTC_PIX_WIDTH);
- break;
-
- case 4:
- pATIHW->crtc_gen_cntl |= SetBits(PIX_WIDTH_4BPP, CRTC_PIX_WIDTH);
- break;
-
-#endif /* AVOID_CPIO */
-
+ switch (pATI->depth) {
case 8:
pATIHW->crtc_gen_cntl |= SetBits(PIX_WIDTH_8BPP, CRTC_PIX_WIDTH);
break;
diff --git a/src/atimode.c b/src/atimode.c
index 86104fe..d61f97e 100644
--- a/src/atimode.c
+++ b/src/atimode.c
@@ -628,16 +628,6 @@ ATIModeCalculate
CRTC_CUR_B_TEST);
/* Some of these are not relevent, but that doesn't matter */
switch (pATI->depth) {
- case 1:
- pATIHW->crtc_gen_cntl |=
- SetBits(PIX_WIDTH_1BPP, CRTC_PIX_WIDTH);
- break;
-
- case 4:
- pATIHW->crtc_gen_cntl |=
- SetBits(PIX_WIDTH_4BPP, CRTC_PIX_WIDTH);
- break;
-
case 8:
pATIHW->crtc_gen_cntl |=
SetBits(PIX_WIDTH_8BPP, CRTC_PIX_WIDTH);
@@ -679,11 +669,7 @@ ATIModeCalculate
pATIHW->crtc_gen_cntl |= CRTC_INTERLACE_EN;
if ((pMode->Flags & (V_CSYNC | V_PCSYNC)) || pATI->OptionCSync)
pATIHW->crtc_gen_cntl |= CRTC_CSYNC_EN;
- if (pATI->depth <= 4)
- pATIHW->crtc_gen_cntl |= CRTC_EN | CRTC_CNT_EN;
- else
- pATIHW->crtc_gen_cntl |=
- CRTC_EN | CRTC_VGA_LINEAR | CRTC_CNT_EN;
+ pATIHW->crtc_gen_cntl |= CRTC_EN | CRTC_VGA_LINEAR | CRTC_CNT_EN;
break;
diff --git a/src/atipreinit.c b/src/atipreinit.c
index b0cf9cb..9bf7200 100644
--- a/src/atipreinit.c
+++ b/src/atipreinit.c
@@ -644,7 +644,7 @@ Mach64PreInitGetClockInfo(ScrnInfoPtr pScrn, GDevPtr pGDev)
* accelerator modes.
*/
if ((pATI->ProgrammableClock == ATI_CLOCK_ICS2595) &&
- (pATI->DAC == ATI_DAC_IBMRGB514) && (pScrn->depth >= 8))
+ (pATI->DAC == ATI_DAC_IBMRGB514))
pATI->ProgrammableClock = ATI_CLOCK_IBMRGB514;
pATI->ClockDescriptor = ATIClockDescriptors[pATI->ProgrammableClock];
@@ -757,19 +757,6 @@ ATIReportMemory
snprintf(Buffer, SizeOf(Buffer), "%d kB of %s detected",
pATI->VideoRAM, MemoryTypeName);
-#ifndef AVOID_CPIO
-
- if (pATI->depth == 1)
- {
- /* 1bpp only uses one plane of four */
- pScreenInfo->videoRam /= 4;
- Message += snprintf(Message, Buffer + SizeOf(Buffer) - Message,
- " (using %d kB)", pScreenInfo->videoRam);
- }
- else
-
-#endif /* AVOID_CPIO */
-
if (pATI->VideoRAM > pScreenInfo->videoRam)
{
Message += snprintf(Message, Buffer + SizeOf(Buffer) - Message,
@@ -872,7 +859,6 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags)
vbeInfoPtr pVBE;
pointer pInt10Module, pDDCModule = NULL, pVBEModule = NULL;
int VGAVideoRAM = 0;
- resRange Resources[2] = {{0, 0, 0}, _END};
#endif /* AVOID_CPIO */
@@ -960,17 +946,7 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags)
for (j = 0; ; j++)
{
- static const CARD8 AllowedDepthBpp[][2] =
- {
-
-#ifndef AVOID_CPIO
-
- { 1, 1},
- { 4, 4},
- { 4, 8},
-
-#endif /* AVOID_CPIO */
-
+ static const CARD8 AllowedDepthBpp[][2] = {
{ 8, 8},
{15, 16},
{16, 16},
@@ -1120,19 +1096,17 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags)
#endif /* AVOID_CPIO */
pATI->Block0Base = 0; /* Might no longer be valid */
- if ((pVideo = pATI->PCIInfo))
- {
- if (pATI->CPIODecoding == BLOCK_IO)
- pATI->CPIOBase = pVideo->ioBase[1];
+ pVideo = pATI->PCIInfo;
- /* Set MMIO address from PCI configuration space, if available */
- if ((pATI->Block0Base = pVideo->memBase[2]))
- {
- if (pATI->Block0Base >= (CARD32)(-1 << pVideo->size[2]))
- pATI->Block0Base = 0;
- else
- pATI->Block0Base += 0x0400U;
- }
+ if (pATI->CPIODecoding == BLOCK_IO)
+ pATI->CPIOBase = pVideo->ioBase[1];
+
+ /* Set MMIO address from PCI configuration space, if available */
+ if ((pATI->Block0Base = pVideo->memBase[2])) {
+ if (pATI->Block0Base >= (CARD32)(-1 << pVideo->size[2]))
+ pATI->Block0Base = 0;
+ else
+ pATI->Block0Base += 0x0400U;
}
#ifdef AVOID_CPIO
@@ -1171,19 +1145,17 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags)
* it exists.
*/
if (!(Block0Base = pATI->Block0Base)) {
- if (pVideo) {
- /* Check tail end of linear (8MB or 4MB) aperture */
- if ((pATI->Block0Base = pVideo->memBase[0])) {
- pATI->Block0Base += 0x007FFC00U;
- ATIMach64Map(pScreenInfo->scrnIndex, pATI);
- if (pATI->pBlock[0])
- break;
+ /* Check tail end of linear (8MB or 4MB) aperture */
+ if ((pATI->Block0Base = pVideo->memBase[0])) {
+ pATI->Block0Base += 0x007FFC00U;
+ ATIMach64Map(pScreenInfo->scrnIndex, pATI);
+ if (pATI->pBlock[0])
+ break;
- pATI->Block0Base -= 0x00400000U;
- ATIMach64Map(pScreenInfo->scrnIndex, pATI);
- if (pATI->pBlock[0])
- break;
- }
+ pATI->Block0Base -= 0x00400000U;
+ ATIMach64Map(pScreenInfo->scrnIndex, pATI);
+ if (pATI->pBlock[0])
+ break;
}
/* Check VGA MMIO aperture */
@@ -1476,21 +1448,11 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags)
/*
* Set colour gamma.
*/
-
-#ifndef AVOID_CPIO
-
- if (pScreenInfo->depth > 1)
-
-#endif /* AVOID_CPIO */
-
- {
- if (!xf86SetGamma(pScreenInfo, defaultGamma))
- {
- ATILock(pATI);
- ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
- ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
- return FALSE;
- }
+ if (!xf86SetGamma(pScreenInfo, defaultGamma)) {
+ ATILock(pATI);
+ ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
+ ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
+ return FALSE;
}
pATI->depth = pScreenInfo->depth;
@@ -1501,66 +1463,39 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags)
/*
* Determine which CRT controller to use for video modes.
*/
+ pATI->NewHW.crtc = ATI_CRTC_MACH64;
-#ifndef AVOID_CPIO
-
- if (pATI->depth >= 8)
-
-#endif /* AVOID_CPIO */
-
- {
- pATI->NewHW.crtc = ATI_CRTC_MACH64;
-
- xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
- "Using Mach64 accelerator CRTC.\n");
+ xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
+ "Using Mach64 accelerator CRTC.\n");
#ifndef AVOID_CPIO
- if (pATI->IsVGA) {
- /*
- * No need for VGA I/O resources during operating state (but they
- * are still decoded).
- */
- pResources =
- xf86SetOperatingState(resVgaIo, pATI->iEntity, ResUnusedOpr);
- if (pResources)
- {
+ if (pATI->IsVGA) {
+ /*
+ * No need for VGA I/O resources during operating state (but they
+ * are still decoded).
+ */
+ pResources = xf86SetOperatingState(resVgaIo, pATI->iEntity, ResUnusedOpr);
+ if (pResources) {
+ xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
+ "Logic error setting operating state for VGA I/O.\n");
+ xf86FreeResList(pResources);
+ }
+
+ if (pATI->CPIO_VGAWonder) {
+ pResources = xf86SetOperatingState(pATI->VGAWonderResources,
+ pATI->iEntity, ResUnusedOpr);
+ if (pResources) {
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
- "Logic error setting operating state for VGA I/O.\n");
+ "Logic error setting operating state for"
+ " VGAWonder I/O.\n");
xf86FreeResList(pResources);
}
-
- if (pATI->CPIO_VGAWonder)
- {
- pResources = xf86SetOperatingState(pATI->VGAWonderResources,
- pATI->iEntity, ResUnusedOpr);
- if (pResources)
- {
- xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
- "Logic error setting operating state for"
- " VGAWonder I/O.\n");
- xf86FreeResList(pResources);
- }
- }
}
-
-#endif /* AVOID_CPIO */
-
- }
-
-#ifndef AVOID_CPIO
-
- else
- {
- pATI->NewHW.crtc = ATI_CRTC_VGA;
-
- xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
- "Using VGA CRTC.\n");
}
/* Complain if VGA is needed but not there */
- if ((pATI->NewHW.crtc == ATI_CRTC_VGA) || !pATI->OptionLinear)
- {
+ if (!pATI->OptionLinear) {
/* VGA is required at this point */
if (!pATI->IsVGA) {
xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
@@ -2197,323 +2132,206 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags)
{
-#ifndef AVOID_CPIO
-
- if (pATI->depth >= 8)
-
-#endif /* AVOID_CPIO */
-
- {
- /* Get adapter's linear aperture configuration */
- pATIHW->config_cntl = inr(CONFIG_CNTL);
- pATI->LinearBase =
- GetBits(pATIHW->config_cntl, CFG_MEM_AP_LOC) << 22;
- if ((pATIHW->config_cntl & CFG_MEM_AP_SIZE) != CFG_MEM_AP_SIZE)
- {
- pATI->LinearSize =
- GetBits(pATIHW->config_cntl, CFG_MEM_AP_SIZE) << 22;
-
- /*
- * Linear aperture could have been disabled (but still
- * assigned) by BIOS initialisation.
- */
- if (pATI->LinearBase && !pATI->LinearSize)
- {
- if ((pATI->Chip <= ATI_CHIP_88800GXD) &&
- (pATI->VideoRAM < 4096))
- pATI->LinearSize = 4 * 1024 * 1024;
- else
- pATI->LinearSize = 8 * 1024 * 1024;
- }
- }
+ /* Get adapter's linear aperture configuration */
+ pATIHW->config_cntl = inr(CONFIG_CNTL);
+ pATI->LinearBase =
+ GetBits(pATIHW->config_cntl, CFG_MEM_AP_LOC) << 22;
+ if ((pATIHW->config_cntl & CFG_MEM_AP_SIZE) != CFG_MEM_AP_SIZE) {
+ pATI->LinearSize =
+ GetBits(pATIHW->config_cntl, CFG_MEM_AP_SIZE) << 22;
-#ifndef AVOID_CPIO
-
- /* Except for PCI & AGP, allow for user override */
- if (!pVideo)
- {
- if (pATI->Chip == ATI_CHIP_88800CX)
- IOValue = ~((CARD32)((1 << 23) - 1));
- else if (pATI->Chip >= ATI_CHIP_88800GXE)
- IOValue = ~((CARD32)((1 << 24) - 1));
- else if (pATI->VideoRAM >= 4096)
- IOValue = ~((CARD32)((1 << 23) - 1));
- else
- IOValue = ~((CARD32)((1 << 22) - 1));
-
- IOValue &= pGDev->MemBase;
- if (IOValue &&
- (IOValue <= (CARD32)(MaxBits(CFG_MEM_AP_LOC) << 22)))
- pATI->LinearBase = IOValue;
-
- if (!pATI->LinearBase)
- {
- xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
- "Linear aperture not configured. Specify \"MemBase\""
- " override in XF86Config \"Device\" section.\n");
- }
+ /*
+ * Linear aperture could have been disabled (but still
+ * assigned) by BIOS initialisation.
+ */
+ if (pATI->LinearBase && !pATI->LinearSize) {
+ if ((pATI->Chip <= ATI_CHIP_88800GXD) &&
+ (pATI->VideoRAM < 4096))
+ pATI->LinearSize = 4 * 1024 * 1024;
else
- {
- if (!pATI->LinearSize)
- {
- if ((pATI->Chip <= ATI_CHIP_88800GXD) &&
- (pATI->VideoRAM < 4096))
- pATI->LinearSize = 4 * 1024 * 1024;
- else
- pATI->LinearSize = 8 * 1024 * 1024;
- }
-
- Resources[0].type = ResExcMemBlock | ResBus;
- Resources[0].rBegin = pATI->LinearBase;
- Resources[0].rEnd =
- pATI->LinearBase + pATI->LinearSize - 1;
- if (xf86RegisterResources(pATI->iEntity, Resources,
- ResNone))
- {
- xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
- "Unable to register %d MB linear aperture at"
- " 0x%08lX.\n", pATI->LinearSize >> 10,
- pATI->LinearBase);
+ pATI->LinearSize = 8 * 1024 * 1024;
+ }
+ }
- pATI->LinearSize = 0;
- }
- }
+ if (pATI->LinearBase && pATI->LinearSize) {
+ /*
+ * Unless specified in PCI configuration space, set MMIO
+ * address to tail end of linear aperture.
+ */
+ if (!pATI->Block0Base) {
+ pATI->Block0Base =
+ pATI->LinearBase + pATI->LinearSize - 0x00000400U;
+ pATI->MMIOInLinear = TRUE;
}
-#endif /* AVOID_CPIO */
+ AcceleratorVideoRAM = pATI->LinearSize >> 10;
- if (pATI->LinearBase && pATI->LinearSize)
- {
- /*
- * Unless specified in PCI configuration space, set MMIO
- * address to tail end of linear aperture.
- */
- if (!pATI->Block0Base)
- {
- pATI->Block0Base =
- pATI->LinearBase + pATI->LinearSize - 0x00000400U;
- pATI->MMIOInLinear = TRUE;
- }
+ /*
+ * Account for MMIO area at the tail end of the linear
+ * aperture, if it is needed or if it cannot be disabled.
+ */
+ if (pATI->MMIOInLinear || (pATI->Chip < ATI_CHIP_264VTB))
+ AcceleratorVideoRAM -= 2;
- AcceleratorVideoRAM = pATI->LinearSize >> 10;
+ ServerVideoRAM = pATI->VideoRAM;
+ if (pATI->Cursor > ATI_CURSOR_SOFTWARE) {
/*
- * Account for MMIO area at the tail end of the linear
- * aperture, if it is needed or if it cannot be disabled.
+ * Allocate a 1 kB cursor image area at the top of the
+ * little-endian aperture, just before any MMIO area that
+ * might also be there.
*/
- if (pATI->MMIOInLinear || (pATI->Chip < ATI_CHIP_264VTB))
- AcceleratorVideoRAM -= 2;
+ if (ServerVideoRAM > AcceleratorVideoRAM)
+ ServerVideoRAM = AcceleratorVideoRAM;
- ServerVideoRAM = pATI->VideoRAM;
+ ServerVideoRAM--;
+ pATI->CursorOffset = ServerVideoRAM << 10;
+ pATI->CursorBase = pATI->LinearBase + pATI->CursorOffset;
- if (pATI->Cursor > ATI_CURSOR_SOFTWARE)
- {
- /*
- * Allocate a 1 kB cursor image area at the top of the
- * little-endian aperture, just before any MMIO area that
- * might also be there.
- */
- if (ServerVideoRAM > AcceleratorVideoRAM)
- ServerVideoRAM = AcceleratorVideoRAM;
-
- ServerVideoRAM--;
- pATI->CursorOffset = ServerVideoRAM << 10;
- pATI->CursorBase = pATI->LinearBase + pATI->CursorOffset;
-
- xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
- "Storing hardware cursor image at 0x%08lX.\n",
- pATI->CursorBase);
- }
+ xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
+ "Storing hardware cursor image at 0x%08lX.\n",
+ pATI->CursorBase);
+ }
#ifndef AVOID_CPIO
- if (pATI->OptionLinear)
+ if (pATI->OptionLinear)
#endif /* AVOID_CPIO */
- {
- CARD32 PageSize = getpagesize() >> 10;
+ {
+ CARD32 PageSize = getpagesize() >> 10;
#if X_BYTE_ORDER == X_LITTLE_ENDIAN
- /*
- * MMIO areas must be mmap()'ed separately to avoid write
- * combining them. Thus, they might not end up still
- * adjacent with the little-endian linear aperture after
- * mmap()'ing. So, round down the linear aperture size to
- * avoid an overlap. Any hardware cursor image area might
- * not end up being write combined, but this seems
- * preferable to further reducing the video memory size
- * advertised to the server.
- *
- * XXX Ideally this should be dealt with in the os-support
- * layer, i.e., it should be possible to reset a
- * subarea's write combining after it has been
- * mmap()'ed, but doing so currently causes the removal
- * of write combining for the entire aperture.
- */
- if (pATI->MMIOInLinear)
- AcceleratorVideoRAM -= AcceleratorVideoRAM % PageSize;
+ /*
+ * MMIO areas must be mmap()'ed separately to avoid write
+ * combining them. Thus, they might not end up still
+ * adjacent with the little-endian linear aperture after
+ * mmap()'ing. So, round down the linear aperture size to
+ * avoid an overlap. Any hardware cursor image area might
+ * not end up being write combined, but this seems
+ * preferable to further reducing the video memory size
+ * advertised to the server.
+ *
+ * XXX Ideally this should be dealt with in the os-support
+ * layer, i.e., it should be possible to reset a
+ * subarea's write combining after it has been
+ * mmap()'ed, but doing so currently causes the removal
+ * of write combining for the entire aperture.
+ */
+ if (pATI->MMIOInLinear)
+ AcceleratorVideoRAM -= AcceleratorVideoRAM % PageSize;
#else /* if X_BYTE_ORDER != X_LITTLE_ENDIAN */
- /*
- * Big-endian apertures are 8 MB higher and don't contain
- * an MMIO area.
- */
- pATI->LinearBase += 0x00800000U;
- AcceleratorVideoRAM = pATI->LinearSize >> 10;
+ /*
+ * Big-endian apertures are 8 MB higher and don't contain
+ * an MMIO area.
+ */
+ pATI->LinearBase += 0x00800000U;
+ AcceleratorVideoRAM = pATI->LinearSize >> 10;
#endif /* X_BYTE_ORDER */
- if (ServerVideoRAM > AcceleratorVideoRAM)
- ServerVideoRAM = AcceleratorVideoRAM;
- else if (AcceleratorVideoRAM > pATI->VideoRAM)
- AcceleratorVideoRAM = pATI->VideoRAM;
+ if (ServerVideoRAM > AcceleratorVideoRAM)
+ ServerVideoRAM = AcceleratorVideoRAM;
+ else if (AcceleratorVideoRAM > pATI->VideoRAM)
+ AcceleratorVideoRAM = pATI->VideoRAM;
- PageSize--;
- AcceleratorVideoRAM =
- (AcceleratorVideoRAM + PageSize) & ~PageSize;
+ PageSize--;
+ AcceleratorVideoRAM =
+ (AcceleratorVideoRAM + PageSize) & ~PageSize;
- xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
- "Using %d MB linear aperture at 0x%08lX.\n",
- pATI->LinearSize >> 20, pATI->LinearBase);
+ xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
+ "Using %d MB linear aperture at 0x%08lX.\n",
+ pATI->LinearSize >> 20, pATI->LinearBase);
- /* Only mmap what is needed */
- ApertureSize = pATI->LinearSize =
- AcceleratorVideoRAM << 10;
- }
+ /* Only mmap what is needed */
+ ApertureSize = pATI->LinearSize = AcceleratorVideoRAM << 10;
+ }
- if (ServerVideoRAM < pATI->VideoRAM)
- {
- pScreenInfo->videoRam = ServerVideoRAM;
- xf86DrvMsg(pScreenInfo->scrnIndex, X_NOTICE,
- "Virtual resolutions will be limited to %d kB\n due to"
- " linear aperture size and/or placement of hardware"
- " cursor image area.\n",
- ServerVideoRAM);
- }
+ if (ServerVideoRAM < pATI->VideoRAM) {
+ pScreenInfo->videoRam = ServerVideoRAM;
+ xf86DrvMsg(pScreenInfo->scrnIndex, X_NOTICE,
+ "Virtual resolutions will be limited to %d kB\n due "
+ "to linear aperture size and/or placement of"
+ " hardware cursor image area.\n", ServerVideoRAM);
}
}
+ }
#ifndef AVOID_CPIO
- /* Set up for a banked aperture */
- if (pATI->IsVGA) {
- pATI->UseSmallApertures = TRUE;
+ /* Set up for a banked aperture */
+ if (pATI->IsVGA) {
+ pATI->UseSmallApertures = TRUE;
- /* Set banking functions */
- if (pATI->depth <= 4)
- {
- pATI->NewHW.SetBank = ATIMach64SetBankPlanar;
- pATI->BankInfo.SetSourceBank = ATIMach64SetReadPlanar;
- pATI->BankInfo.SetDestinationBank = ATIMach64SetWritePlanar;
- pATI->BankInfo.SetSourceAndDestinationBanks =
- ATIMach64SetReadWritePlanar;
- }
- else
- {
- pATI->NewHW.SetBank = ATIMach64SetBankPacked;
- pATI->BankInfo.SetSourceBank = ATIMach64SetReadPacked;
- pATI->BankInfo.SetDestinationBank = ATIMach64SetWritePacked;
- pATI->BankInfo.SetSourceAndDestinationBanks =
- ATIMach64SetReadWritePacked;
- }
+ pATI->NewHW.SetBank = ATIMach64SetBankPacked;
+ pATI->BankInfo.SetSourceBank = ATIMach64SetReadPacked;
+ pATI->BankInfo.SetDestinationBank = ATIMach64SetWritePacked;
+ pATI->BankInfo.SetSourceAndDestinationBanks =
+ ATIMach64SetReadWritePacked;
- /*
- * Unless specified in PCI configuration space, or at the top of
- * of a little-endian linear aperture, set MMIO address to the one
- * just above the VGA aperture. This does not work on the CT
- * (maybe others).
- */
- if (!pATI->Block0Base &&
- ((pATI->Chip < ATI_CHIP_264CT) ||
- (pATI->Chip >= ATI_CHIP_264VT) ||
- pATI->OptionDevel))
- pATI->Block0Base = 0x000BFC00U;
- }
+ /*
+ * Unless specified in PCI configuration space, or at the top of
+ * of a little-endian linear aperture, set MMIO address to the one
+ * just above the VGA aperture. This does not work on the CT
+ * (maybe others).
+ */
+ if (!pATI->Block0Base &&
+ ((pATI->Chip < ATI_CHIP_264CT) || (pATI->Chip >= ATI_CHIP_264VT) ||
+ pATI->OptionDevel))
+ pATI->Block0Base = 0x000BFC00U;
+ }
- if (!pATI->OptionLinear)
- pATI->LinearBase = 0; /* Not needed */
+ if (!pATI->OptionLinear)
+ pATI->LinearBase = 0; /* Not needed */
#endif /* AVOID_CPIO */
- if (!pATI->LinearBase || !pATI->LinearSize)
- {
+ if (!pATI->LinearBase || !pATI->LinearSize) {
#ifndef AVOID_CPIO
- if (!pATI->IsVGA)
+ if (!pATI->IsVGA)
#endif /* AVOID_CPIO */
- {
- xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
- "Linear aperture not available.\n");
- ATILock(pATI);
- ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
- ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
- return FALSE;
- }
+ {
+ xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
+ "Linear aperture not available.\n");
+ ATILock(pATI);
+ ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
+ ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
+ return FALSE;
+ }
#ifndef AVOID_CPIO
- /* Insurance */
- pATI->LinearBase = pATI->LinearSize = 0;
+ /* Insurance */
+ pATI->LinearBase = pATI->LinearSize = 0;
#endif /* AVOID_CPIO */
- }
+ }
- if (pATI->Block0Base)
- {
- xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
- "Using Block 0 MMIO aperture at 0x%08lX.\n", pATI->Block0Base);
+ if (pATI->Block0Base) {
+ xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
+ "Using Block 0 MMIO aperture at 0x%08lX.\n",
+ pATI->Block0Base);
- /* Set Block1 MMIO address if supported */
- if (pATI->Chip >= ATI_CHIP_264VT)
- {
- pATI->Block1Base = pATI->Block0Base - 0x00000400U;
- xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
- "Using Block 1 MMIO aperture at 0x%08lX.\n",
- pATI->Block1Base);
- }
+ /* Set Block1 MMIO address if supported */
+ if (pATI->Chip >= ATI_CHIP_264VT) {
+ pATI->Block1Base = pATI->Block0Base - 0x00000400U;
+ xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
+ "Using Block 1 MMIO aperture at 0x%08lX.\n",
+ pATI->Block1Base);
}
}
#ifndef AVOID_CPIO
- else
- /*
- * After BIOS initialisation, the accelerator (if any) and the VGA won't
- * necessarily agree on the amount of video memory, depending on whether or
- * where the memory boundary is configured. Any discrepancy will be
- * resolved by ATIModePreInit().
- *
- * However, it's possible that there is more video memory than VGA Wonder
- * can architecturally handle.
- */
- if (AcceleratorVideoRAM < pScreenInfo->videoRam) {
- if (pATI->OptionDevel)
- {
- if (pATI->depth == 1)
- AcceleratorVideoRAM /= 4;
-
- xf86DrvMsg(pScreenInfo->scrnIndex, X_NOTICE,
- "Virtual resolutions requiring more than %d kB\n of video"
- " memory might not function correctly.\n",
- AcceleratorVideoRAM);
- }
- else
- {
- xf86DrvMsg(pScreenInfo->scrnIndex, X_NOTICE,
- "VideoRAM reduced to %d kB due to hardware limitations.\n",
- AcceleratorVideoRAM);
-
- pScreenInfo->videoRam = AcceleratorVideoRAM;
- }
- }
-
if (pATI->OptionLinear)
{
if (!pATI->LinearBase)
@@ -2623,16 +2441,8 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags)
if (pATI->LockData.crtc_gen_cntl & CRTC_EXT_DISP_EN)
pATIHW->crtc = ATI_CRTC_MACH64;
- if (pATI->depth <= 4)
- {
- pATI->BankInfo.nBankDepth = 1;
- pATI->NewHW.nPlane = 4;
- }
- else
- {
- pATI->BankInfo.nBankDepth = pATI->depth;
- pATI->NewHW.nPlane = 1;
- }
+ pATI->BankInfo.nBankDepth = pATI->depth;
+ pATI->NewHW.nPlane = 1;
if ((pATIHW->crtc != ATI_CRTC_VGA) || (GetReg(SEQX, 0x04U) & 0x08U))
pATIHW->nPlane = 1;
@@ -2679,12 +2489,6 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags)
"Cannot shadow a banked frame buffer.\n");
pATI->OptionShadowFB = FALSE;
}
- else if (pATI->depth < 8)
- {
- xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
- "Cannot shadow a planar frame buffer.\n");
- pATI->OptionShadowFB = FALSE;
- }
else
#endif /* AVOID_CPIO */
@@ -2750,15 +2554,7 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags)
Denominator = pATI->ClockDescriptor.MinM *
pATI->XCLKReferenceDivider * pATI->ReferenceDenominator;
-#ifndef AVOID_CPIO
-
- if (pATI->depth >= 8)
-
-#endif /* AVOID_CPIO */
-
- {
- Denominator *= pATI->bitsPerPixel / 4;
- }
+ Denominator *= pATI->bitsPerPixel / 4;
i = (6 - 2) - pATI->XCLKPostDivider;
@@ -2863,12 +2659,9 @@ 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->CPIO_VGAWonder && (pATI->VideoRAM < 1024) &&
- (pATI->depth >= 8))
- {
+ if (pATI->CPIO_VGAWonder && (pATI->VideoRAM < 1024))
DefaultmaxClock =
(GetBits(BIOSByte(0x44U), 0x04U) * 5000) + 40000;
- }
else
#endif /* AVOID_CPIO */
@@ -2904,38 +2697,14 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags)
* Mode validation.
*/
-#ifdef AVOID_CPIO
-
if (pATI->Chip >= ATI_CHIP_264CT)
- {
minPitch = 8;
- }
-
-#else /* AVOID_CPIO */
-
- if ((pATI->depth >= 8) && (pATI->Chip >= ATI_CHIP_264CT))
- {
- minPitch = 8;
- }
-
-#endif /* AVOID_CPIO */
-
else
- {
minPitch = 16;
- }
pATI->pitchInc = minPitch;
-#ifndef AVOID_CPIO
-
- if (pATI->depth >= 8)
-
-#endif /* AVOID_CPIO */
-
- {
- pATI->pitchInc *= pATI->bitsPerPixel;
- }
+ pATI->pitchInc *= pATI->bitsPerPixel;
switch (pATI->NewHW.crtc)
{
diff --git a/src/atiscreen.c b/src/atiscreen.c
index effeb66..f4b397c 100644
--- a/src/atiscreen.c
+++ b/src/atiscreen.c
@@ -60,9 +60,6 @@
#include "shadowfb.h"
#include "xf86cmap.h"
-#include "xf1bpp.h"
-#include "xf4bpp.h"
-
#include "fb.h"
#include "mibank.h"
@@ -228,25 +225,7 @@ ATIScreenInit
#endif /* XF86DRI_DEVEL */
/* Initialise framebuffer layer */
- switch (pATI->bitsPerPixel)
- {
-
-#ifndef AVOID_CPIO
-
- case 1:
- pATI->Closeable = xf1bppScreenInit(pScreen, pFB,
- pScreenInfo->virtualX, pScreenInfo->virtualY,
- pScreenInfo->xDpi, pScreenInfo->yDpi, pATI->displayWidth);
- break;
-
- case 4:
- pATI->Closeable = xf4bppScreenInit(pScreen, pFB,
- pScreenInfo->virtualX, pScreenInfo->virtualY,
- pScreenInfo->xDpi, pScreenInfo->yDpi, pATI->displayWidth);
- break;
-
-#endif /* AVOID_CPIO */
-
+ switch (pATI->bitsPerPixel) {
case 8:
case 16:
case 24:
@@ -285,34 +264,28 @@ ATIScreenInit
}
/* If applicable, initialise RENDER extension */
- if (pATI->bitsPerPixel > 4)
- {
- if (pATI->OptionShadowFB)
- {
- if (serverGeneration == 1)
- xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
- "RENDER extension not supported with a shadowed"
- " framebuffer.\n");
- }
+ if (pATI->OptionShadowFB) {
+ if (serverGeneration == 1)
+ xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
+ "RENDER extension not supported with a shadowed"
+ " framebuffer.\n");
+ }
#ifndef AVOID_CPIO
- else if (pATI->BankInfo.BankSize)
- {
- if (serverGeneration == 1)
- xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
- "RENDER extension not supported with a banked"
- " framebuffer.\n");
- }
+ else if (pATI->BankInfo.BankSize) {
+ if (serverGeneration == 1)
+ xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
+ "RENDER extension not supported with a banked"
+ " framebuffer.\n");
+ }
#endif /* AVOID_CPIO */
- else if (!fbPictureInit(pScreen, NULL, 0) &&
- (serverGeneration == 1))
- {
- xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
- "RENDER extension initialisation failed.\n");
- }
+ else if (!fbPictureInit(pScreen, NULL, 0) &&
+ (serverGeneration == 1)) {
+ xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
+ "RENDER extension initialisation failed.\n");
}
xf86SetBlackWhitePixels(pScreen);
@@ -535,11 +508,9 @@ ATIScreenInit
#else /* AVOID_CPIO */
- if (pATI->depth > 1)
- if (!xf86HandleColormaps(pScreen, (pATI->depth == 4) ? 16 : 256,
- pATI->rgbBits, ATILoadPalette, NULL,
- CMAP_PALETTED_TRUECOLOR |
- CMAP_LOAD_EVEN_IF_OFFSCREEN))
+ if (!xf86HandleColormaps(pScreen, 256, pATI->rgbBits, ATILoadPalette, NULL,
+ CMAP_PALETTED_TRUECOLOR |
+ CMAP_LOAD_EVEN_IF_OFFSCREEN))
return FALSE;
#endif /* AVOID_CPIO */
diff --git a/src/ativga.c b/src/ativga.c
index cd0824c..aca08f4 100644
--- a/src/ativga.c
+++ b/src/ativga.c
@@ -57,17 +57,11 @@ ATIVGAPreInit
/* Initialise sequencer register values */
pATIHW->seq[0] = 0x03U;
- if (pATI->depth == 1)
- pATIHW->seq[2] = 0x01U << BIT_PLANE;
- else
- pATIHW->seq[2] = 0x0FU;
- if (pATI->depth <= 4)
- pATIHW->seq[4] = 0x06U;
- else
- pATIHW->seq[4] = 0x0AU;
+ pATIHW->seq[2] = 0x0FU;
+ pATIHW->seq[4] = 0x0AU;
/* Initialise CRTC register values */
- if ((pATI->depth >= 8) && (pATI->Chip >= ATI_CHIP_264CT))
+ if (pATI->Chip >= ATI_CHIP_264CT)
pATIHW->crt[19] = pATI->displayWidth >> 3;
else
pATIHW->crt[19] = pATI->displayWidth >> 4;
@@ -76,36 +70,14 @@ ATIVGAPreInit
pATIHW->crt[24] = 0xFFU;
/* Initialise attribute controller register values */
- if (pATI->depth == 1)
- {
- Bool FlipPixels = xf86GetFlipPixels();
-
- for (Index = 0; Index < 16; Index++)
- if (((Index & (0x01U << BIT_PLANE)) != 0) != FlipPixels)
- pATIHW->attr[Index] = MONO_WHITE;
- else
- pATIHW->attr[Index] = MONO_BLACK;
- pATIHW->attr[16] = 0x01U;
- pATIHW->attr[17] = MONO_OVERSCAN;
- }
- else
- {
- for (Index = 0; Index < 16; Index++)
- pATIHW->attr[Index] = Index;
- if (pATI->depth <= 4)
- pATIHW->attr[16] = 0x81U;
- else
- pATIHW->attr[16] = 0x01U;
- pATIHW->attr[17] = 0xFFU;
- }
+ for (Index = 0; Index < 16; Index++)
+ pATIHW->attr[Index] = Index;
+ pATIHW->attr[16] = 0x01U;
+ pATIHW->attr[17] = 0xFFU;
pATIHW->attr[18] = 0x0FU;
/* Initialise graphics controller register values */
- if (pATI->depth == 1)
- pATIHW->gra[4] = BIT_PLANE;
- else if (pATI->depth <= 4)
- pATIHW->gra[5] = 0x02U;
- else if (pATI->Chip >= ATI_CHIP_264CT)
+ if (pATI->Chip >= ATI_CHIP_264CT)
pATIHW->gra[5] = 0x40U;
if (pATI->UseSmallApertures && (pATI->Chip >= ATI_CHIP_264CT) &&
((pATI->Chip >= ATI_CHIP_264VT) || !pATI->LinearBase))
diff --git a/src/atiwonder.c b/src/atiwonder.c
index 2aa7898..3ad9a22 100644
--- a/src/atiwonder.c
+++ b/src/atiwonder.c
@@ -75,10 +75,7 @@ ATIVGAWonderPreInit
)
{
pATIHW->b3 = ATIGetExtReg(0xB3U) & 0x20U;
- if (pATI->depth <= 4)
- pATIHW->b6 = 0x40U;
- else
- pATIHW->b6 = 0x04U;
+ pATIHW->b6 = 0x04U;
if (pATI->VideoRAM > 256)
pATIHW->b6 |= 0x01U;
@@ -142,9 +139,7 @@ ATIVGAWonderCalculate
/*
* Fill in mode-specific VGA Wonder data.
*/
- pATIHW->b0 = 0x00U;
- if (pATI->depth >= 8)
- pATIHW->b0 = 0x20U;
+ pATIHW->b0 = 0x20U;
if (pATI->VideoRAM > 512)
pATIHW->b0 |= 0x08U;