summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_bo.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-06-07 15:25:12 +1000
committerBen Skeggs <bskeggs@redhat.com>2011-06-23 16:00:42 +1000
commit2fd3db6f1457050bdebf97e45147ce6827e1742a (patch)
tree5e1a6ab1ff18497a63364ee9ca6c6d1e8608ebeb /drivers/gpu/drm/nouveau/nouveau_bo.c
parent7375c95b343aa575940704a38482a334ea87ac6c (diff)
drm/nouveau: remove implicit mapping of every bo into chan_vm
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 49af4072c0f..890d50e4d68 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -49,7 +49,6 @@ nouveau_bo_del_ttm(struct ttm_buffer_object *bo)
DRM_ERROR("bo %p still attached to GEM object\n", bo);
nv10_mem_put_tile_region(dev, nvbo->tile, NULL);
- nouveau_bo_vma_del(nvbo, &nvbo->vma);
kfree(nvbo);
}
@@ -115,14 +114,6 @@ nouveau_bo_new(struct drm_device *dev, int size, int align,
nvbo->bo.mem.num_pages = size >> PAGE_SHIFT;
nouveau_bo_placement_set(nvbo, flags, 0);
- if (dev_priv->chan_vm) {
- ret = nouveau_bo_vma_add(nvbo, dev_priv->chan_vm, &nvbo->vma);
- if (ret) {
- kfree(nvbo);
- return ret;
- }
- }
-
ret = ttm_bo_init(&dev_priv->ttm.bdev, &nvbo->bo, size,
ttm_bo_type_device, &nvbo->placement,
align >> PAGE_SHIFT, 0, false, NULL, size,
@@ -1103,6 +1094,7 @@ nouveau_bo_vma_add(struct nouveau_bo *nvbo, struct nouveau_vm *vm,
nouveau_vm_map_sg(vma, 0, size, node, node->pages);
list_add_tail(&vma->head, &nvbo->vma_list);
+ vma->refcount = 1;
return 0;
}