diff options
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 */ } |