Merge branch 'for-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / nouveau / nouveau_sgdma.c
index 47f245edf538f10534824a034a36a4b3bcd85aaa..38483a042bc22828026764b0e2a4817ba01e54de 100644 (file)
@@ -290,7 +290,10 @@ nv50_sgdma_bind(struct ttm_tt *ttm, struct ttm_mem_reg *mem)
        struct nouveau_mem *node = mem->mm_node;
 
        /* noop: bound in move_notify() */
-       node->pages = nvbe->ttm.dma_address;
+       if (ttm->sg) {
+               node->sg = ttm->sg;
+       } else
+               node->pages = nvbe->ttm.dma_address;
        return 0;
 }
 
@@ -338,10 +341,10 @@ nouveau_sgdma_init(struct drm_device *dev)
        u32 aper_size, align;
        int ret;
 
-       if (dev_priv->card_type >= NV_40 && pci_is_pcie(dev->pdev))
+       if (dev_priv->card_type >= NV_40)
                aper_size = 512 * 1024 * 1024;
        else
-               aper_size = 64 * 1024 * 1024;
+               aper_size = 128 * 1024 * 1024;
 
        /* Dear NVIDIA, NV44+ would like proper present bits in PTEs for
         * christmas.  The cards before it have them, the cards after