diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:28:36 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:28:36 +0000 |
commit | 73105e438e90f950249cb265ba99001d4db3dc60 (patch) | |
tree | add0e49232de50548191a4243ed0d32cc91d1ec5 /src/atividmem.c | |
parent | 0a53864f9581196604d04fd28b4e94a9b0b73d18 (diff) |
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16
Diffstat (limited to 'src/atividmem.c')
-rw-r--r-- | src/atividmem.c | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/src/atividmem.c b/src/atividmem.c index 32ea23f..1b86659 100644 --- a/src/atividmem.c +++ b/src/atividmem.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atividmem.c,v 1.14 2003/01/01 19:16:34 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atividmem.c,v 1.15 2003/04/23 21:51:31 tsi Exp $ */ /* * Copyright 1997 through 2003 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * @@ -115,9 +115,17 @@ ATIUnmapLinear { xf86UnMapVidMem(iScreen, pATI->pMemory, pATI->LinearSize); + +#if X_BYTE_ORDER != X_LITTLE_ENDIAN + + if (pATI->pMemoryLE) + xf86UnMapVidMem(iScreen, pATI->pMemoryLE, pATI->LinearSize); + +#endif /* X_BYTE_ORDER */ + } - pATI->pMemory = NULL; + pATI->pMemory = pATI->pMemoryLE = NULL; } /* @@ -252,6 +260,34 @@ ATIMapApertures ((pATI->CursorOffset + 0x00000400UL) <= (CARD32)pATI->LinearSize)) pATI->pCursorImage = (char *)pATI->pMemory + pATI->CursorOffset; + pATI->pMemoryLE = pATI->pMemory; + +#else /* if X_BYTE_ORDER != X_LITTLE_ENDIAN */ + + /* + * Map the little-endian aperture (used for video, etc.). Note that + * caching of this area is _not_ wanted. + */ + if (pVideo) + { + pATI->pMemoryLE = xf86MapPciMem(iScreen, VIDMEM_MMIO, Tag, + pATI->LinearBase - 0x00800000U, pATI->LinearSize); + + if (!pATI->pMemoryLE) + { + ATIUnmapLinear(iScreen, pATI); + +#ifndef AVOID_CPIO + + ATIUnmapVGA(iScreen, pATI); + +#endif /* AVOID_CPIO */ + + pATI->Mapped = FALSE; + return FALSE; + } + } + #endif /* X_BYTE_ORDER */ } |