drm/nouveau: stop using pages with drm_prime_sg_to_page_addr_arrays v2
authorChristian König <christian.koenig@amd.com>
Fri, 9 Oct 2020 13:44:48 +0000 (15:44 +0200)
committerChristian König <christian.koenig@amd.com>
Mon, 30 Nov 2020 14:00:02 +0000 (15:00 +0100)
This is deprecated, also drop the comment about faults.

v2: also use ttm_sg_tt_init to avoid allocating the page array.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/403835/
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_sgdma.c

index 7aa4286784aeafbb806dd2f486f50ccc4774058a..c30f088cefcc5f1a4cf22704c8e63d94bbc28199 100644 (file)
@@ -1235,9 +1235,9 @@ nouveau_ttm_tt_populate(struct ttm_bo_device *bdev,
                return 0;
 
        if (slave && ttm->sg) {
-               /* make userspace faulting work */
-               drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages,
-                                                ttm_dma->dma_address, ttm->num_pages);
+               drm_prime_sg_to_page_addr_arrays(ttm->sg, NULL,
+                                                ttm_dma->dma_address,
+                                                ttm->num_pages);
                return 0;
        }
 
index a2e23fd4906ce58edaee011af20f197f8cdae461..1cf52635ea74c541cd3f51b7bca882b7c8c33bc5 100644 (file)
@@ -84,7 +84,7 @@ nouveau_sgdma_create_ttm(struct ttm_buffer_object *bo, uint32_t page_flags)
        if (!nvbe)
                return NULL;
 
-       if (ttm_dma_tt_init(&nvbe->ttm, bo, page_flags, caching)) {
+       if (ttm_sg_tt_init(&nvbe->ttm, bo, page_flags, caching)) {
                kfree(nvbe);
                return NULL;
        }