summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/unichrome/via_context.c17
-rw-r--r--src/mesa/drivers/dri/unichrome/via_context.h10
-rw-r--r--src/mesa/drivers/dri/unichrome/via_fb.c6
-rw-r--r--src/mesa/drivers/dri/unichrome/via_screen.c10
-rw-r--r--src/mesa/drivers/dri/unichrome/via_screen.h2
5 files changed, 26 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c
index 3ff79c06cd..62498fb874 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.c
+++ b/src/mesa/drivers/dri/unichrome/via_context.c
@@ -675,13 +675,14 @@ viaCreateContext(const __GLcontextModes *visual,
(*dri_interface->getUST)( &vmesa->swap_ust );
- vmesa->regMMIOBase = (GLuint *)((GLuint)viaScreen->reg);
- vmesa->pnGEMode = (GLuint *)((GLuint)viaScreen->reg + 0x4);
- vmesa->regEngineStatus = (GLuint *)((GLuint)viaScreen->reg + 0x400);
- vmesa->regTranSet = (GLuint *)((GLuint)viaScreen->reg + 0x43C);
- vmesa->regTranSpace = (GLuint *)((GLuint)viaScreen->reg + 0x440);
+ vmesa->regMMIOBase = (GLuint *)((unsigned long)viaScreen->reg);
+ vmesa->pnGEMode = (GLuint *)((unsigned long)viaScreen->reg + 0x4);
+ vmesa->regEngineStatus = (GLuint *)((unsigned long)viaScreen->reg + 0x400);
+ vmesa->regTranSet = (GLuint *)((unsigned long)viaScreen->reg + 0x43C);
+ vmesa->regTranSpace = (GLuint *)((unsigned long)viaScreen->reg + 0x440);
vmesa->agpBase = viaScreen->agpBase;
+
return GL_TRUE;
}
@@ -797,9 +798,9 @@ viaMakeCurrent(__DRIcontextPrivate *driContextPriv,
__DRIdrawablePrivate *driReadPriv)
{
if (VIA_DEBUG & DEBUG_DRI) {
- fprintf(stderr, "driContextPriv = %08x\n", (GLuint)driContextPriv);
- fprintf(stderr, "driDrawPriv = %08x\n", (GLuint)driDrawPriv);
- fprintf(stderr, "driReadPriv = %08x\n", (GLuint)driReadPriv);
+ fprintf(stderr, "driContextPriv = %016lx\n", (unsigned long)driContextPriv);
+ fprintf(stderr, "driDrawPriv = %016lx\n", (unsigned long)driDrawPriv);
+ fprintf(stderr, "driReadPriv = %016lx\n", (unsigned long)driReadPriv);
}
if (driContextPriv) {
diff --git a/src/mesa/drivers/dri/unichrome/via_context.h b/src/mesa/drivers/dri/unichrome/via_context.h
index 59311eab36..9d7a0e6cb6 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.h
+++ b/src/mesa/drivers/dri/unichrome/via_context.h
@@ -89,8 +89,8 @@ struct via_renderbuffer {
struct gl_renderbuffer Base; /* must be first! */
drm_handle_t handle;
drmSize size;
- GLuint offset;
- GLuint index;
+ unsigned long offset;
+ unsigned long index;
GLuint pitch;
GLuint bpp;
char *map;
@@ -106,8 +106,8 @@ struct via_renderbuffer {
struct via_tex_buffer {
struct via_tex_buffer *next, *prev;
struct via_texture_image *image;
- GLuint index;
- GLuint offset;
+ unsigned long index;
+ unsigned long offset;
GLuint size;
GLuint memType;
unsigned char *bufAddr;
@@ -303,7 +303,7 @@ struct via_context {
volatile GLuint* regEngineStatus;
volatile GLuint* regTranSet;
volatile GLuint* regTranSpace;
- GLuint* agpBase;
+ GLuint agpBase;
GLuint drawType;
GLuint nDoneFirstFlip;
diff --git a/src/mesa/drivers/dri/unichrome/via_fb.c b/src/mesa/drivers/dri/unichrome/via_fb.c
index 5b6ed9bb30..48c7ed4caa 100644
--- a/src/mesa/drivers/dri/unichrome/via_fb.c
+++ b/src/mesa/drivers/dri/unichrome/via_fb.c
@@ -142,12 +142,12 @@ via_alloc_texture(struct via_context *vmesa,
t->index = fb.index;
if (t->memType == VIA_MEM_AGP) {
- t->bufAddr = (GLubyte *)((GLuint)vmesa->viaScreen->agpLinearStart +
+ t->bufAddr = (GLubyte *)((unsigned long)vmesa->viaScreen->agpLinearStart +
fb.offset);
- t->texBase = (GLuint)vmesa->agpBase + fb.offset;
+ t->texBase = vmesa->agpBase + fb.offset;
}
else {
- t->bufAddr = (GLubyte *)(fb.offset + (GLuint)vmesa->driScreen->pFB);
+ t->bufAddr = (GLubyte *)((unsigned long)vmesa->driScreen->pFB + fb.offset);
t->texBase = fb.offset;
}
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c
index 424a037a0a..24c62198ac 100644
--- a/src/mesa/drivers/dri/unichrome/via_screen.c
+++ b/src/mesa/drivers/dri/unichrome/via_screen.c
@@ -168,8 +168,14 @@ viaInitDriver(__DRIscreenPrivate *sPriv)
sPriv->private = NULL;
__driUtilMessage("viaInitDriver: drmMap agp failed");
return GL_FALSE;
- }
- viaScreen->agpBase = (GLuint *)gDRIPriv->agp.handle;
+ }
+
+ /*
+ * FIXME: This is an invalid assumption that works until handle is
+ * changed to mean something else than the 32-bit physical AGP address.
+ */
+
+ viaScreen->agpBase = gDRIPriv->agp.handle;
} else
viaScreen->agpLinearStart = 0;
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.h b/src/mesa/drivers/dri/unichrome/via_screen.h
index 8239960a63..84aa5aef88 100644
--- a/src/mesa/drivers/dri/unichrome/via_screen.h
+++ b/src/mesa/drivers/dri/unichrome/via_screen.h
@@ -59,7 +59,7 @@ typedef struct {
drmAddress reg;
drmAddress agpLinearStart;
- GLuint* agpBase;
+ GLuint agpBase;
__DRIscreenPrivate *driScrnPriv;
drmBufMapPtr bufs;