diff options
author | Christian König <christian.koenig@amd.com> | 2016-09-21 10:38:14 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-09-28 23:16:24 +0300 |
commit | ad78069c333b6d80958794d073d85f7c428a2213 (patch) | |
tree | 9236f661ca2bcfb2c0ef624329618104fd84d4c1 /drivers/gpu/drm/amd | |
parent | 98b480dba9d9c502480a69396c4f06698fcdaac1 (diff) | |
download | linux-ad78069c333b6d80958794d073d85f7c428a2213.tar.xz |
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: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 9660026c99d6..61a885b5a6a1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -272,8 +272,6 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo, adev = amdgpu_get_adev(bo->bdev); 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) { case TTM_PL_TT: @@ -282,6 +280,7 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo, return r; case TTM_PL_VRAM: + old_start = (u64)old_mem->start << PAGE_SHIFT; old_start += bo->bdev->man[old_mem->mem_type].gpu_offset; break; default: @@ -295,6 +294,7 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo, return r; case TTM_PL_VRAM: + new_start = (u64)new_mem->start << PAGE_SHIFT; new_start += bo->bdev->man[new_mem->mem_type].gpu_offset; break; default: |