summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-06-15 20:25:00 +1000
committerDave Airlie <airlied@linux.ie>2006-06-15 20:25:00 +1000
commit6c3f81683abab8ff6b8f2fcaf01a2a1a63af5ef6 (patch)
tree9fe67eda14c30cc9cdc5eeffec3c0de58d2de812 /src
parent58c6aac0669101481ef6b8217e5cede4573ece42 (diff)
ati: fix -Wall in atidri.c
atidri.c has some parameter passing bugs, fixed those and cleaned other warnings.
Diffstat (limited to 'src')
-rw-r--r--src/atidri.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/atidri.c b/src/atidri.c
index b6116329..5155820c 100644
--- a/src/atidri.c
+++ b/src/atidri.c
@@ -33,6 +33,7 @@
#include <string.h>
#include <stdio.h>
+#include <unistd.h>
/* Driver data structures */
#include "ati.h"
@@ -681,7 +682,6 @@ static Bool ATIDRISetAgpMode( ScreenPtr pScreen )
if (pATI->OptionAGPSize) {
switch (pATI->OptionAGPSize) {
- case 256:
case 128:
case 64:
case 32:
@@ -775,8 +775,7 @@ static Bool ATIDRIAgpInit( ScreenPtr pScreen )
if (pATI->OptionBufferSize > 2) {
xf86DrvMsg( pScreen->myNum, X_WARNING, "[agp] Illegal DMA buffers size: %d MB\n",
pATI->OptionBufferSize );
- xf86DrvMsg( pScreen->myNum, X_WARNING, "[agp] Clamping DMA buffers size to 2 MB\n",
- pATI->OptionBufferSize );
+ xf86DrvMsg( pScreen->myNum, X_WARNING, "[agp] Clamping DMA buffers size to 2 MB\n");
pATIDRIServer->bufferSize = 2;
} else {
pATIDRIServer->bufferSize = pATI->OptionBufferSize;
@@ -817,7 +816,7 @@ static Bool ATIDRIAgpInit( ScreenPtr pScreen )
return FALSE;
}
xf86DrvMsg( pScreen->myNum, X_INFO,
- "[agp] ring handle = 0x%08lx\n",
+ "[agp] ring handle = 0x%08x\n",
pATIDRIServer->ringHandle );
if ( drmMap( pATI->drmFD, pATIDRIServer->ringHandle,
@@ -838,7 +837,7 @@ static Bool ATIDRIAgpInit( ScreenPtr pScreen )
return FALSE;
}
xf86DrvMsg( pScreen->myNum, X_INFO,
- "[agp] vertex buffers handle = 0x%08lx\n",
+ "[agp] vertex buffers handle = 0x%08x\n",
pATIDRIServer->bufferHandle );
if ( drmMap( pATI->drmFD, pATIDRIServer->bufferHandle,
@@ -859,7 +858,7 @@ static Bool ATIDRIAgpInit( ScreenPtr pScreen )
return FALSE;
}
xf86DrvMsg(pScreen->myNum, X_INFO,
- "[agp] AGP texture region handle = 0x%08lx\n",
+ "[agp] AGP texture region handle = 0x%08x\n",
pATIDRIServer->agpTexHandle);
if (drmMap(pATI->drmFD, pATIDRIServer->agpTexHandle, pATIDRIServer->agpTexMapSize,
@@ -928,7 +927,7 @@ static Bool ATIDRIMapInit( ScreenPtr pScreen )
return FALSE;
}
xf86DrvMsg( pScreen->myNum, X_INFO,
- "[drm] register handle = 0x%08lx\n",
+ "[drm] register handle = 0x%08x\n",
pATIDRIServer->regsHandle );
return TRUE;
@@ -1023,7 +1022,7 @@ static Bool ATIDRIMapBuffers( ScreenPtr pScreen )
xf86DrvMsg( pScreen->myNum, X_INFO,
"[drm] Mapped %d DMA buffers at 0x%08lx\n",
pATIDRIServer->drmBuffers->count,
- pATIDRIServer->drmBuffers->list->address );
+ (unsigned long)pATIDRIServer->drmBuffers->list->address );
return TRUE;
}
@@ -1061,8 +1060,7 @@ static Bool ATIDRIIrqInit( ScreenPtr pScreen )
pATI->irq);
else {
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
- "[drm] Falling back to irq-free operation\n",
- pATI->irq);
+ "[drm] Falling back to irq-free operation\n");
return FALSE;
}
}
@@ -1152,7 +1150,7 @@ Bool ATIDRIScreenInit( ScreenPtr pScreen )
pDRIInfo->ddxDriverMajorVersion = ATI_VERSION_MAJOR;
pDRIInfo->ddxDriverMinorVersion = ATI_VERSION_MINOR;
pDRIInfo->ddxDriverPatchVersion = ATI_VERSION_PATCH;
- pDRIInfo->frameBufferPhysicalAddress = pATI->LinearBase;
+ pDRIInfo->frameBufferPhysicalAddress = (void *)pATI->LinearBase;
pDRIInfo->frameBufferSize = pATI->LinearSize;
pDRIInfo->frameBufferStride = (pScreenInfo->displayWidth *
pATI->FBBytesPerPixel);
@@ -1317,8 +1315,7 @@ Bool ATIDRIScreenInit( ScreenPtr pScreen )
if (pATI->OptionBufferSize > 2) {
xf86DrvMsg( pScreen->myNum, X_WARNING, "[pci] Illegal DMA buffers size: %d MB\n",
pATI->OptionBufferSize );
- xf86DrvMsg( pScreen->myNum, X_WARNING, "[pci] Clamping DMA buffers size to 2 MB\n",
- pATI->OptionBufferSize );
+ xf86DrvMsg( pScreen->myNum, X_WARNING, "[pci] Clamping DMA buffers size to 2 MB\n");
pATIDRIServer->bufferSize = 2;
} else {
pATIDRIServer->bufferSize = pATI->OptionBufferSize;
@@ -1463,8 +1460,6 @@ void ATIDRIResume( ScreenPtr pScreen )
ATIPtr pATI = ATIPTR(pScreenInfo);
ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo;
- int ret;
-
xf86DrvMsg( pScreen->myNum, X_INFO,
"[RESUME] Attempting to re-init Mach64 hardware.\n");