diff options
author | Alex Deucher <agd5f@yahoo.com> | 2005-02-02 04:58:27 +0000 |
---|---|---|
committer | Alex Deucher <agd5f@yahoo.com> | 2005-02-02 04:58:27 +0000 |
commit | 367d124c4b49ac134a9f2bf8acb6711957ef21c6 (patch) | |
tree | 467867ce0b4e03bb0127f1d8bd5737553a131933 /src | |
parent | dbd65625f1eb3dbb5c45e1fc41e385db45c973ed (diff) |
- fix long standing bug in depth 24 that made colors look dithered. The
CLUT was not being switched to 8 bit mode.
Diffstat (limited to 'src')
-rw-r--r-- | src/savage_driver.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/savage_driver.c b/src/savage_driver.c index 839377c..7ed25e6 100644 --- a/src/savage_driver.c +++ b/src/savage_driver.c @@ -2341,7 +2341,7 @@ static void SavageWriteMode(ScrnInfoPtr pScrn, vgaRegPtr vgaSavePtr, VGAOUT8(0x3c4, 0x1b); if( (pScrn->bitsPerPixel == 32) && !psav->DGAactive && ! psav->FBStart2nd ) - VGAOUT8(0x3c5, 0x28 ); + VGAOUT8(0x3c5, 0x18 ); else VGAOUT8(0x3c5, 0x00 ); @@ -2642,7 +2642,7 @@ static void SavageWriteMode(ScrnInfoPtr pScrn, vgaRegPtr vgaSavePtr, VGAOUT8(0x3c5, restore->SR18); VGAOUT8(0x3c4, 0x1b); if( psav->DGAactive ) - VGAOUT8(0x3c5, restore->SR1B & ~0x28); + VGAOUT8(0x3c5, restore->SR1B & ~0x18); else VGAOUT8(0x3c5, restore->SR1B); @@ -3153,11 +3153,11 @@ static Bool SavageScreenInit(int scrnIndex, ScreenPtr pScreen, | ((psav->FBStart2nd) ? 0 : CMAP_PALETTED_TRUECOLOR); if (psav->Chipset == S3_SAVAGE4) { - if (!xf86HandleColormaps(pScreen, 256, 6, SavageLoadPaletteSavage4, + if (!xf86HandleColormaps(pScreen, 256, pScrn->rgbBits, SavageLoadPaletteSavage4, NULL, colormapFlags )) return FALSE; } else { - if (!xf86HandleColormaps(pScreen, 256, 6, SavageLoadPalette, NULL, + if (!xf86HandleColormaps(pScreen, 256, pScrn->rgbBits, SavageLoadPalette, NULL, colormapFlags )) return FALSE; } @@ -3501,8 +3501,10 @@ static Bool SavageModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) if( pScrn->depth == 24 ) new->SR1B |= 0x28; */ + + /* enable gamma correction */ if( pScrn->depth == 24 ) - new->SR1B = 0x28; + new->SR1B = 0x18; else new->SR1B = 0x00; |