summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vmwgfx
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-10-19 10:13:13 +0300
committerDave Airlie <airlied@redhat.com>2020-10-19 22:04:04 +0300
commitc37d951cb42aa340513c0bc2df10b7324fa0d856 (patch)
tree83d533b60aed4bde40bbaf2171e3cb06e7fcc8dc /drivers/gpu/drm/vmwgfx
parenta07e32bda0265b62ed0f85fbdfcd316c1dfc98ca (diff)
downloadlinux-c37d951cb42aa340513c0bc2df10b7324fa0d856.tar.xz
drm/ttm: add move old to system to drivers.
Uninline ttm_bo_move_ttm. Eventually want to unhook the unbind out. Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201019071314.1671485-5-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/vmwgfx')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
index 112253246f08..c5cf81c09971 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
@@ -735,13 +735,18 @@ static int vmw_move(struct ttm_buffer_object *bo,
{
struct ttm_resource_manager *old_man = ttm_manager_type(bo->bdev, bo->mem.mem_type);
struct ttm_resource_manager *new_man = ttm_manager_type(bo->bdev, new_mem->mem_type);
+ int ret;
if (old_man->use_tt && new_man->use_tt) {
if (bo->mem.mem_type == TTM_PL_SYSTEM) {
ttm_bo_assign_mem(bo, new_mem);
return 0;
}
- return ttm_bo_move_ttm(bo, ctx, new_mem);
+ ret = ttm_bo_move_to_system(bo, ctx);
+ if (ret)
+ return ret;
+ ttm_bo_assign_mem(bo, new_mem);
+ return 0;
} else {
return ttm_bo_move_memcpy(bo, ctx, new_mem);
}