diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-26 22:48:59 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-26 22:48:59 +0000 |
commit | 2eab4a4e2b8f2ec2154738f0dd57cf0dc5c7816a (patch) | |
tree | add0e49232de50548191a4243ed0d32cc91d1ec5 /src/atividmem.c | |
parent | 770358c0804c3e919440d2575e4ef25365f763b6 (diff) |
merge latest (4.3.99.16) from XFree86 (vendor) branch
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 32ea23fc..1b866598 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 */ } |