Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/radeon: Use ttm_bo_move_null() in radeon_bo_move()

Since ttm_bo_move_null() is exactly the same as ttm_resource_free() +
ttm_bo_assign_mem(), we use ttm_bo_move_null() for the GTT --> SYSTEM
move case too. Then the code is more consistent as the SYSTEM --> GTT
move case.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Huacai Chen and committed by
Alex Deucher
18ab7e88 466a59ab

+1 -2
+1 -2
drivers/gpu/drm/radeon/radeon_ttm.c
··· 219 219 if (old_mem->mem_type == TTM_PL_TT && 220 220 new_mem->mem_type == TTM_PL_SYSTEM) { 221 221 radeon_ttm_tt_unbind(bo->bdev, bo->ttm); 222 - ttm_resource_free(bo, &bo->resource); 223 - ttm_bo_assign_mem(bo, new_mem); 222 + ttm_bo_move_null(bo, new_mem); 224 223 goto out; 225 224 } 226 225 if (rdev->ring[radeon_copy_ring_index(rdev)].ready &&