aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_vm.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-12-22 00:20:21 -0500
committerBen Skeggs <bskeggs@redhat.com>2011-12-22 00:23:25 -0500
commitf7b24c42da1a7bbb98145d27aa716d8af3cae2a6 (patch)
tree78bf7271c755818a83faf713655a69f611cd23df /drivers/gpu/drm/nouveau/nouveau_vm.c
parentb2e0d195d29326fce6aef8f2f789028bf21d743f (diff)
drm/nouveau/ttm: fix crash as a result of a recent ttm change
"drm/ttm: callback move_notify any time bo placement change v4" failed to avoid a NULL pointer dereference in nouveau caused by move_notify being expected to handle that case now. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_vm.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_vm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_vm.c b/drivers/gpu/drm/nouveau/nouveau_vm.c
index ef0832b29ad2..2bf6c0350b4b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_vm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_vm.c
@@ -78,9 +78,10 @@ nouveau_vm_map(struct nouveau_vma *vma, struct nouveau_mem *node)
78 78
79void 79void
80nouveau_vm_map_sg(struct nouveau_vma *vma, u64 delta, u64 length, 80nouveau_vm_map_sg(struct nouveau_vma *vma, u64 delta, u64 length,
81 struct nouveau_mem *mem, dma_addr_t *list) 81 struct nouveau_mem *mem)
82{ 82{
83 struct nouveau_vm *vm = vma->vm; 83 struct nouveau_vm *vm = vma->vm;
84 dma_addr_t *list = mem->pages;
84 int big = vma->node->type != vm->spg_shift; 85 int big = vma->node->type != vm->spg_shift;
85 u32 offset = vma->node->offset + (delta >> 12); 86 u32 offset = vma->node->offset + (delta >> 12);
86 u32 bits = vma->node->type - 12; 87 u32 bits = vma->node->type - 12;