}
/* move/bind old memory to GTT space */
- r = ttm_bo_move_to_new_tt_mem(bo, ctx, &tmp_mem);
+ r = ttm_tt_populate(bo->bdev, bo->ttm, ctx);
+ if (unlikely(r))
+ return r;
+
+ r = amdgpu_ttm_backend_bind(bo->bdev, bo->ttm, &tmp_mem);
if (unlikely(r)) {
goto out_cleanup;
}
+
ttm_bo_assign_mem(bo, &tmp_mem);
/* copy to VRAM */
r = amdgpu_move_blit(bo, evict, new_mem, old_mem);
if (ret)
return ret;
- ret = ttm_bo_move_to_new_tt_mem(bo, ctx, &tmp_reg);
- if (ret)
- goto out;
+ ret = ttm_tt_populate(bo->bdev, bo->ttm, ctx);
+ if (unlikely(ret != 0))
+ return ret;
+
+ ret = nouveau_ttm_tt_bind(bo->bdev, bo->ttm, &tmp_reg);
+ if (unlikely(ret != 0))
+ return ret;
ttm_bo_assign_mem(bo, &tmp_reg);
ret = nouveau_bo_move_m2mf(bo, true, ctx, new_reg);
if (unlikely(r)) {
return r;
}
- r = ttm_bo_move_to_new_tt_mem(bo, ctx, &tmp_mem);
- if (unlikely(r)) {
+
+ r = ttm_tt_populate(bo->bdev, bo->ttm, ctx);
+ if (unlikely(r))
goto out_cleanup;
- }
+
+ r = radeon_ttm_tt_bind(bo->bdev, bo->ttm, &tmp_mem);
+ if (unlikely(r))
+ goto out_cleanup;
+
ttm_bo_assign_mem(bo, &tmp_mem);
r = radeon_move_blit(bo, true, new_mem, old_mem);
if (unlikely(r)) {
return 0;
}
-EXPORT_SYMBOL(ttm_bo_move_to_new_tt_mem);
int ttm_bo_move_to_system(struct ttm_buffer_object *bo,
struct ttm_operation_ctx *ctx)