drm/amdgpu: remove extra parameter from amdgpu_ttm_bind() v2
authorChristian König <christian.koenig@amd.com>
Mon, 16 Oct 2017 15:24:21 +0000 (17:24 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Dec 2017 21:33:16 +0000 (16:33 -0500)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h

index bf1aad00bb8da9905171a4e09a1cb52f7821fab3..43df84c13f21e75119367e85bb58c5b6d894db96 100644 (file)
@@ -684,7 +684,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
        if (!r && p->uf_entry.robj) {
                struct amdgpu_bo *uf = p->uf_entry.robj;
 
-               r = amdgpu_ttm_bind(&uf->tbo, &uf->tbo.mem);
+               r = amdgpu_ttm_bind(&uf->tbo);
                p->job->uf_addr += amdgpu_bo_gpu_offset(uf);
        }
 
@@ -1601,5 +1601,5 @@ int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser,
                        return r;
        }
 
-       return amdgpu_ttm_bind(&(*bo)->tbo, &(*bo)->tbo.mem);
+       return amdgpu_ttm_bind(&(*bo)->tbo);
 }
index 6d4b22fdc1b4e23afe0517a6b8ea3b8ce31b1e1c..589aa50998817ffdcb1ff003447d424b1d0eee4f 100644 (file)
@@ -688,7 +688,7 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
                goto error;
        }
 
-       r = amdgpu_ttm_bind(&bo->tbo, &bo->tbo.mem);
+       r = amdgpu_ttm_bind(&bo->tbo);
        if (unlikely(r)) {
                dev_err(adev->dev, "%p bind failed\n", bo);
                goto error;
index 470b911200ae16e6dc95c6191e6859927878f379..6a724f9f1b86c2c97658e79a747075a763156076 100644 (file)
@@ -889,7 +889,7 @@ bool amdgpu_ttm_is_bound(struct ttm_tt *ttm)
        return gtt && !list_empty(&gtt->list);
 }
 
-int amdgpu_ttm_bind(struct ttm_buffer_object *bo, struct ttm_mem_reg *bo_mem)
+int amdgpu_ttm_bind(struct ttm_buffer_object *bo)
 {
        struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev);
        struct ttm_tt *ttm = bo->ttm;
@@ -1628,7 +1628,7 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo,
        }
 
        if (bo->tbo.mem.mem_type == TTM_PL_TT) {
-               r = amdgpu_ttm_bind(&bo->tbo, &bo->tbo.mem);
+               r = amdgpu_ttm_bind(&bo->tbo);
                if (r)
                        return r;
        }
index abd4084982a3a14e1303046b479efd679f8396dd..0108a59559cd8d26b241cded73a6e493a30a7035 100644 (file)
@@ -91,7 +91,7 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo,
 
 int amdgpu_mmap(struct file *filp, struct vm_area_struct *vma);
 bool amdgpu_ttm_is_bound(struct ttm_tt *ttm);
-int amdgpu_ttm_bind(struct ttm_buffer_object *bo, struct ttm_mem_reg *bo_mem);
+int amdgpu_ttm_bind(struct ttm_buffer_object *bo);
 int amdgpu_ttm_recover_gart(struct amdgpu_device *adev);
 
 int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages);