summaryrefslogtreecommitdiff
path: root/src/atiwonder.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/atiwonder.c')
-rw-r--r--src/atiwonder.c132
1 files changed, 0 insertions, 132 deletions
diff --git a/src/atiwonder.c b/src/atiwonder.c
index e6a4ec2..6822872 100644
--- a/src/atiwonder.c
+++ b/src/atiwonder.c
@@ -132,138 +132,6 @@ ATIVGAWonderSave
}
/*
- * ATIVGAWonderCalculate --
- *
- * This function fills in the VGA Wonder portion of an ATIHWRec structure
- * occurrence.
- */
-void
-ATIVGAWonderCalculate
-(
- ATIPtr pATI,
- ATIHWPtr pATIHW,
- DisplayModePtr pMode
-)
-{
- /* Set up the default horizontal display enable skew */
- if ((pATI->Chip >= ATI_CHIP_28800_2) && (pATI->Chip <= ATI_CHIP_28800_6) &&
- !(pMode->Flags & V_HSKEW))
- {
- /*
- * Modes using the higher clock frequencies need a non-zero Display
- * Enable Skew. The following number has been empirically determined
- * to be somewhere between 4.2 and 4.7 MHz.
- */
-# define DisplayEnableSkewThreshold 4500
-
- /* Set a reasonable default Display Enable Skew */
- pMode->HSkew = pMode->CrtcHSkew =
- ATIDivide(pMode->SynthClock, DisplayEnableSkewThreshold, 0, 0);
- }
- pMode->Flags |= V_HSKEW;
-
- /*
- * Fill in mode-specific VGA Wonder data.
- */
- pATIHW->b0 = 0x00U;
- if (pATI->depth >= 8)
- pATIHW->b0 = 0x20U;
- if (pATI->Chip >= ATI_CHIP_28800_2)
- {
- if (pATI->VideoRAM > 512)
- pATIHW->b0 |= 0x08U;
- else if (pATI->VideoRAM > 256)
- pATIHW->b0 |= 0x10U;
- }
- else if (pATI->depth <= 4)
- {
- if (pATI->VideoRAM > 256)
- pATIHW->b0 |= 0x08U;
- }
- else
- {
- if (pATI->VideoRAM > 256)
- pATIHW->b0 |= 0x18U;
- else
- pATIHW->b0 |= 0x06U;
- }
- pATIHW->b1 = ATIGetExtReg(0xB1U) & 0x04U;
- /*
- * Setting the following bit causes hangs on return to text mode from
- * packed modes on 18800-1's. The hang occurs because the adapter's I/O
- * response is completely disabled when the register is rewritten. The
- * adapter can then only be re-enabled with a powerdown. The bit, when on,
- * blanks out the overscan.
- */
- if ((pATI->Chip == ATI_CHIP_18800_1) && (pATI->depth >= 8))
- pATIHW->b5 = 0x00U;
- else
- pATIHW->b5 = 0x01U;
- pATIHW->b8 = ATIGetExtReg(0xB8U) & 0xC0U;
- pATIHW->b9 = ATIGetExtReg(0xB9U) & 0x7FU;
- pATIHW->bd = ATIGetExtReg(0xBDU) & 0x02U;
- if (pATI->Chip <= ATI_CHIP_18800)
- pATIHW->b2 = ATIGetExtReg(0xB2U) & 0xC0U;
- else
- {
- pATIHW->b2 = 0x00U;
- pATIHW->be = (ATIGetExtReg(0xBEU) & 0x30U) | 0x09U;
- if (pATI->Chip >= ATI_CHIP_28800_2)
- {
- pATIHW->a6 = (ATIGetExtReg(0xA6U) & 0x38U) | 0x04U;
- pATIHW->a7 = (ATIGetExtReg(0xA7U) & 0xBEU) ;
- pATIHW->ac = (ATIGetExtReg(0xACU) & 0x8EU) ;
- }
- }
- if (pMode->Flags & V_INTERLACE)
- { /* Enable interlace */
- if (pATI->Chip <= ATI_CHIP_18800)
- pATIHW->b2 |= 0x01U;
- else
- pATIHW->be |= 0x02U;
- }
-#if 0 /* This is no longer needed but is left in for reference */
- if (pMode->Flags & V_DBLSCAN) /* Enable doublescan */
- pATIHW->b1 |= 0x08U;
-#endif
- if (pATI->OptionCSync || (pMode->Flags & (V_CSYNC | V_PCSYNC)))
- pATIHW->bd |= 0x08U; /* Enable composite sync */
- if (pMode->Flags & V_NCSYNC)
- pATIHW->bd |= 0x09U; /* Invert composite sync */
- if (pMode->HSkew > 0)
- {
- if (pMode->HSkew <= 3)
- pATIHW->b5 |= 0x04U;
- else if (pATI->Chip >= ATI_CHIP_28800_2)
- switch ((pMode->HSkew + 4) >> 3)
- {
- case 1: /* Use ATI override */
- pATIHW->crt[3] &= ~0x60U;
- pATIHW->b0 |= 0x01U;
- break;
- case 2: /* Use ATI override */
- pATIHW->crt[3] &= ~0x60U;
- pATIHW->a6 |= 0x01U;
- break;
- case 3:
- pATIHW->crt[3] |= 0x60U;
- break;
- case 4:
- pATIHW->a7 |= 0x40U;
- break;
- case 5:
- pATIHW->ac |= 0x10U;
- break;
- case 6:
- pATIHW->ac |= 0x20U;
- break;
- default:
- break;
- }
- }
-}
-
-/*
* ATIVGAWonderSet --
*
* This function loads the VGA Wonder portion of a video state.