From 6b4e3a66f6df15f8b2b5fd4f469f552bf4238e1d Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Mon, 22 Oct 2007 15:16:33 +0200 Subject: [PATCH] Unbreak Big Endian architectures --- src/xgi_accel.c | 18 +++--- src/xgi_accel.h | 184 +++++++++++++++++++++++++++--------------------------- 2 files changed, 101 insertions(+), 101 deletions(-) diff --git a/src/xgi_accel.c b/src/xgi_accel.c index 330ed5d..f461427 100644 --- a/src/xgi_accel.c +++ b/src/xgi_accel.c @@ -83,21 +83,21 @@ static void Volari_DisableCmdQueue(ScrnInfoPtr pScrn) ; extern int FbDevExist; #if X_BYTE_ORDER == X_BIG_ENDIAN -static CARD32 BE_SWAP32 (CARD32 val) +static CARD32 BE_SWAP32 (CARD32 val, XGIPtr info) { - if (CurrentColorDepth == 8) + if (info->CurrentLayout.bitsPerPixel == 32) return ((((val) & 0x000000ff) << 24) | \ (((val) & 0x0000ff00) << 8) | \ (((val) & 0x00ff0000) >> 8) | \ (((val) & 0xff000000) >> 24)); - if (CurrentColorDepth == 24) + if (info->CurrentLayout.bitsPerPixel == 24) return val; - if (CurrentColorDepth == 16) + if (info->CurrentLayout.bitsPerPixel == 16) return ((((val) & 0x0000ffff) << 16) | \ (((val) & 0xffff0000) >> 16)); } #else -static CARD32 BE_SWAP32 (CARD32 val) +static CARD32 BE_SWAP32 (CARD32 val, XGIPtr info) { return val; } @@ -391,13 +391,13 @@ Volari_DisableDualPipe(ScrnInfoPtr pScrn) ulTemp = Volari_GetSwWP() ; - *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8240) ; - *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) = (CARD32)BE_SWAP32(ulValue) ; + *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8240, pXGI) ; + *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) = (CARD32)BE_SWAP32(ulValue, pXGI) ; if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) { - *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = (CARD32)BE_SWAP32(GR_NIL_CMD) ; - *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = (CARD32)BE_SWAP32(GR_NIL_CMD) ; + *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ; + *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ; ulTemp += 0x10 ; } diff --git a/src/xgi_accel.h b/src/xgi_accel.h index 8f5d005..80a536b 100644 --- a/src/xgi_accel.h +++ b/src/xgi_accel.h @@ -237,15 +237,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x823C) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x823C, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(pXGI->CommandReg) ;\ + (CARD32)BE_SWAP32(pXGI->CommandReg, pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -269,15 +269,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8200) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8200, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(base) ;\ + (CARD32)BE_SWAP32(base, pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -303,15 +303,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8204) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8204, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(pitch) ;\ + (CARD32)BE_SWAP32(pitch, pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -335,15 +335,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8208) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8208, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32((x<<16)+(y&0xFFFF)) ;\ + (CARD32)BE_SWAP32((x<<16)+(y&0xFFFF), pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -368,15 +368,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8210) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8210, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(base) ;\ + (CARD32)BE_SWAP32(base, pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -401,15 +401,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x820C) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x820C, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(((x)<<16)+((y)&0xFFFF)) ;\ + (CARD32)BE_SWAP32(((x)<<16)+((y)&0xFFFF), pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -434,15 +434,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8214) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8214, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(((y)<<16)|((x)&0xFFFF)) ;\ + (CARD32)BE_SWAP32(((y)<<16)|((x)&0xFFFF), pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -477,15 +477,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8218) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8218, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(((h)<<16)|((w)&0xffff)) ;\ + (CARD32)BE_SWAP32(((h)<<16)|((w)&0xffff), pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -527,15 +527,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(7)) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(7), pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(color) ;\ + (CARD32)BE_SWAP32(color, pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -553,15 +553,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(8)) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(8), pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(color) ;\ + (CARD32)BE_SWAP32(color, pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -578,15 +578,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(9)) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(9), pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(color) ;\ + (CARD32)BE_SWAP32(color, pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -603,15 +603,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(10)) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(10), pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(color) ;\ + (CARD32)BE_SWAP32(color, pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -636,15 +636,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x822C) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x822C, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(p0) ;\ + (CARD32)BE_SWAP32(p0, pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -661,15 +661,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8230) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + 0x8230, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(p1) ;\ + (CARD32)BE_SWAP32(p1, pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -698,15 +698,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(13)) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(13), pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(((top)<<16)|((left)&0xffff)) ;\ + (CARD32)BE_SWAP32(((top)<<16)|((left)&0xffff), pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -723,15 +723,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(13)) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(13), pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(((top)<<16)|((left)&0xffff)) ;\ + (CARD32)BE_SWAP32(((top)<<16)|((left)&0xffff), pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -748,15 +748,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(14)) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(14), pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(((right) & 0xFFFF) | ((bottom)<<16))) ;\ + (CARD32)BE_SWAP32(((right) & 0xFFFF) | ((bottom)<<16), pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -819,15 +819,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(2)) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(2), pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(((y)<<16) | ((x)&0xFFFF) ) ;\ + (CARD32)BE_SWAP32(((y)<<16) | ((x)&0xFFFF), pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -844,15 +844,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(3)) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(3), pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(((y)<<16) | ((x)&0xFFFF) ) ;\ + (CARD32)BE_SWAP32(((y)<<16) | ((x)&0xFFFF), pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -869,15 +869,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(6) + 0x30000 ) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(6) + 0x30000, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(((c)&0xffff)) ;\ + (CARD32)BE_SWAP32(((c)&0xffff), pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -894,15 +894,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(6) + 0xC0000 ) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(6) + 0xC0000, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(((p)<<16)) ;\ + (CARD32)BE_SWAP32(((p)<<16), pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -919,15 +919,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(6)) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(6), pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(((p)<<16)|((c)&0xffff)) ;\ + (CARD32)BE_SWAP32(((p)<<16)|((c)&0xffff), pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ @@ -944,15 +944,15 @@ extern void Volari_Idle(XGIPtr pXGI); ulTemp = Volari_GetSwWP() ;\ \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp) = \ - (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(11)) ;\ + (CARD32)BE_SWAP32(GR_SKPC_HEADER + BR(11), pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+4) =\ - (CARD32)BE_SWAP32(ls) ;\ + (CARD32)BE_SWAP32(ls, pXGI) ;\ if( pXGI->Chipset == PCI_CHIP_XGIXG40 ) \ { \ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+8) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ *(CARD32 *)(pXGI->cmdQueueBase+ulTemp+12) = \ - (CARD32)BE_SWAP32(GR_NIL_CMD) ;\ + (CARD32)BE_SWAP32(GR_NIL_CMD, pXGI) ;\ ulTemp += 0x10 ;\ } \ else if( pXGI->Chipset == PCI_CHIP_XGIXG20 ) \ -- 1.5.3