]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drm/amdgpu: fix "fix 64bit division"
authorChristian König <christian.koenig@amd.com>
Fri, 7 Apr 2017 08:40:04 +0000 (10:40 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 7 Apr 2017 19:15:44 +0000 (15:15 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

index 7e993259c2e919b59cb56a1f8072a6948247a238..35d53a0d9ba685d3b2ce038506481d94321fb1a8 100644 (file)
@@ -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;
 }