Commit bb4fede8 authored by Luc Verhaegen's avatar Luc Verhaegen

Some trivial savage fixes:

- Remove insane usage of pScrn->clocks. Set maxClock directly.
- Fix trivial and harmless warning in DRI code (FrameBufferBase)
parent 90fb73bc
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:
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment