summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/mga/server
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2005-08-15 06:59:24 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2005-08-15 06:59:24 +0000
commitdabec11d277e68b6940e741651e61102767240b9 (patch)
tree12e8d6988b4b20a0d4fbcf4312ee89f66ddb1225 /src/mesa/drivers/dri/mga/server
parent69dc32cfac945bf664ddfbd6f0116404f893e66e (diff)
Add Egberts fixes for 64bit architectures
Add additional checks for the *DRIRec info structure passed in from the device driver. This ensures that things fallback to indirect rendering if the DDX driver has had modifications (i.e. removal of the drmAddress field).
Diffstat (limited to 'src/mesa/drivers/dri/mga/server')
-rw-r--r--src/mesa/drivers/dri/mga/server/mga_dri.c10
-rw-r--r--src/mesa/drivers/dri/mga/server/mga_dri.h18
2 files changed, 19 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/mga/server/mga_dri.c b/src/mesa/drivers/dri/mga/server/mga_dri.c
index a9830814a1..258ace83a0 100644
--- a/src/mesa/drivers/dri/mga/server/mga_dri.c
+++ b/src/mesa/drivers/dri/mga/server/mga_dri.c
@@ -206,7 +206,7 @@ static int MGADRIAgpInit(struct DRIDriverContextRec *ctx, MGAPtr pMga)
return 0;
}
fprintf( stderr,
- "[agp] WARP microcode handle = 0x%08lx\n",
+ "[agp] WARP microcode handle = 0x%08x\n",
pMga->warp.handle );
if ( drmMap( ctx->drmFD,
@@ -233,7 +233,7 @@ static int MGADRIAgpInit(struct DRIDriverContextRec *ctx, MGAPtr pMga)
return 0;
}
fprintf( stderr,
- "[agp] Primary DMA handle = 0x%08lx\n",
+ "[agp] Primary DMA handle = 0x%08x\n",
pMga->primary.handle );
if ( drmMap( ctx->drmFD,
@@ -260,7 +260,7 @@ static int MGADRIAgpInit(struct DRIDriverContextRec *ctx, MGAPtr pMga)
return 0;
}
fprintf( stderr,
- "[agp] DMA buffers handle = 0x%08lx\n",
+ "[agp] DMA buffers handle = 0x%08x\n",
pMga->buffers.handle );
if ( drmMap( ctx->drmFD,
@@ -304,7 +304,7 @@ static int MGADRIAgpInit(struct DRIDriverContextRec *ctx, MGAPtr pMga)
}
/* should i map it ? */
fprintf( stderr,
- "[agp] agpTexture handle = 0x%08lx\n",
+ "[agp] agpTexture handle = 0x%08x\n",
pMga->agpTextures.handle );
fprintf( stderr,
"[agp] agpTexture size: %d kb\n", pMga->agpTextures.size/1024 );
@@ -339,7 +339,7 @@ static int MGADRIMapInit( struct DRIDriverContextRec *ctx, MGAPtr pMga )
return 0;
}
fprintf( stderr,
- "[drm] Status handle = 0x%08lx\n",
+ "[drm] Status handle = 0x%08x\n",
pMga->status.handle );
if ( drmMap( ctx->drmFD,
diff --git a/src/mesa/drivers/dri/mga/server/mga_dri.h b/src/mesa/drivers/dri/mga/server/mga_dri.h
index 1ef6592196..03b8414603 100644
--- a/src/mesa/drivers/dri/mga/server/mga_dri.h
+++ b/src/mesa/drivers/dri/mga/server/mga_dri.h
@@ -49,6 +49,16 @@
# define DEPRECATED
#endif
+#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 DEPRECATED;
@@ -91,10 +101,10 @@ typedef struct {
* for the X.org 6.9 / 7.0 release), these fields should be removed.
*/
/*@{*/
- drmRegion registers; /**< MMIO registers. */
- drmRegion status DEPRECATED; /**< No longer used on the client-side. */
- drmRegion primary; /**< Primary DMA region. */
- drmRegion buffers DEPRECATED; /**< No longer used on the client-side. */
+ mgaDrmRegion registers; /**< MMIO registers. */
+ mgaDrmRegion status DEPRECATED; /**< No longer used on the client-side. */
+ mgaDrmRegion primary; /**< Primary DMA region. */
+ mgaDrmRegion buffers DEPRECATED; /**< No longer used on the client-side. */
/*@}*/
unsigned int sarea_priv_offset;