forked from Minki/linux
drm/amdgpu: fix gtt_mgr bo's offset
Signed-off-by: Flora Cui <Flora.Cui@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
2befa60e4c
commit
8159730394
@ -128,8 +128,9 @@ int amdgpu_gtt_mgr_alloc(struct ttm_mem_type_manager *man,
|
||||
|
||||
if (!r) {
|
||||
mem->start = node->start;
|
||||
tbo->offset = (tbo->mem.start << PAGE_SHIFT) +
|
||||
tbo->bdev->man[tbo->mem.mem_type].gpu_offset;
|
||||
if (&tbo->mem == mem)
|
||||
tbo->offset = (tbo->mem.start << PAGE_SHIFT) +
|
||||
tbo->bdev->man[tbo->mem.mem_type].gpu_offset;
|
||||
}
|
||||
|
||||
return r;
|
||||
|
Loading…
Reference in New Issue
Block a user