[PATCH] drm/amdgpu: fix "fix 64bit division"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Evan Quan <evan.quan at amd.com>

>-----Original Message-----
>From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf Of
>Christian K?nig
>Sent: Friday, April 07, 2017 4:44 PM
>To: amd-gfx at lists.freedesktop.org
>Subject: [PATCH] drm/amdgpu: fix "fix 64bit division"
>
>From: Christian König <christian.koenig at amd.com>
>
>The offset must be 64bit and add back the accidential dropped line.
>
>Signed-off-by: Christian König <christian.koenig at amd.com>
>---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>index c91f13b..ba11ff254 100644
>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>@@ -551,9 +551,10 @@ static unsigned long amdgpu_ttm_io_mem_pfn(struct
>ttm_buffer_object *bo,
> {
> 	struct drm_mm_node *mm = bo->mem.mm_node;
> 	uint64_t size = mm->size;
>-	unsigned long offset = page_offset;
>+	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.7.4
>
>_______________________________________________
>amd-gfx mailing list
>amd-gfx at lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux