drm/amdgpu: Fix unaligned memory copies
Subsystems (2)
PATCH 1/1 drm/amdgpu: Fix unaligned memory copies
When starting a new mm_node, the page_offset becomes 0.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +2 -0
@@ -386,6 +386,7 @@ int amdgpu_ttm_copy_mem_to_mem(struct amdgpu_device *adev, src_node_start =amdgpu_mm_node_addr (src->bo, ++src_mm, src->mem); src_node_size = (src_mm->size <<PAGE_SHIFT ); + src_page_offset =0 ; }else { src_node_start += cur_size; src_page_offset = src_node_start & (PAGE_SIZE -1 );
@@ -395,6 +396,7 @@ int amdgpu_ttm_copy_mem_to_mem(struct amdgpu_device *adev, dst_node_start =amdgpu_mm_node_addr (dst->bo, ++dst_mm, dst->mem); dst_node_size = (dst_mm->size <<PAGE_SHIFT ); + dst_page_offset =0 ; }else { dst_node_start += cur_size; dst_page_offset = dst_node_start & (PAGE_SIZE -1 );
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20190713064245.20097-1-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org
Alex Deucher
Reviewed-byQuoted 4 lines · Felix
When starting a new
mm_node, thepage_offsetbecomes 0.Signed-off-by Felix Kuehling <[email protected]>
Quoted 27 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +2
-1@@ -386,6 +386,7 @@ int amdgpu_ttm_copy_mem_to_mem(struct amdgpu_device *adev, src_node_start =amdgpu_mm_node_addr (src->bo, ++src_mm, src->mem); src_node_size = (src_mm->size <<PAGE_SHIFT ); + src_page_offset =0 ; }else { src_node_start += cur_size; src_page_offset = src_node_start & (PAGE_SIZE -1 );@@ -395,6 +396,7 @@ int amdgpu_ttm_copy_mem_to_mem(struct amdgpu_device *adev, dst_node_start =amdgpu_mm_node_addr (dst->bo, ++dst_mm, dst->mem); dst_node_size = (dst_mm->size <<PAGE_SHIFT ); + dst_page_offset =0 ; }else { dst_node_start += cur_size; dst_page_offset = dst_node_start & (PAGE_SIZE -1 ); --2.17.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CADnq5_OCXiEoPU5+K2-NQ+9zNMVRd2mMwY6NYeK6Jp0ssLcjtg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Christian König
Reviewed-byAm 15.07.19 um 18:12 schrieb Alex Deucher:
Quoted 5 lines · Felix
Quoted 3 lines
When starting a new
mm_node, thepage_offsetbecomes 0.Signed-off-by Felix Kuehling <[email protected]>Reviewed-by Alex Deucher <[email protected]>
Quoted 28 lines
Quoted 28 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +2
-1@@ -386,6 +386,7 @@ int amdgpu_ttm_copy_mem_to_mem(struct amdgpu_device *adev, src_node_start =amdgpu_mm_node_addr (src->bo, ++src_mm, src->mem); src_node_size = (src_mm->size <<PAGE_SHIFT ); + src_page_offset =0 ; }else { src_node_start += cur_size; src_page_offset = src_node_start & (PAGE_SIZE -1 );@@ -395,6 +396,7 @@ int amdgpu_ttm_copy_mem_to_mem(struct amdgpu_device *adev, dst_node_start =amdgpu_mm_node_addr (dst->bo, ++dst_mm, dst->mem); dst_node_size = (dst_mm->size <<PAGE_SHIFT ); + dst_page_offset =0 ; }else { dst_node_start += cur_size; dst_page_offset = dst_node_start & (PAGE_SIZE -1 ); --2.17.1
Quoted 8 lines
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx