Skip to contentSkip to conversation

drm/amdgpu: ignore duplicate BOs again

PATCH In review Christian König 4 participants 6 messages Oct 17, 2023 – Oct 19, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: ignore duplicate BOs again

Looks like RADV is actually hitting this.

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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +2 -1
index efdb1c48f431..d93a8961274c 100644
@@ -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;
 }
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 4 lines · Christian König

Looks like RADV is actually hitting this.

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

Quoted 18 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +2 -1
index efdb1c48f431..d93a8961274c 100644
@@ -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;
  }
 
Signature · 1 line
Hamza
#2 lore raw
Quoted 9 lines · Hamza Mahfooz
Quoted 4 lines · Christian König

Looks like RADV is actually hitting this.

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

Quoted 22 lines
Quoted 10 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0 -0
index efdb1c48f431..d93a8961274c 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, · line 72

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +2 -1
@@ -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

maintainer
#3 lore raw
In reply to Hamza Mahfooz

Am 17.10.23 um 14:42 schrieb Hamza Mahfooz:

Quoted 8 lines · Christian König
Quoted 4 lines

Looks like RADV is actually hitting this.

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.

Quoted 18 lines
Quoted 18 lines

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++-

  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +2 -1
index efdb1c48f431..d93a8961274c 100644
@@ -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;
   }
Acked-by on v1 1/1
#4 lore raw
In reply to Christian König
Quoted 5 lines · Christian König

Looks like RADV is actually hitting this.

Fixes ca6c1e210aa7 ("drm/amdgpu: use the new drm_exec object for CS v3")
Quoted 21 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +2 -2
index efdb1c48f431..d93a8961274c 100644
@@ -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

author Applied
#5 lore raw

Am 17.10.23 um 15:04 schrieb Alex Deucher:

Quoted 7 lines
Quoted 4 lines · Christian König

Looks like RADV is actually hitting this.

Fixes ca6c1e210aa7 ("drm/amdgpu: use the new drm_exec object for CS v3")

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

Regards,
Christian.

Quoted 22 lines
Quoted 22 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +2 -2
index efdb1c48f431..d93a8961274c 100644
@@ -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