diff options
author | Christian König <christian.koenig@amd.com> | 2020-10-08 14:01:35 +0300 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2020-11-30 16:59:44 +0300 |
commit | 0575ff3d33cd62123991d2a5d0d8459d72592388 (patch) | |
tree | fc102ccf20f8872e61e97a9fdc3e1673fec009b8 /drivers/gpu/drm/radeon | |
parent | f5ca8eb6f9bd5ea76e11bbcee09528e2d71fa920 (diff) | |
download | linux-0575ff3d33cd62123991d2a5d0d8459d72592388.tar.xz |
drm/radeon: stop using pages with drm_prime_sg_to_page_addr_arrays v2
This is deprecated.
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/403832/
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_ttm.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 2b598141225f..917419bf1578 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -395,8 +395,8 @@ static int radeon_ttm_tt_pin_userptr(struct ttm_bo_device *bdev, struct ttm_tt * if (r) goto release_sg; - drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages, - gtt->ttm.dma_address, ttm->num_pages); + drm_prime_sg_to_page_addr_arrays(ttm->sg, NULL, gtt->ttm.dma_address, + ttm->num_pages); return 0; @@ -536,7 +536,7 @@ static struct ttm_tt *radeon_ttm_tt_create(struct ttm_buffer_object *bo, else caching = ttm_cached; - if (ttm_dma_tt_init(>t->ttm, bo, page_flags, caching)) { + if (ttm_sg_tt_init(>t->ttm, bo, page_flags, caching)) { kfree(gtt); return NULL; } @@ -574,8 +574,9 @@ static int radeon_ttm_tt_populate(struct ttm_bo_device *bdev, } if (slave && ttm->sg) { - drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages, - gtt->ttm.dma_address, ttm->num_pages); + drm_prime_sg_to_page_addr_arrays(ttm->sg, NULL, + gtt->ttm.dma_address, + ttm->num_pages); return 0; } |