summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-09-17 13:48:59 +1000
committerDave Airlie <airlied@redhat.com>2020-09-18 06:16:03 +1000
commitcae515f4a5d9e17eb1f0db1eef9028601ab2decf (patch)
tree29efdb77ddb35e50cea9139a28dc39fc0af97783 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
parent37bff6542c4e140a11657406c1bab50a40329cc1 (diff)
downloadlwn-cae515f4a5d9e17eb1f0db1eef9028601ab2decf.tar.gz
lwn-cae515f4a5d9e17eb1f0db1eef9028601ab2decf.zip
drm/ttm/drivers: call the bind function directly.
Now the bind functions have all the protection explicitly the drivers can just call them directly, and the api can be unexported Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200917043040.146575-5-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 2028b9e4c25c..a57aaf666340 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -63,6 +63,10 @@
#define AMDGPU_TTM_VRAM_MAX_DW_READ (size_t)128
+static int amdgpu_ttm_backend_bind(struct ttm_bo_device *bdev,
+ struct ttm_tt *ttm,
+ struct ttm_resource *bo_mem);
+
static int amdgpu_ttm_init_on_chip(struct amdgpu_device *adev,
unsigned int type,
uint64_t size)
@@ -552,7 +556,7 @@ static int amdgpu_move_vram_ram(struct ttm_buffer_object *bo, bool evict,
goto out_cleanup;
/* Bind the memory to the GTT space */
- r = ttm_bo_tt_bind(bo, &tmp_mem);
+ r = amdgpu_ttm_backend_bind(bo->bdev, bo->ttm, &tmp_mem);
if (unlikely(r)) {
goto out_cleanup;
}