Przeglądaj źródła

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>
Christian König 8 lat temu
rodzic
commit
ecdba5db88
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

+ 1 - 0
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;
 }