diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/savage_dri.c | 6 | ||||
-rw-r--r-- | src/savage_driver.c | 29 | ||||
-rw-r--r-- | src/savage_driver.h | 3 |
4 files changed, 22 insertions, 25 deletions
@@ -1,3 +1,12 @@ +2006-02-08 Luc Verhaegen <libv@skynet.be> + + * src/savage_dri.c: (SAVAGEDRIScreenInit): + * src/savage_driver.c: (SavagePreInit): + * src/savage_driver.h: + + - Remove insane usage of pScrn->clocks. Set maxClock directly. + - Fix trivial and harmless warning in DRI code (FrameBufferBase) + 2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org> * configure.ac: diff --git a/src/savage_dri.c b/src/savage_dri.c index fd2567f..e0099fa 100644 --- a/src/savage_dri.c +++ b/src/savage_dri.c @@ -882,7 +882,13 @@ Bool SAVAGEDRIScreenInit( ScreenPtr pScreen ) pDRIInfo->ddxDriverMajorVersion = SAVAGE_VERSION_MAJOR; pDRIInfo->ddxDriverMinorVersion = SAVAGE_VERSION_MINOR; pDRIInfo->ddxDriverPatchVersion = SAVAGE_PATCHLEVEL; + +#if DRIINFO_MAJOR_VERSION < 5 pDRIInfo->frameBufferPhysicalAddress = psav->FrameBufferBase; +#else + pDRIInfo->frameBufferPhysicalAddress = (pointer) psav->FrameBufferBase; +#endif + pDRIInfo->frameBufferSize = psav->videoRambytes; pDRIInfo->frameBufferStride = pScrn->displayWidth*(pScrn->bitsPerPixel/8); pDRIInfo->ddxDrawableTableEntry = SAVAGE_MAX_DRAWABLES; diff --git a/src/savage_driver.c b/src/savage_driver.c index 3ff6aae..019e879 100644 --- a/src/savage_driver.c +++ b/src/savage_driver.c @@ -1841,26 +1841,11 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags) /* Do the DDC dance. */ SavageDoDDC(pScrn); - /* Savage ramdac speeds */ - pScrn->numClocks = 4; - pScrn->clock[0] = 250000; - pScrn->clock[1] = 250000; - pScrn->clock[2] = 220000; - pScrn->clock[3] = 220000; - - if (psav->dacSpeedBpp <= 0) { - if (pScrn->bitsPerPixel > 24) - psav->dacSpeedBpp = pScrn->clock[3]; - else if (pScrn->bitsPerPixel >= 24) - psav->dacSpeedBpp = pScrn->clock[2]; - else if ((pScrn->bitsPerPixel > 8) && (pScrn->bitsPerPixel < 24)) - psav->dacSpeedBpp = pScrn->clock[1]; - else if (pScrn->bitsPerPixel <= 8) - psav->dacSpeedBpp = pScrn->clock[0]; - } - - /* Set ramdac limits */ - psav->maxClock = psav->dacSpeedBpp; + /* set up ramdac max clock - might be altered by SavageGetPanelInfo */ + if (pScrn->bitsPerPixel >= 24) + psav->maxClock = 220000; + else + psav->maxClock = 250000; /* detect current mclk */ VGAOUT8(0x3c4, 0x08); @@ -1879,8 +1864,6 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags) xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Detected current MCLK value of %1.3f MHz\n", mclk / 1000.0); - psav->minClock = 10000; - pScrn->maxHValue = 2048 << 3; /* 11 bits of h_total 8-pixel units */ pScrn->maxVValue = 2048; /* 11 bits of v_total */ pScrn->virtualX = pScrn->display->virtualX; @@ -1949,7 +1932,7 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags) clockRanges = xnfalloc(sizeof(ClockRange)); clockRanges->next = NULL; - clockRanges->minClock = psav->minClock; + clockRanges->minClock = 10000; clockRanges->maxClock = psav->maxClock; clockRanges->clockIndex = -1; clockRanges->interlaceAllowed = TRUE; diff --git a/src/savage_driver.h b/src/savage_driver.h index 086b2ce..ca60dcb 100644 --- a/src/savage_driver.h +++ b/src/savage_driver.h @@ -272,8 +272,7 @@ typedef struct _Savage { CARD32 volatile * ShadowVirtual; Bool PrimaryVidMapped; - int dacSpeedBpp; - int minClock, maxClock; + int maxClock; int HorizScaleFactor; int MCLK, REFCLK, LCDclk; double refclk_fact; |