drm/nouveau: fix oopses caused by clear being called on unpopulated ttms
authorBen Skeggs <bskeggs@redhat.com>
Fri, 25 Nov 2011 06:35:34 +0000 (16:35 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 30 Nov 2011 13:41:05 +0000 (23:41 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_sgdma.c

index b75258a9fe44d544521431133ecd64ec0136637d..c8a463b76c89f03f96f68e48107d9993d2a2bda1 100644 (file)
@@ -67,7 +67,10 @@ nouveau_sgdma_clear(struct ttm_backend *be)
                        pci_unmap_page(dev->pdev, nvbe->pages[nvbe->nr_pages],
                                       PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
                }
+               nvbe->unmap_pages = false;
        }
+
+       nvbe->pages = NULL;
 }
 
 static void