Commit 470cfe71 authored by Christian König's avatar Christian König

drm/nouveau: stop using pages with drm_prime_sg_to_page_addr_arrays v2

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: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/403835/
parent 4e7b9000
...@@ -1235,9 +1235,9 @@ nouveau_ttm_tt_populate(struct ttm_bo_device *bdev, ...@@ -1235,9 +1235,9 @@ nouveau_ttm_tt_populate(struct ttm_bo_device *bdev,
return 0; return 0;
if (slave && ttm->sg) { if (slave && ttm->sg) {
/* make userspace faulting work */ drm_prime_sg_to_page_addr_arrays(ttm->sg, NULL,
drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages, ttm_dma->dma_address,
ttm_dma->dma_address, ttm->num_pages); ttm->num_pages);
return 0; return 0;
} }
......
...@@ -84,7 +84,7 @@ nouveau_sgdma_create_ttm(struct ttm_buffer_object *bo, uint32_t page_flags) ...@@ -84,7 +84,7 @@ nouveau_sgdma_create_ttm(struct ttm_buffer_object *bo, uint32_t page_flags)
if (!nvbe) if (!nvbe)
return NULL; 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); kfree(nvbe);
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment