diff options
author | Christian König <christian.koenig@amd.com> | 2017-10-16 11:24:21 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-04 16:33:16 -0500 |
commit | 4ff23be3d50a142ed0787fa6f276afc02ac2577d (patch) | |
tree | f6f7cfecbc21e9210ab4c1918719196b2f62f32b | |
parent | 2a018f28a8996114515c29d8db4d8ec392306e43 (diff) |
drm/amdgpu: remove extra parameter from amdgpu_ttm_bind() v2
We always use the BO mem now.
v2: minor rebase
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index bf1aad00bb8d..43df84c13f21 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
@@ -684,7 +684,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, | |||
684 | if (!r && p->uf_entry.robj) { | 684 | if (!r && p->uf_entry.robj) { |
685 | struct amdgpu_bo *uf = p->uf_entry.robj; | 685 | struct amdgpu_bo *uf = p->uf_entry.robj; |
686 | 686 | ||
687 | r = amdgpu_ttm_bind(&uf->tbo, &uf->tbo.mem); | 687 | r = amdgpu_ttm_bind(&uf->tbo); |
688 | p->job->uf_addr += amdgpu_bo_gpu_offset(uf); | 688 | p->job->uf_addr += amdgpu_bo_gpu_offset(uf); |
689 | } | 689 | } |
690 | 690 | ||
@@ -1601,5 +1601,5 @@ int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser, | |||
1601 | return r; | 1601 | return r; |
1602 | } | 1602 | } |
1603 | 1603 | ||
1604 | return amdgpu_ttm_bind(&(*bo)->tbo, &(*bo)->tbo.mem); | 1604 | return amdgpu_ttm_bind(&(*bo)->tbo); |
1605 | } | 1605 | } |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 6d4b22fdc1b4..589aa5099881 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |||
@@ -688,7 +688,7 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain, | |||
688 | goto error; | 688 | goto error; |
689 | } | 689 | } |
690 | 690 | ||
691 | r = amdgpu_ttm_bind(&bo->tbo, &bo->tbo.mem); | 691 | r = amdgpu_ttm_bind(&bo->tbo); |
692 | if (unlikely(r)) { | 692 | if (unlikely(r)) { |
693 | dev_err(adev->dev, "%p bind failed\n", bo); | 693 | dev_err(adev->dev, "%p bind failed\n", bo); |
694 | goto error; | 694 | goto error; |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 470b911200ae..6a724f9f1b86 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |||
@@ -889,7 +889,7 @@ bool amdgpu_ttm_is_bound(struct ttm_tt *ttm) | |||
889 | return gtt && !list_empty(>t->list); | 889 | return gtt && !list_empty(>t->list); |
890 | } | 890 | } |
891 | 891 | ||
892 | int amdgpu_ttm_bind(struct ttm_buffer_object *bo, struct ttm_mem_reg *bo_mem) | 892 | int amdgpu_ttm_bind(struct ttm_buffer_object *bo) |
893 | { | 893 | { |
894 | struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev); | 894 | struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev); |
895 | struct ttm_tt *ttm = bo->ttm; | 895 | struct ttm_tt *ttm = bo->ttm; |
@@ -1628,7 +1628,7 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo, | |||
1628 | } | 1628 | } |
1629 | 1629 | ||
1630 | if (bo->tbo.mem.mem_type == TTM_PL_TT) { | 1630 | if (bo->tbo.mem.mem_type == TTM_PL_TT) { |
1631 | r = amdgpu_ttm_bind(&bo->tbo, &bo->tbo.mem); | 1631 | r = amdgpu_ttm_bind(&bo->tbo); |
1632 | if (r) | 1632 | if (r) |
1633 | return r; | 1633 | return r; |
1634 | } | 1634 | } |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h index abd4084982a3..0108a59559cd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | |||
@@ -91,7 +91,7 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo, | |||
91 | 91 | ||
92 | int amdgpu_mmap(struct file *filp, struct vm_area_struct *vma); | 92 | int amdgpu_mmap(struct file *filp, struct vm_area_struct *vma); |
93 | bool amdgpu_ttm_is_bound(struct ttm_tt *ttm); | 93 | bool amdgpu_ttm_is_bound(struct ttm_tt *ttm); |
94 | int amdgpu_ttm_bind(struct ttm_buffer_object *bo, struct ttm_mem_reg *bo_mem); | 94 | int amdgpu_ttm_bind(struct ttm_buffer_object *bo); |
95 | int amdgpu_ttm_recover_gart(struct amdgpu_device *adev); | 95 | int amdgpu_ttm_recover_gart(struct amdgpu_device *adev); |
96 | 96 | ||
97 | int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages); | 97 | int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages); |