summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2005-09-09 23:15:45 +0000
committerIan Romanick <idr@us.ibm.com>2005-09-09 23:15:45 +0000
commitd3a3818010a620ae57dd6831466ce9cd4137b28f (patch)
tree18df17877ec67ede6c9018715b951a68f19ce7f3
parent000f59ff4686d1dbda673bf5a700f33615f9eb89 (diff)
Clean up some warnings. Fix some '#ifdef USEMGAHAL' issues that had causedXORG-6_8_99_901
the number of curl-braces to be unbalanced.
-rw-r--r--src/binding.h1
-rw-r--r--src/mga_dri.c15
-rw-r--r--src/mga_driver.c14
3 files changed, 17 insertions, 13 deletions
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)) {