summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_mem.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-02-10 04:22:12 +0300
committerBen Skeggs <bskeggs@redhat.com>2011-02-24 23:45:49 +0300
commit3425df486ca247d9e8487be06a6cd0763ba38180 (patch)
tree2ab19a81f85693d0630fd79133ad1149d3e26444 /drivers/gpu/drm/nouveau/nouveau_mem.c
parenta4154bbffdc9f6a38556ea9e82aef4975018ba23 (diff)
downloadlinux-3425df486ca247d9e8487be06a6cd0763ba38180.tar.xz
drm/nv50-nvc0: unmap buffers from the vm when they're evicted
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_mem.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_mem.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c
index 16eee50a0572..b90383fd18fd 100644
--- a/drivers/gpu/drm/nouveau/nouveau_mem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_mem.c
@@ -710,8 +710,14 @@ nouveau_vram_manager_del(struct ttm_mem_type_manager *man,
{
struct drm_nouveau_private *dev_priv = nouveau_bdev(man->bdev);
struct nouveau_vram_engine *vram = &dev_priv->engine.vram;
+ struct nouveau_vram *node = mem->mm_node;
struct drm_device *dev = dev_priv->dev;
+ if (node->tmp_vma.node) {
+ nouveau_vm_unmap(&node->tmp_vma);
+ nouveau_vm_put(&node->tmp_vma);
+ }
+
vram->put(dev, (struct nouveau_vram **)&mem->mm_node);
}