summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2007-07-12 11:08:17 +1000
committerBen Skeggs <skeggsb@gmail.com>2007-07-12 11:08:17 +1000
commitcd8613e59d2d27b5f41d23d978afe8e33d206447 (patch)
treee9096a6e8270f8b927869c4e6a741b47b1eb9644 /src
parent3ffa09b09dfd55c64cb98bd8e7bab0370f93cdbd (diff)
nouveau: match drm 0.0.9 interface
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_buffers.c15
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_screen.c2
2 files changed, 6 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c
index 857cd30584..35afb36434 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c
@@ -78,8 +78,8 @@ nouveau_mem_free(GLcontext *ctx, nouveau_mem *mem)
if (mem->map)
drmUnmap(mem->map, mem->size);
- memf.flags = mem->type;
- memf.region_offset = mem->offset;
+ memf.flags = mem->type;
+ memf.offset = mem->offset;
drmCommandWrite(nmesa->driFd, DRM_NOUVEAU_MEM_FREE, &memf, sizeof(memf));
FREE(mem);
}
@@ -111,7 +111,7 @@ nouveau_mem_alloc(GLcontext *ctx, int type, GLuint size, GLuint align)
FREE(mem);
return NULL;
}
- mem->offset = mema.region_offset;
+ mem->offset = mema.offset;
mem->type = mema.flags;
if (NOUVEAU_DEBUG & DEBUG_MEM) {
@@ -120,7 +120,7 @@ nouveau_mem_alloc(GLcontext *ctx, int type, GLuint size, GLuint align)
}
if (type & NOUVEAU_MEM_MAPPED)
- ret = drmMap(nmesa->driFd, mem->offset, mem->size, &mem->map);
+ ret = drmMap(nmesa->driFd, mema.map_handle, mem->size, &mem->map);
if (ret) {
mem->map = NULL;
nouveau_mem_free(ctx, mem);
@@ -135,12 +135,7 @@ nouveau_mem_gpu_offset_get(GLcontext *ctx, nouveau_mem *mem)
{
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
- if (mem->type & NOUVEAU_MEM_FB)
- return (uint32_t)mem->offset - nmesa->vram_phys;
- else if (mem->type & NOUVEAU_MEM_AGP)
- return (uint32_t)mem->offset - nmesa->gart_phys;
- else
- return 0xDEADF00D;
+ return mem->offset;
}
static GLboolean
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
index c62063db05..69b0691bb7 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
@@ -328,7 +328,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIsc
static const __DRIversion ddx_expected = { 1, 2, 0 };
static const __DRIversion dri_expected = { 4, 0, 0 };
static const __DRIversion drm_expected = { 0, 0, NOUVEAU_DRM_HEADER_PATCHLEVEL };
-#if NOUVEAU_DRM_HEADER_PATCHLEVEL != 8
+#if NOUVEAU_DRM_HEADER_PATCHLEVEL != 9
#error nouveau_drm.h version doesn't match expected version
#endif
dri_interface = interface;