summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ttm/ttm_bo.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-10-06 03:06:44 +0300
committerDave Airlie <airlied@redhat.com>2020-10-07 08:42:00 +0300
commit8e6cb56b67fe2a57c0da8f8dea93dfab863d8935 (patch)
tree2cd90fe6845ba597366e2377d73c413158f89d0f /drivers/gpu/drm/ttm/ttm_bo.c
parent2b8283ff1a60d201e92f0d48c4918a035dbe82fe (diff)
downloadlinux-8e6cb56b67fe2a57c0da8f8dea93dfab863d8935.tar.xz
drm/ttm: make move callback compulstory
All drivers should have a move callback now so make it compulsory. Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201006000644.1005758-6-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index e11e8eaa6602..88d215de9ae1 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -270,18 +270,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
if (bdev->driver->move_notify)
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);
- } else {
- ret = ttm_bo_move_memcpy(bo, ctx, mem);
- }
-
+ ret = bdev->driver->move(bo, evict, ctx, mem);
if (ret) {
if (bdev->driver->move_notify) {
swap(*mem, bo->mem);