All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/amdgpu: Fix IB allocation sizes for page table updates
@ 2017-08-30 21:08 Felix Kuehling
       [not found] ` <1504127327-446-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Felix Kuehling @ 2017-08-30 21:08 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Felix Kuehling

set_pte_pde commands need 10 dwords.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 4cdfb70..587a166 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1037,7 +1037,7 @@ static int amdgpu_vm_update_level(struct amdgpu_device *adev,
 		ndw = 64;
 
 		/* assume the worst case */
-		ndw += parent->last_entry_used * 6;
+		ndw += parent->last_entry_used * 10;
 
 		pd_addr = amdgpu_bo_gpu_offset(parent->base.bo);
 
@@ -1545,7 +1545,7 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
 	ndw = 64;
 
 	/* one PDE write for each huge page */
-	ndw += ((nptes >> adev->vm_manager.block_size) + 1) * 6;
+	ndw += ((nptes >> adev->vm_manager.block_size) + 1) * 10;
 
 	if (src) {
 		/* only copy commands needed */
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] drm/amdgpu: Fix IB allocation sizes for page table updates
       [not found] ` <1504127327-446-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
@ 2017-08-30 21:51   ` Alex Deucher
  2017-08-31  7:06   ` Christian König
  1 sibling, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2017-08-30 21:51 UTC (permalink / raw)
  To: Felix Kuehling; +Cc: amd-gfx list

On Wed, Aug 30, 2017 at 5:08 PM, Felix Kuehling <Felix.Kuehling@amd.com> wrote:
> set_pte_pde commands need 10 dwords.
>
> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 4cdfb70..587a166 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1037,7 +1037,7 @@ static int amdgpu_vm_update_level(struct amdgpu_device *adev,
>                 ndw = 64;
>
>                 /* assume the worst case */
> -               ndw += parent->last_entry_used * 6;
> +               ndw += parent->last_entry_used * 10;
>
>                 pd_addr = amdgpu_bo_gpu_offset(parent->base.bo);
>
> @@ -1545,7 +1545,7 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
>         ndw = 64;
>
>         /* one PDE write for each huge page */
> -       ndw += ((nptes >> adev->vm_manager.block_size) + 1) * 6;
> +       ndw += ((nptes >> adev->vm_manager.block_size) + 1) * 10;
>
>         if (src) {
>                 /* only copy commands needed */
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] drm/amdgpu: Fix IB allocation sizes for page table updates
       [not found] ` <1504127327-446-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
  2017-08-30 21:51   ` Alex Deucher
@ 2017-08-31  7:06   ` Christian König
       [not found]     ` <51a039bc-e203-9708-6d53-419d34f81dd9-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Christian König @ 2017-08-31  7:06 UTC (permalink / raw)
  To: Felix Kuehling, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Am 30.08.2017 um 23:08 schrieb Felix Kuehling:
> set_pte_pde commands need 10 dwords.

But is only used when we write more than 3 consecutive entries, before 
that we use write_pte which uses only 6 dw.

See amdgpu_vm_do_set_ptes() in amdgpu_vm.c

Regards,
Christian.

>
> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 4cdfb70..587a166 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1037,7 +1037,7 @@ static int amdgpu_vm_update_level(struct amdgpu_device *adev,
>   		ndw = 64;
>   
>   		/* assume the worst case */
> -		ndw += parent->last_entry_used * 6;
> +		ndw += parent->last_entry_used * 10;
>   
>   		pd_addr = amdgpu_bo_gpu_offset(parent->base.bo);
>   
> @@ -1545,7 +1545,7 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
>   	ndw = 64;
>   
>   	/* one PDE write for each huge page */
> -	ndw += ((nptes >> adev->vm_manager.block_size) + 1) * 6;
> +	ndw += ((nptes >> adev->vm_manager.block_size) + 1) * 10;
>   
>   	if (src) {
>   		/* only copy commands needed */


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] drm/amdgpu: Fix IB allocation sizes for page table updates
       [not found]     ` <51a039bc-e203-9708-6d53-419d34f81dd9-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
@ 2017-08-31 13:38       ` Kuehling, Felix
  0 siblings, 0 replies; 4+ messages in thread
From: Kuehling, Felix @ 2017-08-31 13:38 UTC (permalink / raw)
  To: Christian König, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Yeah, I realized this later last night. I'm going to do some more debugging to track down the real problem today.

For now, this seems to have moved around IB allocations enough to hide the problem so our merge today seems to have passed PSDB. But like I said, at best I've hidden the problem, not fixed it.

Regards,
  Felix
________________________________________
From: Christian König <deathsimple@vodafone.de>
Sent: Thursday, August 31, 2017 3:06:37 AM
To: Kuehling, Felix; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/1] drm/amdgpu: Fix IB allocation sizes for page table updates

Am 30.08.2017 um 23:08 schrieb Felix Kuehling:
> set_pte_pde commands need 10 dwords.

But is only used when we write more than 3 consecutive entries, before
that we use write_pte which uses only 6 dw.

See amdgpu_vm_do_set_ptes() in amdgpu_vm.c

Regards,
Christian.

>
> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 4cdfb70..587a166 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1037,7 +1037,7 @@ static int amdgpu_vm_update_level(struct amdgpu_device *adev,
>               ndw = 64;
>
>               /* assume the worst case */
> -             ndw += parent->last_entry_used * 6;
> +             ndw += parent->last_entry_used * 10;
>
>               pd_addr = amdgpu_bo_gpu_offset(parent->base.bo);
>
> @@ -1545,7 +1545,7 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
>       ndw = 64;
>
>       /* one PDE write for each huge page */
> -     ndw += ((nptes >> adev->vm_manager.block_size) + 1) * 6;
> +     ndw += ((nptes >> adev->vm_manager.block_size) + 1) * 10;
>
>       if (src) {
>               /* only copy commands needed */


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-31 13:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-30 21:08 [PATCH 1/1] drm/amdgpu: Fix IB allocation sizes for page table updates Felix Kuehling
     [not found] ` <1504127327-446-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-08-30 21:51   ` Alex Deucher
2017-08-31  7:06   ` Christian König
     [not found]     ` <51a039bc-e203-9708-6d53-419d34f81dd9-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-08-31 13:38       ` Kuehling, Felix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.