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);
}
FREE(mem);
return NULL;
}
- mem->offset = mema.region_offset;
+ mem->offset = mema.offset;
mem->type = mema.flags;
if (NOUVEAU_DEBUG & DEBUG_MEM) {
}
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);
{
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
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;