Commit ad78069c authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: fix BO move offsets

It's pretty pointless to get the offset first and then initialize it.

Should fix issues with the new GTT manager.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 98b480db
...@@ -272,8 +272,6 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo, ...@@ -272,8 +272,6 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo,
adev = amdgpu_get_adev(bo->bdev); adev = amdgpu_get_adev(bo->bdev);
ring = adev->mman.buffer_funcs_ring; ring = adev->mman.buffer_funcs_ring;
old_start = (u64)old_mem->start << PAGE_SHIFT;
new_start = (u64)new_mem->start << PAGE_SHIFT;
switch (old_mem->mem_type) { switch (old_mem->mem_type) {
case TTM_PL_TT: case TTM_PL_TT:
...@@ -282,6 +280,7 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo, ...@@ -282,6 +280,7 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo,
return r; return r;
case TTM_PL_VRAM: case TTM_PL_VRAM:
old_start = (u64)old_mem->start << PAGE_SHIFT;
old_start += bo->bdev->man[old_mem->mem_type].gpu_offset; old_start += bo->bdev->man[old_mem->mem_type].gpu_offset;
break; break;
default: default:
...@@ -295,6 +294,7 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo, ...@@ -295,6 +294,7 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo,
return r; return r;
case TTM_PL_VRAM: case TTM_PL_VRAM:
new_start = (u64)new_mem->start << PAGE_SHIFT;
new_start += bo->bdev->man[new_mem->mem_type].gpu_offset; new_start += bo->bdev->man[new_mem->mem_type].gpu_offset;
break; break;
default: default:
......
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