drm/amdgpu: Add support for filling a buffer with 64 bit value
Subsystems (2)
PATCH 1/2 drm/amdgpu: Add support for filling a buffer with 64 bit value
That function will be used later to support setting a page table block with 64 bit value.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 19 +++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +13 -6
@@ -1509,11 +1509,12 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, }int amdgpu_fill_buffer (struct amdgpu_bo *bo, -uint32_t src_data, -struct reservation_object *resv, -struct dma_fence **fence) +uint64_t src_data, +struct reservation_object *resv, +struct dma_fence **fence) {struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev); +/* max_bytes applies to SDMA_OP_PTEPDE as well as SDMA_OP_CONST_FILL*/ uint32_t max_bytes = adev->mman.buffer_funcs->fill_max_bytes;struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring;
@@ -1545,7 +1546,9 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo, num_pages -= mm_node->size; ++mm_node; } - num_dw = num_loops * adev->mman.buffer_funcs->fill_num_dw; + +/* 10 double words for each SDMA_OP_PTEPDE cmd */ + num_dw = num_loops *10 ;/* for IB padding */ num_dw +=64 ;
@@ -1570,12 +1573,16 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo,uint32_t byte_count = mm_node->size <<PAGE_SHIFT ;uint64_t dst_addr; +WARN_ONCE (byte_count &0x7 ,"size should be a multiple of 8" ); + dst_addr =amdgpu_mm_node_addr (&bo->tbo, mm_node, &bo->tbo.mem);while (byte_count) {uint32_t cur_size_in_bytes =min (byte_count, max_bytes); -amdgpu_emit_fill_buffer (adev, &job->ibs[0 ], src_data, - dst_addr, cur_size_in_bytes); +amdgpu_vm_set_pte_pde (adev, &job->ibs[0 ], + dst_addr,0 , + cur_size_in_bytes >>3 ,0 , + src_data); dst_addr += cur_size_in_bytes; byte_count -= cur_size_in_bytes;
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +1 -1
@@ -73,7 +73,7 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, struct dma_fence **fence, bool direct_submit, bool vm_needs_flush);int amdgpu_fill_buffer (struct amdgpu_bo *bo, -uint32_t src_data, +uint64_t src_data,struct reservation_object *resv,struct dma_fence **fence);
Signature · 6 lines
2.7.4 _______________________________________________ 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): 1501101911-22711-1-git-send-email-Yong.Zhao-5C7GfCeVMHo@public.gmane.org
Am 26.07.2017 um 22:45 schrieb Yong Zhao:
Quoted 15 lines
That function will be used later to support setting a page table block with 64 bit value.
Change-Id Ib142ebd4163d6e23670a3f0ceed536d59133b942Signed-off-by Yong Zhao <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 19 +++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, · line 1514
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +3
-3@@ -1509,11 +1509,12 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, }int amdgpu_fill_buffer (struct amdgpu_bo *bo, -uint32_t src_data, -struct reservation_object *resv, -struct dma_fence **fence) +uint64_t src_data, +struct reservation_object *resv, +struct dma_fence **fence)
Looks like you accidentally changed the indentation of the other function parameters here. What editor do you use?
Please make sure that you only change the type, with that fixed the patch is Reviewed-by: Christian König <[email protected]>.
Regards,
Christian.
Quoted 41 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +10
-3{struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev); +/* max_bytes applies to SDMA_OP_PTEPDE as well as SDMA_OP_CONST_FILL*/ uint32_t max_bytes = adev->mman.buffer_funcs->fill_max_bytes;struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring;@@ -1545,7 +1546,9 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo, num_pages -= mm_node->size; ++mm_node; } - num_dw = num_loops * adev->mman.buffer_funcs->fill_num_dw; + +/* 10 double words for each SDMA_OP_PTEPDE cmd */ + num_dw = num_loops *10 ;/* for IB padding */ num_dw +=64 ;@@ -1570,12 +1573,16 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo,uint32_t byte_count = mm_node->size <<PAGE_SHIFT ;uint64_t dst_addr; +WARN_ONCE (byte_count &0x7 ,"size should be a multiple of 8" ); + dst_addr =amdgpu_mm_node_addr (&bo->tbo, mm_node, &bo->tbo.mem);while (byte_count) {uint32_t cur_size_in_bytes =min (byte_count, max_bytes); -amdgpu_emit_fill_buffer (adev, &job->ibs[0 ], src_data, - dst_addr, cur_size_in_bytes); +amdgpu_vm_set_pte_pde (adev, &job->ibs[0 ], + dst_addr,0 , + cur_size_in_bytes >>3 ,0 , + src_data); dst_addr += cur_size_in_bytes; byte_count -= cur_size_in_bytes;drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, · line 79
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +1
-1@@ -73,7 +73,7 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, struct dma_fence **fence, bool direct_submit, bool vm_needs_flush);int amdgpu_fill_buffer (struct amdgpu_bo *bo, -uint32_t src_data, +uint64_t src_data,struct reservation_object *resv,struct dma_fence **fence);
_______________________________________________
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): bab2f91a-553b-0030-a8ee-13e488810eb4-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Hi Christian,
I used eclipse. The reason why I changed the indent is that the current indents are composed of tabs and spaces, and I will get style warning from checkpatch script when trying to submit it to gerrit, so I made the indents all tabs. In this case, should I still use the previous indents?
Regards,
Yong
________________________________
From: Christian König <[email protected]>
Sent: Thursday, July 27, 2017 5:34:58 AM
To: Zhao, Yong; [email protected]
Subject: Re: [PATCH 1/2] drm/amdgpu: Add support for filling a buffer with 64 bit value
Am 26.07.2017 um 22:45 schrieb Yong Zhao:
Quoted 15 lines
That function will be used later to support setting a page table block with 64 bit value.
Change-Id Ib142ebd4163d6e23670a3f0ceed536d59133b942Signed-off-by Yong Zhao <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 19 +++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, · line 1514
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +3
-3@@ -1509,11 +1509,12 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, }int amdgpu_fill_buffer (struct amdgpu_bo *bo, -uint32_t src_data, -struct reservation_object *resv, -struct dma_fence **fence) +uint64_t src_data, +struct reservation_object *resv, +struct dma_fence **fence)
Looks like you accidentally changed the indentation of the other function parameters here. What editor do you use?
Please make sure that you only change the type, with that fixed the patch is Reviewed-by: Christian König <[email protected]>.
Regards,
Christian.
Quoted 41 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +10
-3{struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev); +/* max_bytes applies to SDMA_OP_PTEPDE as well as SDMA_OP_CONST_FILL*/ uint32_t max_bytes = adev->mman.buffer_funcs->fill_max_bytes;struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring;@@ -1545,7 +1546,9 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo, num_pages -= mm_node->size; ++mm_node; } - num_dw = num_loops * adev->mman.buffer_funcs->fill_num_dw; + +/* 10 double words for each SDMA_OP_PTEPDE cmd */ + num_dw = num_loops *10 ;/* for IB padding */ num_dw +=64 ;@@ -1570,12 +1573,16 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo,uint32_t byte_count = mm_node->size <<PAGE_SHIFT ;uint64_t dst_addr; +WARN_ONCE (byte_count &0x7 ,"size should be a multiple of 8" ); + dst_addr =amdgpu_mm_node_addr (&bo->tbo, mm_node, &bo->tbo.mem);while (byte_count) {uint32_t cur_size_in_bytes =min (byte_count, max_bytes); -amdgpu_emit_fill_buffer (adev, &job->ibs[0 ], src_data, - dst_addr, cur_size_in_bytes); +amdgpu_vm_set_pte_pde (adev, &job->ibs[0 ], + dst_addr,0 , + cur_size_in_bytes >>3 ,0 , + src_data); dst_addr += cur_size_in_bytes; byte_count -= cur_size_in_bytes;drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, · line 79
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +1
-1@@ -73,7 +73,7 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, struct dma_fence **fence, bool direct_submit, bool vm_needs_flush);int amdgpu_fill_buffer (struct amdgpu_bo *bo, -uint32_t src_data, +uint64_t src_data,struct reservation_object *resv,struct dma_fence **fence);
_______________________________________________
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): CY1PR1201MB1097EB9BD9F52DFD48249814F0BE0-JBJ/M6OpXY/YBI+VM8qCl2rFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/[email protected]
Quoted 8 lines · Yong
Hi Christian,
I used eclipse. The reason why I changed the indent is that the current indents are composed of tabs and spaces, and I will get style warning from checkpatch script when trying to submit it to gerrit, so I made the indents all tabs. In this case, should I still use the previous indents?
Generally it's not a good idea to combine style fixes with functional changes as it makes it hard to spot the functional change. It's better to ignore warnings in that case if they're not in the same line you modify.
Harry
Quoted 102 lines
Regards,
Yong
------------------------------------------------------------------------
*From:* Christian König <[email protected]>
*Sent:* Thursday, July 27, 2017 5:34:58 AM
*To:* Zhao, Yong; [email protected]
*Subject:* Re: [PATCH 1/2] drm/amdgpu: Add support for filling a buffer with 64 bit valueAm 26.07.2017 um 22:45 schrieb Yong Zhao:
Quoted 15 lines
That function will be used later to support setting a page table block with 64 bit value.
Change-Id Ib142ebd4163d6e23670a3f0ceed536d59133b942Signed-off-by Yong Zhao <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 19 +++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, · line 1514
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +3
-3@@ -1509,11 +1509,12 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, }int amdgpu_fill_buffer (struct amdgpu_bo *bo, -uint32_t src_data, -struct reservation_object *resv, -struct dma_fence **fence) +uint64_t src_data, +struct reservation_object *resv, +struct dma_fence **fence)Looks like you accidentally changed the indentation of the other function parameters here. What editor do you use?
Please make sure that you only change the type, with that fixed the patch is Reviewed-by: Christian König <[email protected]>.
Regards,
Christian.Quoted 41 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +10
-3{struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev); +/* max_bytes applies to SDMA_OP_PTEPDE as well as SDMA_OP_CONST_FILL*/ uint32_t max_bytes = adev->mman.buffer_funcs->fill_max_bytes;struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring;@@ -1545,7 +1546,9 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo, num_pages -= mm_node->size; ++mm_node; } - num_dw = num_loops * adev->mman.buffer_funcs->fill_num_dw; + +/* 10 double words for each SDMA_OP_PTEPDE cmd */ + num_dw = num_loops *10 ;/* for IB padding */ num_dw +=64 ;@@ -1570,12 +1573,16 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo,uint32_t byte_count = mm_node->size <<PAGE_SHIFT ;uint64_t dst_addr; +WARN_ONCE (byte_count &0x7 ,"size should be a multiple of 8" ); + dst_addr =amdgpu_mm_node_addr (&bo->tbo, mm_node, &bo->tbo.mem);while (byte_count) {uint32_t cur_size_in_bytes =min (byte_count, max_bytes); -amdgpu_emit_fill_buffer (adev, &job->ibs[0 ], src_data, - dst_addr, cur_size_in_bytes); +amdgpu_vm_set_pte_pde (adev, &job->ibs[0 ], + dst_addr,0 , + cur_size_in_bytes >>3 ,0 , + src_data); dst_addr += cur_size_in_bytes; byte_count -= cur_size_in_bytes;drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, · line 79
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +1
-1@@ -73,7 +73,7 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, struct dma_fence **fence, bool direct_submit, bool vm_needs_flush);int amdgpu_fill_buffer (struct amdgpu_bo *bo, -uint32_t src_data, +uint64_t src_data,struct reservation_object *resv,struct dma_fence **fence);
Quoted 5 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): 643b3543-7d55-a02c-b034-51ed9267b5ac-5C7GfCeVMHo@public.gmane.org
I got it. Thanks Harry.
Yong
________________________________
From: Wentland, Harry
Sent: Thursday, July 27, 2017 11:48:13 AM
To: Zhao, Yong; Christian König; [email protected]
Subject: Re: [PATCH 1/2] drm/amdgpu: Add support for filling a buffer with 64 bit value
Quoted 8 lines · Yong
Hi Christian,
I used eclipse. The reason why I changed the indent is that the current indents are composed of tabs and spaces, and I will get style warning from checkpatch script when trying to submit it to gerrit, so I made the indents all tabs. In this case, should I still use the previous indents?
Generally it's not a good idea to combine style fixes with functional changes as it makes it hard to spot the functional change. It's better to ignore warnings in that case if they're not in the same line you modify.
Harry
Quoted 102 lines
Regards,
Yong
------------------------------------------------------------------------
*From:* Christian König <[email protected]> *Sent:* Thursday, July 27, 2017 5:34:58 AM
*To:* Zhao, Yong; [email protected] *Subject:* Re: [PATCH 1/2] drm/amdgpu: Add support for filling a buffer with 64 bit valueAm 26.07.2017 um 22:45 schrieb Yong Zhao:
Quoted 15 lines
That function will be used later to support setting a page table block with 64 bit value.
Change-Id Ib142ebd4163d6e23670a3f0ceed536d59133b942Signed-off-by Yong Zhao <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 19 +++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, · line 1514
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +3
-3@@ -1509,11 +1509,12 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, }int amdgpu_fill_buffer (struct amdgpu_bo *bo, -uint32_t src_data, -struct reservation_object *resv, -struct dma_fence **fence) +uint64_t src_data, +struct reservation_object *resv, +struct dma_fence **fence)Looks like you accidentally changed the indentation of the other function parameters here. What editor do you use?
Please make sure that you only change the type, with that fixed the patch is Reviewed-by: Christian König <[email protected]>.
Regards,
Christian.Quoted 41 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +10
-3{struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev); +/* max_bytes applies to SDMA_OP_PTEPDE as well as SDMA_OP_CONST_FILL*/ uint32_t max_bytes = adev->mman.buffer_funcs->fill_max_bytes;struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring;@@ -1545,7 +1546,9 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo, num_pages -= mm_node->size; ++mm_node; } - num_dw = num_loops * adev->mman.buffer_funcs->fill_num_dw; + +/* 10 double words for each SDMA_OP_PTEPDE cmd */ + num_dw = num_loops *10 ;/* for IB padding */ num_dw +=64 ;@@ -1570,12 +1573,16 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo,uint32_t byte_count = mm_node->size <<PAGE_SHIFT ;uint64_t dst_addr; +WARN_ONCE (byte_count &0x7 ,"size should be a multiple of 8" ); + dst_addr =amdgpu_mm_node_addr (&bo->tbo, mm_node, &bo->tbo.mem);while (byte_count) {uint32_t cur_size_in_bytes =min (byte_count, max_bytes); -amdgpu_emit_fill_buffer (adev, &job->ibs[0 ], src_data, - dst_addr, cur_size_in_bytes); +amdgpu_vm_set_pte_pde (adev, &job->ibs[0 ], + dst_addr,0 , + cur_size_in_bytes >>3 ,0 , + src_data); dst_addr += cur_size_in_bytes; byte_count -= cur_size_in_bytes;drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, · line 79
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +1
-1@@ -73,7 +73,7 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, struct dma_fence **fence, bool direct_submit, bool vm_needs_flush);int amdgpu_fill_buffer (struct amdgpu_bo *bo, -uint32_t src_data, +uint64_t src_data,struct reservation_object *resv,struct dma_fence **fence);
Quoted 5 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
Am 27.07.2017 um 17:48 schrieb Harry Wentland:
Quoted 12 lines · Yong
Quoted 8 lines
Hi Christian,
I used eclipse. The reason why I changed the indent is that the current indents are composed of tabs and spaces, and I will get style warning from checkpatch script when trying to submit it to gerrit, so I made the indents all tabs. In this case, should I still use the previous indents?
Generally it's not a good idea to combine style fixes with functional changes as it makes it hard to spot the functional change. It's better to ignore warnings in that case if they're not in the same line you modify.
Yes, exactly.
Additional to that tabs and spaces are actually the recommended style in this case (at least according to linuxsty.vim).
Christian.
Quoted 107 lines
Harry
Quoted 104 lines
Regards,
Yong
------------------------------------------------------------------------
*From:* Christian König <[email protected]>
*Sent:* Thursday, July 27, 2017 5:34:58 AM
*To:* Zhao, Yong; [email protected]
*Subject:* Re: [PATCH 1/2] drm/amdgpu: Add support for filling a buffer with 64 bit valueAm 26.07.2017 um 22:45 schrieb Yong Zhao:
Quoted 15 lines
That function will be used later to support setting a page table block with 64 bit value.
Change-Id Ib142ebd4163d6e23670a3f0ceed536d59133b942Signed-off-by Yong Zhao <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 19 +++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, · line 1514
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +3
-3@@ -1509,11 +1509,12 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, }int amdgpu_fill_buffer (struct amdgpu_bo *bo, -uint32_t src_data, -struct reservation_object *resv, -struct dma_fence **fence) +uint64_t src_data, +struct reservation_object *resv, +struct dma_fence **fence)Looks like you accidentally changed the indentation of the other function parameters here. What editor do you use?
Please make sure that you only change the type, with that fixed the patch is Reviewed-by: Christian König <[email protected]>.
Regards,
Christian.Quoted 41 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +10
-3{struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev); +/* max_bytes applies to SDMA_OP_PTEPDE as well as SDMA_OP_CONST_FILL*/ uint32_t max_bytes = adev->mman.buffer_funcs->fill_max_bytes;struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring;@@ -1545,7 +1546,9 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo, num_pages -= mm_node->size; ++mm_node; } - num_dw = num_loops * adev->mman.buffer_funcs->fill_num_dw; + +/* 10 double words for each SDMA_OP_PTEPDE cmd */ + num_dw = num_loops *10 ;/* for IB padding */ num_dw +=64 ;@@ -1570,12 +1573,16 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo,uint32_t byte_count = mm_node->size <<PAGE_SHIFT ;uint64_t dst_addr; +WARN_ONCE (byte_count &0x7 ,"size should be a multiple of 8" ); + dst_addr =amdgpu_mm_node_addr (&bo->tbo, mm_node, &bo->tbo.mem);while (byte_count) {uint32_t cur_size_in_bytes =min (byte_count, max_bytes); -amdgpu_emit_fill_buffer (adev, &job->ibs[0 ], src_data, - dst_addr, cur_size_in_bytes); +amdgpu_vm_set_pte_pde (adev, &job->ibs[0 ], + dst_addr,0 , + cur_size_in_bytes >>3 ,0 , + src_data); dst_addr += cur_size_in_bytes; byte_count -= cur_size_in_bytes;drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, · line 79
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +1
-1@@ -73,7 +73,7 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, struct dma_fence **fence, bool direct_submit, bool vm_needs_flush);int amdgpu_fill_buffer (struct amdgpu_bo *bo, -uint32_t src_data, +uint64_t src_data,struct reservation_object *resv,struct dma_fence **fence);_______________________________________________
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