aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-10-19 17:13:13 +1000
committerDave Airlie <airlied@redhat.com>2020-10-20 05:04:04 +1000
commitc37d951cb42aa340513c0bc2df10b7324fa0d856 (patch)
tree83d533b60aed4bde40bbaf2171e3cb06e7fcc8dc /drivers/gpu/drm/nouveau
parentdrm/ttm: use new move interface for known system->ttm moves (diff)
downloadlinux-dev-c37d951cb42aa340513c0bc2df10b7324fa0d856.tar.xz
linux-dev-c37d951cb42aa340513c0bc2df10b7324fa0d856.zip
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/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 63baa9367851..ec79c3b251e8 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -897,7 +897,11 @@ nouveau_bo_move_flipd(struct ttm_buffer_object *bo, bool evict,
if (ret)
goto out;
- ret = ttm_bo_move_ttm(bo, ctx, new_reg);
+ ret = ttm_bo_move_to_system(bo, ctx);
+ if (ret)
+ goto out;
+
+ ttm_bo_assign_mem(bo, &tmp_reg);
out:
ttm_resource_free(bo, &tmp_reg);
return ret;
@@ -1048,7 +1052,10 @@ nouveau_bo_move(struct ttm_buffer_object *bo, bool evict,
if (old_reg->mem_type == TTM_PL_TT &&
new_reg->mem_type == TTM_PL_SYSTEM) {
- ret = ttm_bo_move_ttm(bo, ctx, new_reg);
+ ret = ttm_bo_move_to_system(bo, ctx);
+ if (ret)
+ return ret;
+ ttm_bo_assign_mem(bo, new_reg);
goto out;
}