summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArkadiusz Miskiewicz <arekm@maven.pl>2007-12-18 15:32:10 -0500
committerAlex Deucher <alex@t41p.hsd1.va.comcast.net>2007-12-18 15:32:10 -0500
commit20568f66f9a9a60a33bd9a69ccc14a891c656836 (patch)
tree29fc833b92fa64ae4caa353d7228bd86264ff9ae
parent1496194200adbcb044ec3977367a0908262e389c (diff)
RADEON: more cleanups and warning fixes
-rw-r--r--src/atividmem.c14
-rw-r--r--src/radeon_crtc.c4
-rw-r--r--src/radeon_cursor.c2
3 files changed, 6 insertions, 14 deletions
diff --git a/src/atividmem.c b/src/atividmem.c
index 8910c73b..986ac0f9 100644
--- a/src/atividmem.c
+++ b/src/atividmem.c
@@ -103,14 +103,12 @@ ATIUnmapLinear
ATIPtr pATI
)
{
- pciVideoPtr pVideo = pATI->PCIInfo;
-
if (pATI->pMemory)
{
#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(iScreen, pATI->pMemory, pATI->LinearSize);
#else
- pci_device_unmap_range(pVideo, pATI->pMemory, pATI->LinearSize);
+ pci_device_unmap_range(pATI->PCIInfo, pATI->pMemory, pATI->LinearSize);
#endif
#if X_BYTE_ORDER != X_LITTLE_ENDIAN
@@ -120,7 +118,7 @@ ATIUnmapLinear
#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(iScreen, pATI->pMemoryLE, pATI->LinearSize);
#else
- pci_device_unmap_range(pVideo, pATI->pMemoryLE, pATI->LinearSize);
+ pci_device_unmap_range(pATI->PCIInfo, pATI->pMemoryLE, pATI->LinearSize);
#endif
}
@@ -143,14 +141,12 @@ ATIUnmapMMIO
ATIPtr pATI
)
{
- pciVideoPtr pVideo = pATI->PCIInfo;
-
if (pATI->pMMIO)
{
#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(iScreen, pATI->pMMIO, getpagesize());
#else
- pci_device_unmap_range(pVideo, pATI->pMMIO, getpagesize());
+ pci_device_unmap_range(pATI->PCIInfo, pATI->pMMIO, getpagesize());
#endif
}
@@ -169,14 +165,12 @@ ATIUnmapCursor
ATIPtr pATI
)
{
- pciVideoPtr pVideo = pATI->PCIInfo;
-
if (pATI->pCursorPage)
{
#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(iScreen, pATI->pCursorPage, getpagesize());
#else
- pci_device_unmap_range(pVideo, pATI->pCursorPage, getpagesize());
+ pci_device_unmap_range(pATI->PCIInfo, pATI->pCursorPage, getpagesize());
#endif
}
diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c
index 41375dae..07857dd5 100644
--- a/src/radeon_crtc.c
+++ b/src/radeon_crtc.c
@@ -145,15 +145,13 @@ RADEONInitCommonRegisters(RADEONSavePtr save, RADEONInfoPtr info)
static void
RADEONInitSurfaceCntl(xf86CrtcPtr crtc, RADEONSavePtr save)
{
- ScrnInfoPtr pScrn = crtc->scrn;
-
save->surface_cntl = 0;
#if X_BYTE_ORDER == X_BIG_ENDIAN
/* We must set both apertures as they can be both used to map the entire
* video memory. -BenH.
*/
- switch (pScrn->bitsPerPixel) {
+ switch (crtc->scrn->bitsPerPixel) {
case 16:
save->surface_cntl |= RADEON_NONSURF_AP0_SWP_16BPP;
save->surface_cntl |= RADEON_NONSURF_AP1_SWP_16BPP;
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index 9dd6eb85..ba1159c9 100644
--- a/src/radeon_cursor.c
+++ b/src/radeon_cursor.c
@@ -232,7 +232,7 @@ radeon_crtc_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image)
ScrnInfoPtr pScrn = crtc->scrn;
RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
RADEONInfoPtr info = RADEONPTR(pScrn);
- unsigned char *RADEONMMIO = info->MMIO;
+ CURSOR_SWAPPING_DECL_MMIO
CARD32 *d = (CARD32 *)(pointer)(info->FB + radeon_crtc->cursor_offset + pScrn->fbOffset);
RADEONCTRACE(("RADEONLoadCursorARGB\n"));