diff options
author | Egbert Eich <eich@suse.de> | 2004-03-04 17:47:45 +0000 |
---|---|---|
committer | Egbert Eich <eich@suse.de> | 2004-03-04 17:47:45 +0000 |
commit | a8f3f90a24db1c2754c5be6c9b0394d403ec00ca (patch) | |
tree | bfc99c3d4bdcc4ef6bb59fcca5294ef1f49e1fec /src/mga_dacG.c | |
parent | 03f00bf8411e6c36d3aef1907e42a52854353101 (diff) |
18. Merged in XFree86 code up to 4.4.0 including changes to files that hadXPRINT_BASEXORG-RELEASE-1-TM-MERGEXORG-RELEASE-1-TM-BASEIPv6-REVIEW-BASEIPv6-REVIEW
a changed license. There was only one change which happened to be from
me (Egbert Eich).
Diffstat (limited to 'src/mga_dacG.c')
-rw-r--r-- | src/mga_dacG.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/mga_dacG.c b/src/mga_dacG.c index 842e75e..0a3a7e2 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.54 2003/11/03 05:11:17 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c,v 1.54tsi Exp $ */ /* * This is a first cut at a non-accelerated version to work with the @@ -548,6 +548,14 @@ MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode) MGACRTC2GetPitch(pScrn, &ModeInfo); MGACRTC2GetDisplayStart(pScrn, &ModeInfo,0,0,0); } + +#if X_BYTE_ORDER == X_BIG_ENDIAN + /* Disable byte-swapping for big-endian architectures - the XFree + driver seems to like a little-endian framebuffer -ReneR */ + /* pReg->Option |= 0x80000000; */ + pReg->Option &= ~0x80000000; +#endif + return(TRUE); } @@ -670,6 +678,14 @@ MGAGRestore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, } if(!pMga->SecondCrtc) { + /* Do not set the memory config for primary cards as it + should be correct already. Only on little endian architectures + since we need to modify the byteswap bit. -ReneR */ +#if X_BYTE_ORDER == X_BIG_ENDIAN + optionMask = OPTION1_MASK; +#else + optionMask = (pMga->Primary) ? OPTION1_MASK_PRIMARY : OPTION1_MASK; +#endif MGA_NOT_HAL( /* @@ -695,10 +711,6 @@ MGA_NOT_HAL( outMGAdac(i, mgaReg->DacRegs[i]); } - /* Do not set the memory config for primary cards as it - should be correct already */ - optionMask = (pMga->Primary) ? OPTION1_MASK_PRIMARY : OPTION1_MASK; - if (!MGAISGx50(pMga)) { /* restore pci_option register */ pciSetBitsLong(pMga->PciTag, PCI_OPTION_REG, optionMask, @@ -939,6 +951,7 @@ MGAGSetCursorPosition(ScrnInfoPtr pScrn, int x, int y) MGAPtr pMga = MGAPTR(pScrn); x += 64; y += 64; + #ifdef USEMGAHAL MGA_HAL( x += pMga->HALGranularityOffX; @@ -1033,7 +1046,8 @@ MGAG_ddc1Read(ScrnInfoPtr pScrn) static void MGAG_I2CGetBits(I2CBusPtr b, int *clock, int *data) { - MGAPtr pMga = MGAPTR(xf86Screens[b->scrnIndex]); + ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex]; + MGAPtr pMga = MGAPTR(pScrn); unsigned char val; /* Get the result. */ @@ -1054,7 +1068,8 @@ MGAG_I2CGetBits(I2CBusPtr b, int *clock, int *data) static void MGAG_I2CPutBits(I2CBusPtr b, int clock, int data) { - MGAPtr pMga = MGAPTR(xf86Screens[b->scrnIndex]); + ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex]; + MGAPtr pMga = MGAPTR(pScrn); unsigned char drv, val; val = (clock ? DDC_SCL_MASK : 0) | (data ? DDC_SDA_MASK : 0); |