From: Ben Skeggs Date: Fri, 25 Nov 2011 06:35:34 +0000 (+1000) Subject: drm/nouveau: fix oopses caused by clear being called on unpopulated ttms X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=a10e9e1dbb39970f232b1e2b0e4f738e2d77079f;p=openwrt%2Fstaging%2Fblogic.git drm/nouveau: fix oopses caused by clear being called on unpopulated ttms Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c index b75258a9fe44..c8a463b76c89 100644 --- a/drivers/gpu/drm/nouveau/nouveau_sgdma.c +++ b/drivers/gpu/drm/nouveau/nouveau_sgdma.c @@ -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