From d3a3818010a620ae57dd6831466ce9cd4137b28f Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 9 Sep 2005 23:15:45 +0000 Subject: Clean up some warnings. Fix some '#ifdef USEMGAHAL' issues that had caused the number of curl-braces to be unbalanced. --- src/binding.h | 1 + src/mga_dri.c | 15 ++++++++------- src/mga_driver.c | 14 ++++++++------ 3 files changed, 17 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/binding.h b/src/binding.h index 69547a8..6dcd1e9 100644 --- a/src/binding.h +++ b/src/binding.h @@ -243,6 +243,7 @@ ULONG MGAOpenLibrary(LPBOARDHANDLE pBoard, LPVOID lpClient, ULONG ulClientSize); ULONG MGAGetBOARDHANDLESize(void); ULONG MGASetTVStandard(LPBOARDHANDLE pBoard, ULONG ulTVStandard); ULONG MGASetTVCableType(LPBOARDHANDLE pBoard, ULONG ulCableType); +ULONG HALSetDisplayStart(LPBOARDHANDLE pBoard, ULONG x, ULONG y, ULONG crtc); #if defined(__cplusplus) } diff --git a/src/mga_dri.c b/src/mga_dri.c index c1c357f..7fd5868 100644 --- a/src/mga_dri.c +++ b/src/mga_dri.c @@ -732,7 +732,8 @@ static Bool MGADRIBootstrapDMA(ScreenPtr pScreen) } xf86DrvMsg( pScreen->myNum, X_INFO, "[agp] %d kB allocated with handle 0x%08x\n", - pMGADRIServer->agp.size/1024, pMGADRIServer->agp.handle ); + pMGADRIServer->agp.size/1024, + (unsigned int) pMGADRIServer->agp.handle ); if ( drmAgpBind( pMga->drmFD, pMGADRIServer->agp.handle, 0 ) < 0 ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] Could not bind memory\n" ); @@ -754,7 +755,7 @@ static Bool MGADRIBootstrapDMA(ScreenPtr pScreen) } xf86DrvMsg( pScreen->myNum, X_INFO, "[agp] WARP microcode handle = 0x%08x\n", - pMGADRIServer->warp.handle ); + (unsigned int) pMGADRIServer->warp.handle ); /* Primary DMA space */ @@ -769,7 +770,7 @@ static Bool MGADRIBootstrapDMA(ScreenPtr pScreen) } xf86DrvMsg( pScreen->myNum, X_INFO, "[agp] Primary DMA handle = 0x%08x\n", - pMGADRIServer->primary.handle ); + (unsigned int) pMGADRIServer->primary.handle ); /* DMA buffers */ @@ -784,7 +785,7 @@ static Bool MGADRIBootstrapDMA(ScreenPtr pScreen) } xf86DrvMsg( pScreen->myNum, X_INFO, "[agp] DMA buffers handle = 0x%08x\n", - pMGADRIServer->buffers.handle ); + (unsigned int) pMGADRIServer->buffers.handle ); count = drmAddBufs( pMga->drmFD, MGA_NUM_BUFFERS, MGA_BUFFER_SIZE, @@ -816,7 +817,7 @@ static Bool MGADRIBootstrapDMA(ScreenPtr pScreen) xf86DrvMsg( pScreen->myNum, X_INFO, "[agp] agpTexture handle = 0x%08x\n", - pMGADRIServer->agpTextures.handle ); + (unsigned int) pMGADRIServer->agpTextures.handle ); xf86DrvMsg( pScreen->myNum, X_INFO, "[agp] agpTexture size: %d kb\n", pMGADRIServer->agpTextures.size/1024 ); @@ -833,7 +834,7 @@ static Bool MGADRIBootstrapDMA(ScreenPtr pScreen) } xf86DrvMsg( pScreen->myNum, X_INFO, "[drm] Registers handle = 0x%08x\n", - pMGADRIServer->registers.handle ); + (unsigned int) pMGADRIServer->registers.handle ); pMGADRIServer->status.size = SAREA_MAX; @@ -846,7 +847,7 @@ static Bool MGADRIBootstrapDMA(ScreenPtr pScreen) } xf86DrvMsg( pScreen->myNum, X_INFO, "[drm] Status handle = 0x%08x\n", - pMGADRIServer->status.handle ); + (unsigned int) pMGADRIServer->status.handle ); } return TRUE; diff --git a/src/mga_driver.c b/src/mga_driver.c index ee2766a..1f1a525 100644 --- a/src/mga_driver.c +++ b/src/mga_driver.c @@ -92,6 +92,8 @@ #include "shadowfb.h" #include "fbdevhw.h" +#include "cfb8_32.h" + #ifdef XF86DRI #include "dri.h" #endif @@ -1222,11 +1224,11 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) pMga->DualHeadEnabled = FALSE; if (xf86IsEntityShared(pScrn->entityList[0])) {/* dual-head mode requested*/ + if ( #ifdef USEMGAHAL - if (pMga->HALLoaded || !MGA_DH_NEEDS_HAL(pMga)) { -#else - if (!MGA_DH_NEEDS_HAL(pMga)) { + pMga->HALLoaded || #endif + !MGA_DH_NEEDS_HAL(pMga)) { pMga->DualHeadEnabled = TRUE; } else if (xf86IsPrimInitDone(pScrn->entityList[0])) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, @@ -2102,11 +2104,11 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) * Can we trust HALlib to set the memory configuration * registers correctly? */ + else if ((pMga->softbooted || pMga->Primary #ifdef USEMGAHAL - else if ((pMga->softbooted || pMga->Primary /*|| pMga->HALLoaded*/ ) && -#else - else if ((pMga->softbooted || pMga->Primary) && + /*|| pMga->HALLoaded*/ #endif + ) && (pMga->Chipset != PCI_CHIP_MGA2064) && (pMga->Chipset != PCI_CHIP_MGA2164) && (pMga->Chipset != PCI_CHIP_MGA2164_AGP)) { -- cgit v1.2.3