Skip to content

Commit

Permalink
drm/amdgpu: Fix bus address in sg table export
Browse files Browse the repository at this point in the history
Change-Id: I4add5b6815000b9196a1336da9ae8167986c9417
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
  • Loading branch information
Harish Kasiviswanathan authored and Harish Kasiviswanathan committed Mar 15, 2018
1 parent 17d1ab1 commit d44196b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,8 @@ static int get_sg_table(struct amdgpu_device *adev,
goto out;

if (bo->preferred_domains == AMDGPU_GEM_DOMAIN_VRAM) {
bus_addr = bo->tbo.offset + adev->mc.aper_base + offset;
bus_addr = amdgpu_bo_gpu_offset(bo) - adev->mc.vram_start
+ adev->mc.aper_base + offset;

for_each_sg(sg->sgl, s, sg->orig_nents, i) {
uint64_t chunk_size, length;
Expand Down

0 comments on commit d44196b

Please sign in to comment.