diff options
author | Luc Verhaegen <libv@skynet.be> | 2006-02-08 16:52:34 +0000 |
---|---|---|
committer | Luc Verhaegen <libv@skynet.be> | 2006-02-08 16:52:34 +0000 |
commit | c394f38c9a998eebec134a9a77ced46b9c005b9d (patch) | |
tree | 989edb7bff069590251e05e9d3c5dc45b6038130 | |
parent | 2453cfe259dec826fceab3cff1b2c3803d3d8042 (diff) |
SiliconMotion: Clean up insane pScrn->clock usage.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/smi.h | 3 | ||||
-rw-r--r-- | src/smi_driver.c | 49 |
3 files changed, 18 insertions, 41 deletions
@@ -1,3 +1,10 @@ +2006-02-08 Luc Verhaegen <libv@skynet.be> + + * src/smi.h: + * src/smi_driver.c: (SMI_PreInit), (SMI_ModeInit): + + Clean up insane pScrn->clock usage. + 2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org> * configure.ac: @@ -151,9 +151,6 @@ typedef struct vgaHWMapMem was used successfully for this screen */ - int dacSpeedBpp; /* Clock value */ - int minClock; /* Mimimum clock */ - int maxClock; /* Maximum clock */ int MCLK; /* Memory Clock */ int GEResetCnt; /* Limit the number of errors printed using a counter */ diff --git a/src/smi_driver.c b/src/smi_driver.c index 169a736..8284207 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -1066,40 +1066,6 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags) pSmi->videoRAMKBytes); } - /* Lynx built-in ramdac speeds */ - pScrn->numClocks = 4; - - if ((pScrn->clock[3] <= 0) && (pScrn->clock[2] > 0)) - { - pScrn->clock[3] = pScrn->clock[2]; - } - - if ((pSmi->Chipset == SMI_LYNX3DM) || (pSmi->Chipset == SMI_COUGAR3DR)) - { - if (pScrn->clock[0] <= 0) pScrn->clock[0] = 200000; - if (pScrn->clock[1] <= 0) pScrn->clock[1] = 200000; - if (pScrn->clock[2] <= 0) pScrn->clock[2] = 200000; - if (pScrn->clock[3] <= 0) pScrn->clock[3] = 200000; - } - else - { - if (pScrn->clock[0] <= 0) pScrn->clock[0] = 135000; - if (pScrn->clock[1] <= 0) pScrn->clock[1] = 135000; - if (pScrn->clock[2] <= 0) pScrn->clock[2] = 135000; - if (pScrn->clock[3] <= 0) pScrn->clock[3] = 135000; - } - - /* Now set RAMDAC limits */ - switch (pSmi->Chipset) - { - default: - pSmi->minClock = 20000; - pSmi->maxClock = 135000; - break; - } - xf86ErrorFVerb(VERBLEV, "\tSMI_PreInit minClock=%d, maxClock=%d\n", - pSmi->minClock, pSmi->maxClock); - /* Detect current MCLK and print it for user */ m = VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x6A); n = VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x6B); @@ -1133,8 +1099,13 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags) */ clockRanges = xnfcalloc(sizeof(ClockRange),1); clockRanges->next = NULL; - clockRanges->minClock = pSmi->minClock; - clockRanges->maxClock = pSmi->maxClock; + clockRanges->minClock = 20000; + + if ((pSmi->Chipset == SMI_LYNX3DM) || (pSmi->Chipset == SMI_COUGAR3DR)) + clockRanges->maxClock = 200000; + else + clockRanges->maxClock = 135000; + clockRanges->clockIndex = -1; clockRanges->interlaceAllowed = FALSE; clockRanges->doubleScanAllowed = FALSE; @@ -2641,8 +2612,10 @@ SMI_ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) if (pSmi->MCLK > 0) { SMI_CommonCalcClock(pScrn->scrnIndex, pSmi->MCLK, - 1, 1, 31, 0, 2, pSmi->minClock, - pSmi->maxClock, &new->SR6A, &new->SR6B); + 1, 1, 31, 0, 2, + pScrn->clockRanges->minClock, + pScrn->clockRanges->maxClock, + &new->SR6A, &new->SR6B); } else { |