diff options
Diffstat (limited to 'src/mesa/drivers/dri/mga')
-rw-r--r-- | src/mesa/drivers/dri/mga/mga_xmesa.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/mga/server/mga_dri.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/mga/server/mga_dri.h | 18 |
3 files changed, 24 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c index 1eb03ef0ec..3e7db69c2d 100644 --- a/src/mesa/drivers/dri/mga/mga_xmesa.c +++ b/src/mesa/drivers/dri/mga/mga_xmesa.c @@ -200,6 +200,10 @@ mgaInitDriver(__DRIscreenPrivate *sPriv) (PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension")); void * const psc = sPriv->psc->screenConfigs; + if (sPriv->devPrivSize != sizeof(MGADRIRec)) { + fprintf(stderr,"\nERROR! sizeof(MGADRIRec) does not match passed size from device driver\n"); + return GL_FALSE; + } /* Allocate the private area */ mgaScreen = (mgaScreenPrivate *)MALLOC(sizeof(mgaScreenPrivate)); @@ -945,7 +949,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIsc { __DRIscreenPrivate *psp; - static const __DRIversion ddx_expected = { 1, 1, 1 }; + static const __DRIversion ddx_expected = { 1, 2, 0 }; static const __DRIversion dri_expected = { 4, 0, 0 }; static const __DRIversion drm_expected = { 3, 0, 0 }; 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; |