diff options
author | Christian König <christian.koenig@amd.com> | 2018-02-23 16:08:51 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-03-14 14:38:24 -0500 |
commit | e89d0d332b7554f149648d293c2b6c77b79be529 (patch) | |
tree | cff9854138b6f538e3365bfbb450cb9d7df2b2ec /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
parent | 75a57669cbc881032c60615a31bfc6bfab4c813c (diff) | |
download | lwn-e89d0d332b7554f149648d293c2b6c77b79be529.tar.gz lwn-e89d0d332b7554f149648d293c2b6c77b79be529.zip |
drm/amdgpu: stop allocating a page array for prime shared BOs
We don't need the page array for prime shared BOs, stop allocating it.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index c2fae04d769a..7187457b20fb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -995,7 +995,7 @@ static struct ttm_tt *amdgpu_ttm_tt_create(struct ttm_bo_device *bdev, return NULL; } gtt->ttm.ttm.func = &amdgpu_backend_func; - if (ttm_dma_tt_init(>t->ttm, bdev, size, page_flags)) { + if (ttm_sg_tt_init(>t->ttm, bdev, size, page_flags)) { kfree(gtt); return NULL; } @@ -1021,7 +1021,8 @@ static int amdgpu_ttm_tt_populate(struct ttm_tt *ttm, if (slave && ttm->sg) { drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages, - gtt->ttm.dma_address, ttm->num_pages); + gtt->ttm.dma_address, + ttm->num_pages); ttm->state = tt_unbound; return 0; } |