summaryrefslogtreecommitdiff
path: root/src/atipreinit.c
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsap7@yahoo.gr>2006-11-20 22:08:49 +0200
committerGeorge Sapountzis <gsap7@yahoo.gr>2007-01-28 01:24:21 +0200
commit0b31333c9147af21c50493872779da12a3668e5d (patch)
tree598a3cb4ccc99b0d19e3c85210af659702582d6f /src/atipreinit.c
parentc9a9ea5ebd1c27881c1fac19842cfa3af55c126e (diff)
Drop support for non-programmable clocks.
From README.ati: Clocks for supported programmable clock generators: The driver currently supports all programmable clock generators known to exist on Mach64 adapters. Clocks for unsupported programmable clock generators: This case is unlikely to occur, but is documented for the sake of completeness. Thus: - check for (pATI->ProgrammableClock > ATI_CLOCK_FIXED) && (pATI->ProgrammableClock < ATI_CLOCK_MAX) - drop "probe_clocks" option - pATIHW->ClockUnmap is no longer used - pATIHW->ClockMap is only used with NewHW.crtc which is always ATI_CRTC_MACH64 and has the identity map, so drop it - (pATI->ProgrammableClock != ATI_CLOCK_INTERNAL) => (pATI->depth <= 8)
Diffstat (limited to 'src/atipreinit.c')
-rw-r--r--src/atipreinit.c37
1 files changed, 13 insertions, 24 deletions
diff --git a/src/atipreinit.c b/src/atipreinit.c
index 9b48eb0..b525918 100644
--- a/src/atipreinit.c
+++ b/src/atipreinit.c
@@ -165,7 +165,7 @@ ATIPreInit
int i, j;
int Numerator, Denominator;
int MinX, MinY;
- ClockRange ATIClockRange = {NULL, 0, 80000, 0, TRUE, TRUE, 1, 1, 0};
+ ClockRange ATIClockRange = {NULL, 0, 80000, -1, TRUE, TRUE, 1, 1, 0};
int DefaultmaxClock = 0;
int minPitch, maxPitch = 0xFFU, maxHeight = 0;
int ApertureSize = 0x00010000U;
@@ -704,16 +704,6 @@ ATIPreInit
if (ClockTable > 0)
{
- FrequencyTable = BIOSWord(ClockTable - 0x02U);
- if ((FrequencyTable > 0) &&
- ((FrequencyTable + 0x20U) <= BIOSSize))
- {
- for (i = 0; i < 16; i++)
- {
- pATI->BIOSClocks[i] = BIOSWord(FrequencyTable);
- FrequencyTable += 2;
- }
- }
pATI->ProgrammableClock = BIOSByte(ClockTable);
pATI->ClockNumberToProgramme = BIOSByte(ClockTable + 0x06U);
switch (BIOSWord(ClockTable + 0x08U) / 10)
@@ -2171,8 +2161,6 @@ ATIPreInit
*/
if (pATI->ProgrammableClock == ATI_CLOCK_INTERNAL)
Numerator <<= 1;
- else if (pATI->depth > 8)
- Denominator *= (pATI->bitsPerPixel / 8);
ATIClockRange.maxClock = (Numerator / (Denominator * 1000)) * 1000;
@@ -2299,21 +2287,22 @@ ATIPreInit
ATIClockRange.maxClock = DefaultmaxClock;
}
- if (pATI->ClockDescriptor.MaxN <= 0)
- {
- ATIClockRange.maxClock = DefaultmaxClock;
- xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
- "Maximum pixel clock: %.3f MHz.\n",
- (double)ATIClockRange.maxClock / 1000.0);
- }
-
/*
* Determine available pixel clock frequencies.
*/
- ATIClockPreInit(pScreenInfo, pATI, pGDev, &ATIClockRange);
- if (pATI->ProgrammableClock > ATI_CLOCK_FIXED)
- Strategy = LOOKUP_BEST_REFRESH;
+ if ((pATI->ProgrammableClock <= ATI_CLOCK_FIXED) ||
+ (pATI->ProgrammableClock >= ATI_CLOCK_MAX))
+ {
+ xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
+ "Unsupported or non-programmable clock generator.\n");
+ ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
+ ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
+ return FALSE;
+ }
+
+ ATIClockPreInit(pScreenInfo, pATI);
+ Strategy = LOOKUP_BEST_REFRESH;
/*
* Mode validation.