summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-04-07 10:40:04 +0200
committerAlex Deucher <alexander.deucher@amd.com>2017-04-07 15:15:44 -0400
commitecdba5db88f661c8b548a6ba15db26463b465996 (patch)
tree96f91d3efd5974e49454c7e2a1cd5d091fa74637 /drivers/gpu/drm/amd
parent8250880ed87f806cc1f7964cd8ddda18d9014288 (diff)
downloadlinux-ecdba5db88f661c8b548a6ba15db26463b465996.tar.bz2
drm/amdgpu: fix "fix 64bit division"
The offset must be 64bit and add back the accidential dropped line. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Evan Quan <evan.quan@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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 7e993259c2e9..35d53a0d9ba6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -554,6 +554,7 @@ static unsigned long amdgpu_ttm_io_mem_pfn(struct ttm_buffer_object *bo,
uint64_t offset = page_offset;
page_offset = do_div(offset, size);
+ mm += offset;
return (bo->mem.bus.base >> PAGE_SHIFT) + mm->start + page_offset;
}