summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_bo.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-06-03 08:55:39 +0400
committerBen Skeggs <bskeggs@redhat.com>2011-06-23 09:59:22 +0400
commit111af5c100fa0c0b94301f719dd22dab87f5d0a4 (patch)
tree191bbfdd955400f96db7fb646a3daeafc7720fab /drivers/gpu/drm/nouveau/nouveau_bo.c
parent6e32fedc8b50d3571bdec4e9849e45659ac96599 (diff)
downloadlinux-111af5c100fa0c0b94301f719dd22dab87f5d0a4.tar.xz
drm/nouveau: skip move_notify() if bo does not have a vma attached
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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 633f724b6baf..12d264b57e1d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -842,13 +842,11 @@ out:
static void
nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem)
{
- struct drm_nouveau_private *dev_priv = nouveau_bdev(bo->bdev);
struct nouveau_mem *node = new_mem->mm_node;
struct nouveau_bo *nvbo = nouveau_bo(bo);
struct nouveau_vma *vma = &nvbo->vma;
- struct nouveau_vm *vm = vma->vm;
- if (dev_priv->card_type < NV_50)
+ if (!vma->vm)
return;
switch (new_mem->mem_type) {
@@ -856,7 +854,7 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem)
nouveau_vm_map(vma, node);
break;
case TTM_PL_TT:
- if (vma->node->type != vm->spg_shift) {
+ if (vma->node->type != vma->vm->spg_shift) {
nouveau_vm_unmap(vma);
vma = &node->tmp_vma;
}