From ecdba5db88f661c8b548a6ba15db26463b465996 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20K=C3=B6nig?= Date: Fri, 7 Apr 2017 10:40:04 +0200 Subject: [PATCH] drm/amdgpu: fix "fix 64bit division" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.20.1