Skip to content

Commit 18ab7e8

Browse files
chenhuacaialexdeucher
authored andcommitted
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 <[email protected]> Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 466a59a commit 18ab7e8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/gpu/drm/radeon/radeon_ttm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,
219219
if (old_mem->mem_type == TTM_PL_TT &&
220220
new_mem->mem_type == TTM_PL_SYSTEM) {
221221
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);
224223
goto out;
225224
}
226225
if (rdev->ring[radeon_copy_ring_index(rdev)].ready &&

0 commit comments

Comments
 (0)