summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_ttm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-10-20 03:03:19 +0200
committerDave Airlie <airlied@redhat.com>2020-10-21 05:46:07 +0200
commitbfe5e585b44fb810e33fe54d4d822c6b2b40488c (patch)
tree8146d94025f603d0903a81918a830dd124cd4d68 /drivers/gpu/drm/radeon/radeon_ttm.c
parentdrm/ttm: drop move notify around move. (diff)
downloadlinux-bfe5e585b44fb810e33fe54d4d822c6b2b40488c.tar.xz
linux-bfe5e585b44fb810e33fe54d4d822c6b2b40488c.zip
drm/ttm: move last binding into the drivers.
This moves the call to tt binding into the driver move, and drops the driver callback. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201020010319.1692445-8-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ttm.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ttm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index e9c95ef0859b..cd454e5c802f 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -311,6 +311,11 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,
struct ttm_resource *old_mem = &bo->mem;
int r;
+ if (new_mem->mem_type == TTM_PL_TT) {
+ r = radeon_ttm_tt_bind(bo->bdev, bo->ttm, new_mem);
+ if (r)
+ return r;
+ }
radeon_bo_move_notify(bo, evict, new_mem);
r = ttm_bo_wait_ctx(bo, ctx);
@@ -823,7 +828,6 @@ static struct ttm_bo_driver radeon_bo_driver = {
.ttm_tt_create = &radeon_ttm_tt_create,
.ttm_tt_populate = &radeon_ttm_tt_populate,
.ttm_tt_unpopulate = &radeon_ttm_tt_unpopulate,
- .ttm_tt_bind = &radeon_ttm_tt_bind,
.ttm_tt_destroy = &radeon_ttm_tt_destroy,
.eviction_valuable = ttm_bo_eviction_valuable,
.evict_flags = &radeon_evict_flags,