|
Lines 802-808
Link Here
|
| 802 |
xf86CollectOptions(pScrn, NULL); |
802 |
xf86CollectOptions(pScrn, NULL); |
| 803 |
|
803 |
|
| 804 |
if (pScrn->depth == 8) |
804 |
if (pScrn->depth == 8) |
| 805 |
pScrn->rgbBits = 8/*6*/; |
805 |
pScrn->rgbBits = 8; |
| 806 |
|
806 |
|
| 807 |
if (!(psav->Options = xalloc(sizeof(SavageOptions)))) |
807 |
if (!(psav->Options = xalloc(sizeof(SavageOptions)))) |
| 808 |
return FALSE; |
808 |
return FALSE; |
|
Lines 1804-1817
Link Here
|
| 1804 |
VGAOUT8(vgaCRIndex, 0x67); |
1804 |
VGAOUT8(vgaCRIndex, 0x67); |
| 1805 |
VGAOUT8(vgaCRReg, restore->CR67); |
1805 |
VGAOUT8(vgaCRReg, restore->CR67); |
| 1806 |
|
1806 |
|
| 1807 |
/* Enable gamma correction. */ |
1807 |
/* Enable gamma correction, set CLUT to 8 bit */ |
| 1808 |
|
1808 |
|
| 1809 |
VGAOUT8(0x3c4, 0x1b); |
1809 |
VGAOUT8(0x3c4, 0x1b); |
| 1810 |
if( (pScrn->bitsPerPixel == 32) && !psav->DGAactive |
1810 |
if( (pScrn->bitsPerPixel == 32) && !psav->DGAactive |
| 1811 |
&& ! psav->FBStart2nd ) |
1811 |
&& ! psav->FBStart2nd ) |
| 1812 |
VGAOUT8(0x3c5, 0x28 ); |
1812 |
VGAOUT8(0x3c5, 0x18 ); |
| 1813 |
else |
1813 |
else |
| 1814 |
VGAOUT8(0x3c5, 0x00 ); |
1814 |
VGAOUT8(0x3c5, 0x10 ); |
| 1815 |
|
1815 |
|
| 1816 |
/* We may need TV/panel fixups here. See s3bios.c line 2904. */ |
1816 |
/* We may need TV/panel fixups here. See s3bios.c line 2904. */ |
| 1817 |
|
1817 |
|
|
Lines 2100-2106
Link Here
|
| 2100 |
VGAOUT8(0x3c5, restore->SR18); |
2100 |
VGAOUT8(0x3c5, restore->SR18); |
| 2101 |
VGAOUT8(0x3c4, 0x1b); |
2101 |
VGAOUT8(0x3c4, 0x1b); |
| 2102 |
if( psav->DGAactive ) |
2102 |
if( psav->DGAactive ) |
| 2103 |
VGAOUT8(0x3c5, restore->SR1B & ~0x28); |
2103 |
VGAOUT8(0x3c5, restore->SR1B & ~0x08); |
| 2104 |
else |
2104 |
else |
| 2105 |
VGAOUT8(0x3c5, restore->SR1B); |
2105 |
VGAOUT8(0x3c5, restore->SR1B); |
| 2106 |
|
2106 |
|
|
Lines 2642-2648
Link Here
|
| 2642 |
|
2642 |
|
| 2643 |
TRACE(("SavageModeInit(%dx%d, %dHz)\n", |
2643 |
TRACE(("SavageModeInit(%dx%d, %dHz)\n", |
| 2644 |
mode->HDisplay, mode->VDisplay, mode->Clock)); |
2644 |
mode->HDisplay, mode->VDisplay, mode->Clock)); |
| 2645 |
|
2645 |
|
| 2646 |
#if 0 |
2646 |
#if 0 |
| 2647 |
ErrorF("Clock = %d, HDisplay = %d, HSStart = %d\n", |
2647 |
ErrorF("Clock = %d, HDisplay = %d, HSStart = %d\n", |
| 2648 |
mode->Clock, mode->HDisplay, mode->HSyncStart); |
2648 |
mode->Clock, mode->HDisplay, mode->HSyncStart); |
|
Lines 2801-2817
Link Here
|
| 2801 |
new->SR15 = 0x03 | 0x80; |
2801 |
new->SR15 = 0x03 | 0x80; |
| 2802 |
new->SR18 = 0x00; |
2802 |
new->SR18 = 0x00; |
| 2803 |
|
2803 |
|
| 2804 |
/* VGAOUT8(0x3c4, 0x1b); |
|
|
| 2805 |
new->SR1B = VGAIN8(0x3c5); |
| 2806 |
if( pScrn->depth == 24 ) |
| 2807 |
new->SR1B |= 0x28; |
| 2808 |
*/ |
| 2809 |
if( pScrn->depth == 24 ) |
2804 |
if( pScrn->depth == 24 ) |
| 2810 |
new->SR1B = 0x28; |
2805 |
new->SR1B = 0x28; |
| 2811 |
else |
2806 |
else |
| 2812 |
new->SR1B = 0x00; |
2807 |
new->SR1B = 0x00; |
| 2813 |
|
2808 |
|
| 2814 |
|
2809 |
/* set 8-bit CLUT */ |
|
|
2810 |
new->SR1B |= 0x10; |
| 2811 |
|
| 2815 |
new->CR43 = new->CR45 = new->CR65 = 0x00; |
2812 |
new->CR43 = new->CR45 = new->CR65 = 0x00; |
| 2816 |
|
2813 |
|
| 2817 |
VGAOUT8(vgaCRIndex, 0x40); |
2814 |
VGAOUT8(vgaCRIndex, 0x40); |
|
Lines 2882-2888
Link Here
|
| 2882 |
|
2879 |
|
| 2883 |
new->CR3B = j & 0xff; |
2880 |
new->CR3B = j & 0xff; |
| 2884 |
i |= (j & 0x100) >> 2; |
2881 |
i |= (j & 0x100) >> 2; |
| 2885 |
new->CR3C = (vganew->CRTC[0] + ((i & 0x01) << 8)) / 2; |
2882 |
new->CR3C = (vganew->CRTC[0] + ((i & 0x01) << 8)) / 2 ; |
| 2886 |
new->CR5D = i; |
2883 |
new->CR5D = i; |
| 2887 |
new->CR5E = (((mode->CrtcVTotal - 2) & 0x400) >> 10) | |
2884 |
new->CR5E = (((mode->CrtcVTotal - 2) & 0x400) >> 10) | |
| 2888 |
(((mode->CrtcVDisplay - 1) & 0x400) >> 9) | |
2885 |
(((mode->CrtcVDisplay - 1) & 0x400) >> 9) | |
|
Lines 3159-3165
Link Here
|
| 3159 |
int i, index; |
3156 |
int i, index; |
| 3160 |
int updateKey = -1; |
3157 |
int updateKey = -1; |
| 3161 |
|
3158 |
|
| 3162 |
vgaHWPtr hwp = VGAHWPTR(pScrn); |
|
|
| 3163 |
VerticalRetraceWait(psav); |
3159 |
VerticalRetraceWait(psav); |
| 3164 |
|
3160 |
|
| 3165 |
for (i=0; i<numColors; i++) { |
3161 |
for (i=0; i<numColors; i++) { |
|
Lines 3443-3449
Link Here
|
| 3443 |
SavageProbeDDC(ScrnInfoPtr pScrn, int index) |
3439 |
SavageProbeDDC(ScrnInfoPtr pScrn, int index) |
| 3444 |
{ |
3440 |
{ |
| 3445 |
vbeInfoPtr pVbe; |
3441 |
vbeInfoPtr pVbe; |
|
|
3442 |
|
| 3446 |
if (xf86LoadSubModule(pScrn, "vbe")) { |
3443 |
if (xf86LoadSubModule(pScrn, "vbe")) { |
|
|
3444 |
xf86LoaderReqSymLists(vbeSymbols, NULL); |
| 3447 |
pVbe = VBEInit(NULL,index); |
3445 |
pVbe = VBEInit(NULL,index); |
| 3448 |
ConfiguredMonitor = vbeDoEDID(pVbe, NULL); |
3446 |
ConfiguredMonitor = vbeDoEDID(pVbe, NULL); |
| 3449 |
vbeFree(pVbe); |
3447 |
vbeFree(pVbe); |