Re: [PATCH] drm/amdgpu: ignore duplicate BOs again

2023-10-19 Thread Christian König

Am 17.10.23 um 15:04 schrieb Alex Deucher:

On Tue, Oct 17, 2023 at 8:22 AM Christian König
 wrote:

Looks like RADV is actually hitting this.

Signed-off-by: Christian König 
Fixes: ca6c1e210aa7 ("drm/amdgpu: use the new drm_exec object for CS v3")

Acked-by: Alex Deucher 


Pushed to drm-misc-fixes since the original patch causing the problems 
isn't even merged into amd-staging-drm-next yet.


Regards,
Christian.




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

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index efdb1c48f431..d93a8961274c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -65,7 +65,8 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p,
 }

 amdgpu_sync_create(&p->sync);
-   drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT);
+   drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT |
+ DRM_EXEC_IGNORE_DUPLICATES);
 return 0;
  }

--
2.34.1





Re: [PATCH] drm/amdgpu: ignore duplicate BOs again

2023-10-17 Thread Christian König

Am 17.10.23 um 14:42 schrieb Hamza Mahfooz:

On 10/17/23 08:10, Christian König wrote:

Looks like RADV is actually hitting this.

Signed-off-by: Christian König 
Fixes: ca6c1e210aa7 ("drm/amdgpu: use the new drm_exec object for CS 
v3")


Do you think this will fix the following issue?:
https://gitlab.freedesktop.org/drm/amd/-/issues/2893


No, that's completely unrelated.

Regards,
Christian.




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

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

index efdb1c48f431..d93a8961274c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -65,7 +65,8 @@ static int amdgpu_cs_parser_init(struct 
amdgpu_cs_parser *p,

  }
    amdgpu_sync_create(&p->sync);
-    drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT);
+    drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT |
+  DRM_EXEC_IGNORE_DUPLICATES);
  return 0;
  }




Re: [PATCH] drm/amdgpu: ignore duplicate BOs again

2023-10-17 Thread Alex Deucher
On Tue, Oct 17, 2023 at 8:22 AM Christian König
 wrote:
>
> Looks like RADV is actually hitting this.
>
> Signed-off-by: Christian König 
> Fixes: ca6c1e210aa7 ("drm/amdgpu: use the new drm_exec object for CS v3")

Acked-by: Alex Deucher 

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> index efdb1c48f431..d93a8961274c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -65,7 +65,8 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p,
> }
>
> amdgpu_sync_create(&p->sync);
> -   drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT);
> +   drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT |
> + DRM_EXEC_IGNORE_DUPLICATES);
> return 0;
>  }
>
> --
> 2.34.1
>


Re: [PATCH] drm/amdgpu: ignore duplicate BOs again

2023-10-17 Thread Alex Deucher
On Tue, Oct 17, 2023 at 8:43 AM Hamza Mahfooz  wrote:
>
> On 10/17/23 08:10, Christian König wrote:
> > Looks like RADV is actually hitting this.
> >
> > Signed-off-by: Christian König 
> > Fixes: ca6c1e210aa7 ("drm/amdgpu: use the new drm_exec object for CS v3")
>
> Do you think this will fix the following issue?:
> https://gitlab.freedesktop.org/drm/amd/-/issues/2893

No.  That's a known issue with data migration back to VRAM after
suspend.  There are TTM changes required to fix that properly.

Alex


>
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c 
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> > index efdb1c48f431..d93a8961274c 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> > @@ -65,7 +65,8 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser 
> > *p,
> >   }
> >
> >   amdgpu_sync_create(&p->sync);
> > - drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT);
> > + drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT |
> > +   DRM_EXEC_IGNORE_DUPLICATES);
> >   return 0;
> >   }
> >
> --
> Hamza
>


Re: [PATCH] drm/amdgpu: ignore duplicate BOs again

2023-10-17 Thread Hamza Mahfooz

On 10/17/23 08:10, Christian König wrote:

Looks like RADV is actually hitting this.

Signed-off-by: Christian König 
Fixes: ca6c1e210aa7 ("drm/amdgpu: use the new drm_exec object for CS v3")


Do you think this will fix the following issue?:
https://gitlab.freedesktop.org/drm/amd/-/issues/2893


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

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index efdb1c48f431..d93a8961274c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -65,7 +65,8 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p,
}
  
  	amdgpu_sync_create(&p->sync);

-   drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT);
+   drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT |
+ DRM_EXEC_IGNORE_DUPLICATES);
return 0;
  }
  

--
Hamza



[PATCH] drm/amdgpu: ignore duplicate BOs again

2023-10-17 Thread Christian König
Looks like RADV is actually hitting this.

Signed-off-by: Christian König 
Fixes: ca6c1e210aa7 ("drm/amdgpu: use the new drm_exec object for CS v3")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index efdb1c48f431..d93a8961274c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -65,7 +65,8 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p,
}
 
amdgpu_sync_create(&p->sync);
-   drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT);
+   drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT |
+ DRM_EXEC_IGNORE_DUPLICATES);
return 0;
 }
 
-- 
2.34.1