From: Christian König Date: Fri, 7 Apr 2017 08:40:04 +0000 (+0200) Subject: drm/amdgpu: fix "fix 64bit division" X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ecdba5db88f661c8b548a6ba15db26463b465996;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/amdgpu: fix "fix 64bit division" The offset must be 64bit and add back the accidential dropped line. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher --- 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; }