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: Christian König <christian.koenig@amd.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/403835/
This commit is contained in:
parent
4e7b9000b6
commit
470cfe71b4
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user