[PATCH 1/7] drm/radeon: stop using pages with drm_prime_sg_to_page_addr_arrays v2
Christian König
ckoenig.leichtzumerken at gmail.com
Fri Nov 27 14:11:05 UTC 2020
Ping? Daniel any more ideas on this or should we push it?
Thanks,
Christian.
Am 25.11.20 um 13:59 schrieb Christian König:
> This is deprecated.
>
> v2: also use ttm_sg_tt_init to avoid allocating the page array.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
> drivers/gpu/drm/radeon/radeon_ttm.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> index 0ca381b95d3d..5d00b3dff388 100644
> --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> @@ -401,8 +401,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;
>
> @@ -542,7 +542,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;
> }
> @@ -580,8 +580,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;
> }
>
More information about the dri-devel
mailing list