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/vmwgfx/vmwgfx_ttm_buffer.c | |
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/vmwgfx/vmwgfx_ttm_buffer.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c index c5cf81c09971..1d220a9794e6 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c @@ -742,9 +742,12 @@ static int vmw_move(struct ttm_buffer_object *bo, ttm_bo_assign_mem(bo, new_mem); return 0; } - ret = ttm_bo_move_to_system(bo, ctx); + ret = ttm_bo_wait_ctx(bo, ctx); if (ret) return ret; + + vmw_ttm_unbind(bo->bdev, bo->ttm); + ttm_resource_free(bo, &bo->mem); ttm_bo_assign_mem(bo, new_mem); return 0; } else { |