diff options
author | Dave Airlie <airlied@redhat.com> | 2020-10-20 11:03:15 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-10-21 13:43:43 +1000 |
commit | 29a1d482e4044ab76d0c0f6341212f1a51f48236 (patch) | |
tree | d50578334cc3944eb1fccf0bc7147b9103182456 /drivers/gpu/drm/ttm | |
parent | a2dcf77f7583e13510da0f0ab75a2230f1af915c (diff) |
drm/ttm: add move to system into drivers
This moves the to system move into the drivers, and moves all
the unbinds in the move path under driver control
Note: radeon/nouveau already wait so don't duplicate it.
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-4-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo_util.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index 5cfcb92a6d30..65f042d6da7c 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c @@ -65,27 +65,6 @@ int ttm_bo_move_to_new_tt_mem(struct ttm_buffer_object *bo, return 0; } -int ttm_bo_move_to_system(struct ttm_buffer_object *bo, - struct ttm_operation_ctx *ctx) -{ - int ret; - - if (bo->mem.mem_type == TTM_PL_SYSTEM) - return 0; - - ret = ttm_bo_wait_ctx(bo, ctx); - if (unlikely(ret != 0)) { - if (ret != -ERESTARTSYS) - pr_err("Failed to expire sync object before unbinding TTM\n"); - return ret; - } - - ttm_bo_tt_unbind(bo); - ttm_resource_free(bo, &bo->mem); - return 0; -} -EXPORT_SYMBOL(ttm_bo_move_to_system); - int ttm_mem_io_reserve(struct ttm_bo_device *bdev, struct ttm_resource *mem) { |