Commit 8e6cb56b authored by Dave Airlie's avatar Dave Airlie

drm/ttm: make move callback compulstory

All drivers should have a move callback now so make it compulsory.
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201006000644.1005758-6-airlied@gmail.com
parent 2b8283ff
...@@ -270,18 +270,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo, ...@@ -270,18 +270,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
if (bdev->driver->move_notify) if (bdev->driver->move_notify)
bdev->driver->move_notify(bo, evict, mem); bdev->driver->move_notify(bo, evict, mem);
if (old_man->use_tt && new_man->use_tt) {
if (bo->mem.mem_type == TTM_PL_SYSTEM) {
ttm_bo_assign_mem(bo, mem);
ret = 0;
} else
ret = ttm_bo_move_ttm(bo, ctx, mem);
} else if (bdev->driver->move) {
ret = bdev->driver->move(bo, evict, ctx, mem); ret = bdev->driver->move(bo, evict, ctx, mem);
} else {
ret = ttm_bo_move_memcpy(bo, ctx, mem);
}
if (ret) { if (ret) {
if (bdev->driver->move_notify) { if (bdev->driver->move_notify) {
swap(*mem, bo->mem); swap(*mem, bo->mem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment