diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2005-08-15 07:30:05 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2005-08-15 07:30:05 +0000 |
commit | eec95d13f408f5489fe8c6b611d080c275c541fb (patch) | |
tree | d26994d7d74855cfd445c6bae85d9c1cddf313a1 | |
parent | d4b7edf86b63fb9af377bc4605381c8016a683a5 (diff) |
Egbert's 64bit fixes for mixed 32/64bit clients
-rw-r--r-- | src/mga.h | 4 | ||||
-rw-r--r-- | src/mga_dri.c | 14 | ||||
-rw-r--r-- | src/mga_dri.h | 18 |
3 files changed, 23 insertions, 13 deletions
@@ -152,8 +152,8 @@ void MGAdbg_outreg32(ScrnInfoPtr, int,int, char*); #define MGA_MODULE_DATA mgaModuleData #define MGA_DRIVER_NAME "mga" #define MGA_MAJOR_VERSION 1 -#define MGA_MINOR_VERSION 1 -#define MGA_PATCHLEVEL 2 +#define MGA_MINOR_VERSION 2 +#define MGA_PATCHLEVEL 0 typedef struct { unsigned char ExtVga[6]; diff --git a/src/mga_dri.c b/src/mga_dri.c index f562edc..c1c357f 100644 --- a/src/mga_dri.c +++ b/src/mga_dri.c @@ -731,7 +731,7 @@ static Bool MGADRIBootstrapDMA(ScreenPtr pScreen) return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, - "[agp] %d kB allocated with handle 0x%08lx\n", + "[agp] %d kB allocated with handle 0x%08x\n", pMGADRIServer->agp.size/1024, pMGADRIServer->agp.handle ); if ( drmAgpBind( pMga->drmFD, pMGADRIServer->agp.handle, 0 ) < 0 ) { @@ -753,7 +753,7 @@ static Bool MGADRIBootstrapDMA(ScreenPtr pScreen) return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, - "[agp] WARP microcode handle = 0x%08lx\n", + "[agp] WARP microcode handle = 0x%08x\n", pMGADRIServer->warp.handle ); /* Primary DMA space @@ -768,7 +768,7 @@ static Bool MGADRIBootstrapDMA(ScreenPtr pScreen) return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, - "[agp] Primary DMA handle = 0x%08lx\n", + "[agp] Primary DMA handle = 0x%08x\n", pMGADRIServer->primary.handle ); /* DMA buffers @@ -783,7 +783,7 @@ static Bool MGADRIBootstrapDMA(ScreenPtr pScreen) return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, - "[agp] DMA buffers handle = 0x%08lx\n", + "[agp] DMA buffers handle = 0x%08x\n", pMGADRIServer->buffers.handle ); count = drmAddBufs( pMga->drmFD, @@ -815,7 +815,7 @@ static Bool MGADRIBootstrapDMA(ScreenPtr pScreen) } xf86DrvMsg( pScreen->myNum, X_INFO, - "[agp] agpTexture handle = 0x%08lx\n", + "[agp] agpTexture handle = 0x%08x\n", pMGADRIServer->agpTextures.handle ); xf86DrvMsg( pScreen->myNum, X_INFO, "[agp] agpTexture size: %d kb\n", pMGADRIServer->agpTextures.size/1024 ); @@ -832,7 +832,7 @@ static Bool MGADRIBootstrapDMA(ScreenPtr pScreen) return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, - "[drm] Registers handle = 0x%08lx\n", + "[drm] Registers handle = 0x%08x\n", pMGADRIServer->registers.handle ); pMGADRIServer->status.size = SAREA_MAX; @@ -845,7 +845,7 @@ static Bool MGADRIBootstrapDMA(ScreenPtr pScreen) return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, - "[drm] Status handle = 0x%08lx\n", + "[drm] Status handle = 0x%08x\n", pMGADRIServer->status.handle ); } diff --git a/src/mga_dri.h b/src/mga_dri.h index 218b8fb..f1afb5d 100644 --- a/src/mga_dri.h +++ b/src/mga_dri.h @@ -81,6 +81,16 @@ typedef struct { * again) on the client-side. At some point when it is safe to do so * (probably for the X.org 6.9 / 7.0 release), these fields should be removed. */ +#if 1 +typedef struct _mgaDrmRegion { + drm_handle_t handle; + unsigned int offset; + drmSize size; +} mgaDrmRegion, *mgaDrmRegionPtr; +#else +#define mgaDrmRegion drmRegion +#endif + typedef struct { int chipset; int width; @@ -115,10 +125,10 @@ typedef struct { * \name DRM memory regions. */ /*@{*/ - drmRegion registers; /**< MMIO registers. */ - drmRegion status; /**< Unused client-side since forever. */ - drmRegion primary; /**< Primary DMA region. */ - drmRegion buffers; /**< Unused client-side since forever. */ + mgaDrmRegion registers; /**< MMIO registers. */ + mgaDrmRegion status; /**< Unused client-side since forever. */ + mgaDrmRegion primary; /**< Primary DMA region. */ + mgaDrmRegion buffers; /**< Unused client-side since forever. */ /*@}*/ unsigned int sarea_priv_offset; |