Re: [PATCH] drm/amdgpu: Fix unaligned memory copies

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

 



Am 15.07.19 um 18:12 schrieb Alex Deucher:
On Sat, Jul 13, 2019 at 2:43 AM Kuehling, Felix <Felix.Kuehling@xxxxxxx> wrote:
When starting a new mm_node, the page_offset becomes 0.

Signed-off-by: Felix Kuehling <Felix.Kuehling@xxxxxxx>
Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>

Reviewed-by: Christian König <christian.koenig@xxxxxxx>


---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 37d9a3b09946..d0f6c23ec7cf 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -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

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
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