diff options
author | Dave Airlie <airlied@redhat.com> | 2020-09-15 11:02:12 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-09-16 09:33:53 +1000 |
commit | 2ff6e69c0449846197c52d7c591b983e23e3e3c9 (patch) | |
tree | 2721ddf4aee13ee345276163777078231e9e9ea9 /drivers/gpu/drm/ttm/ttm_bo_util.c | |
parent | 7eec915138279d7a83ff8f219846bf7c8ae637c1 (diff) |
drm/ttm: wrap tt destroy. (v2)
All places this was called was using bo->ttm either direct
or indirectly.
v2: move to ttm_bo
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200915024007.67163-3-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo_util.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo_util.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index 44b47ccdeaf7..0d2f3bc5df92 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c @@ -297,10 +297,8 @@ out2: *old_mem = *new_mem; new_mem->mm_node = NULL; - if (!man->use_tt) { - ttm_tt_destroy(bdev, ttm); - bo->ttm = NULL; - } + if (!man->use_tt) + ttm_bo_tt_destroy(bo); out1: ttm_resource_iounmap(bdev, old_mem, new_iomap); @@ -542,10 +540,8 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo, if (ret) return ret; - if (!man->use_tt) { - ttm_tt_destroy(bdev, bo->ttm); - bo->ttm = NULL; - } + if (!man->use_tt) + ttm_bo_tt_destroy(bo); ttm_bo_free_old_node(bo); } else { /** @@ -665,10 +661,8 @@ int ttm_bo_pipeline_move(struct ttm_buffer_object *bo, if (ret) return ret; - if (!to->use_tt) { - ttm_tt_destroy(bdev, bo->ttm); - bo->ttm = NULL; - } + if (!to->use_tt) + ttm_bo_tt_destroy(bo); ttm_bo_free_old_node(bo); } |