Commit 81597303 authored by Flora Cui's avatar Flora Cui Committed by Alex Deucher

drm/amdgpu: fix gtt_mgr bo's offset

Signed-off-by: default avatarFlora Cui <Flora.Cui@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2befa60e
...@@ -128,8 +128,9 @@ int amdgpu_gtt_mgr_alloc(struct ttm_mem_type_manager *man, ...@@ -128,8 +128,9 @@ int amdgpu_gtt_mgr_alloc(struct ttm_mem_type_manager *man,
if (!r) { if (!r) {
mem->start = node->start; mem->start = node->start;
tbo->offset = (tbo->mem.start << PAGE_SHIFT) + if (&tbo->mem == mem)
tbo->bdev->man[tbo->mem.mem_type].gpu_offset; tbo->offset = (tbo->mem.start << PAGE_SHIFT) +
tbo->bdev->man[tbo->mem.mem_type].gpu_offset;
} }
return r; return r;
......
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