diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:28:37 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:28:37 +0000 |
commit | bf37df17ecf040836ad8924a9174787d0f57ed5a (patch) | |
tree | 20ba7f7206ed6a68553ac46bbf23ba289ac9fb64 /src/mga_dacG.c | |
parent | d3b3c858814952bc7344a4154e981851fd9bb494 (diff) |
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_902xf86-4_3_99_901xf86-4_3_99_16xf86-012804-2330
Diffstat (limited to 'src/mga_dacG.c')
-rw-r--r-- | src/mga_dacG.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mga_dacG.c b/src/mga_dacG.c index 34a9432..842e75e 100644 --- a/src/mga_dacG.c +++ b/src/mga_dacG.c @@ -2,7 +2,7 @@ * MGA-1064, MGA-G100, MGA-G200, MGA-G400, MGA-G550 RAMDAC driver */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c,v 1.51 2002/09/16 18:05:55 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c,v 1.54 2003/11/03 05:11:17 tsi Exp $ */ /* * This is a first cut at a non-accelerated version to work with the @@ -208,16 +208,13 @@ MGAGSetPCLK( ScrnInfoPtr pScrn, long f_out ) /* Pixel clock values */ int m, n, p, s; - /* The actual frequency output by the clock */ - double f_pll; - if(MGAISGx50(pMga)) { pReg->Clock = f_out; return; } /* Do the calculations for m, n, p and s */ - f_pll = MGAGCalcClock( pScrn, f_out, &m, &n, &p, &s ); + (void) MGAGCalcClock( pScrn, f_out, &m, &n, &p, &s ); /* Values for the pixel clock PLL registers */ pReg->DacRegs[ MGA1064_PIX_PLLC_M ] = m & 0x1F; @@ -247,7 +244,7 @@ MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode) /* 0x48: */ 0, 0, 0, 0, 0, 0, 0, 0 }; - int i, weight555 = FALSE; + int i; int hd, hs, he, ht, vd, vs, ve, vt, wd; int BppShift; MGAPtr pMga; @@ -411,7 +408,6 @@ MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode) pReg->DacRegs[ MGA1064_MUL_CTL ] = MGA1064_MUL_CTL_16bits; if ( (pLayout->weight.red == 5) && (pLayout->weight.green == 5) && (pLayout->weight.blue == 5) ) { - weight555 = TRUE; pReg->DacRegs[ MGA1064_MUL_CTL ] = MGA1064_MUL_CTL_15bits; } break; @@ -479,7 +475,8 @@ MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode) pReg->ExtVga[2] = ((vt & 0xc00) >> 10) | ((vd & 0x400) >> 8) | ((vd & 0xc00) >> 7) | - ((vs & 0xc00) >> 5); + ((vs & 0xc00) >> 5) | + ((vd & 0x400) >> 3); /* linecomp */ if (pLayout->bitsPerPixel == 24) pReg->ExtVga[3] = (((1 << BppShift) * 3) - 1) | 0x80; else @@ -498,17 +495,19 @@ MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode) ((vd & 0x100) >> 7 ) | ((vs & 0x100) >> 6 ) | ((vd & 0x100) >> 5 ) | - 0x10 | + ((vd & 0x100) >> 4 ) | /* linecomp */ ((vt & 0x200) >> 4 ) | ((vd & 0x200) >> 3 ) | ((vs & 0x200) >> 2 ); - pVga->CRTC[9] = ((vd & 0x200) >> 4) | 0x40; + pVga->CRTC[9] = ((vd & 0x200) >> 4) | + ((vd & 0x200) >> 3); /* linecomp */ pVga->CRTC[16] = vs & 0xFF; pVga->CRTC[17] = (ve & 0x0F) | 0x20; pVga->CRTC[18] = vd & 0xFF; pVga->CRTC[19] = wd & 0xFF; pVga->CRTC[21] = vd & 0xFF; pVga->CRTC[22] = (vt + 1) & 0xFF; + pVga->CRTC[24] = vd & 0xFF; /* linecomp */ MGA_NOT_HAL(pReg->DacRegs[MGA1064_CURSOR_BASE_ADR_LOW] = pMga->FbCursorOffset >> 10); MGA_NOT_HAL(pReg->DacRegs[MGA1064_CURSOR_BASE_ADR_HI] = pMga->FbCursorOffset >> 18); @@ -1128,6 +1127,7 @@ MGAGRamdacInit(ScrnInfoPtr pScrn) HARDWARE_CURSOR_TRUECOLOR_AT_8BPP; MGAdac->LoadPalette = MGAGLoadPalette; + MGAdac->RestorePalette = MGAGRestorePalette; if ( pMga->Bios2.PinID && pMga->Bios2.PclkMax != 0xFF ) { |