summaryrefslogtreecommitdiff
path: root/src/nv_mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nv_mem.c')
-rw-r--r--src/nv_mem.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nv_mem.c b/src/nv_mem.c
index 0ecd71a..99cb8bc 100644
--- a/src/nv_mem.c
+++ b/src/nv_mem.c
@@ -54,6 +54,10 @@ void NVFreeMemory(NVPtr pNv, NVAllocRec *mem)
memfree.flags = mem->type;
memfree.region_offset = mem->offset;
+ if (mem->type & NOUVEAU_MEM_FB)
+ memfree.region_offset += pNv->VRAMPhysical;
+ else if (mem->type & NOUVEAU_MEM_AGP)
+ memfree.region_offset += pNv->AGPPhysical;
if (drmCommandWriteRead(pNv->drm_fd,
DRM_NOUVEAU_MEM_FREE, &memfree,
sizeof(memfree))) {