Skip to contentSkip to conversation

drm/amdgpu: add the evf attached gem obj resv dump

PATCH In review Prike Liang 3 participants 5 messages Apr 22, 2025

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

PATCH 1/3 drm/amdgpu: add the evf attached gem obj resv dump

This debug dump will help on debugging the evf attached gem obj fence related issue.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +5 -1
index d09db052e282..1e73ce30d4d7 100644
@@ -1675,7 +1675,11 @@ u64 amdgpu_bo_print_info(int id, struct amdgpu_bo *bo, struct seq_file *m)
 	amdgpu_bo_print_flag(m, bo, VRAM_CONTIGUOUS);
 	amdgpu_bo_print_flag(m, bo, VM_ALWAYS_VALID);
 	amdgpu_bo_print_flag(m, bo, EXPLICIT_SYNC);
-
+	/* Add the gem obj resv fence dump*/
+	if (dma_resv_trylock(bo->tbo.base.resv)) {
+		dma_resv_describe(bo->tbo.base.resv, m);
+		dma_resv_unlock(bo->tbo.base.resv);
+	}
 	seq_puts(m, "\n");
 
 	return size;
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/3 drm/amdgpu: set the evf name to identify the userq case

The evf fence name can clearly identify the userq usage.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c +1 -1
index 0075469550b0..610f447ede9b 100644
@@ -31,7 +31,7 @@
 static const char *
 amdgpu_eviction_fence_get_driver_name(struct dma_fence *fence)
 {
-	return "amdgpu";
+	return "amdgpu_eviction_fence";
 }
 
 static const char *
Signature · 1 line
2.34.1
Reviewed-by Arvind Yadav on v1 2/3
#2 lore raw

Re: [PATCH 2/3] drm/amdgpu: set the evf name to identify the userq case

Quoted 20 lines · Prike Liang

The evf fence name can clearly identify the userq usage.

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c +1 -1
index 0075469550b0..610f447ede9b 100644
@@ -31,7 +31,7 @@
  static const char *
  amdgpu_eviction_fence_get_driver_name(struct dma_fence *fence)
  {
-	return "amdgpu";
+	return "amdgpu_eviction_fence";
  }
 
  static const char *
maintainer Reviewed-by on v1 1/3
#3 lore raw
In reply to Prike Liang

Am 22.04.25 um 15:23 schrieb Prike Liang:

Quoted 4 lines

This debug dump will help on debugging the evf attached gem obj fence related issue.

Quoted 21 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +5 -1
index d09db052e282..1e73ce30d4d7 100644
@@ -1675,7 +1675,11 @@ u64 amdgpu_bo_print_info(int id, struct amdgpu_bo *bo, struct seq_file *m)
 	amdgpu_bo_print_flag(m, bo, VRAM_CONTIGUOUS);
 	amdgpu_bo_print_flag(m, bo, VM_ALWAYS_VALID);
 	amdgpu_bo_print_flag(m, bo, EXPLICIT_SYNC);
-
+	/* Add the gem obj resv fence dump*/
+	if (dma_resv_trylock(bo->tbo.base.resv)) {
+		dma_resv_describe(bo->tbo.base.resv, m);
+		dma_resv_unlock(bo->tbo.base.resv);
+	}
 	seq_puts(m, "\n");
 
 	return size;
Reviewed-by Arvind Yadav
#4 lore raw
Quoted 28 lines · Christian König

Am 22.04.25 um 15:23 schrieb Prike Liang:

Quoted 4 lines

This debug dump will help on debugging the evf attached gem obj fence related issue.

Quoted 21 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +5 -1
index d09db052e282..1e73ce30d4d7 100644
@@ -1675,7 +1675,11 @@ u64 amdgpu_bo_print_info(int id, struct amdgpu_bo *bo, struct seq_file *m)
  	amdgpu_bo_print_flag(m, bo, VRAM_CONTIGUOUS);
  	amdgpu_bo_print_flag(m, bo, VM_ALWAYS_VALID);
  	amdgpu_bo_print_flag(m, bo, EXPLICIT_SYNC);
-
+	/* Add the gem obj resv fence dump*/
+	if (dma_resv_trylock(bo->tbo.base.resv)) {
+		dma_resv_describe(bo->tbo.base.resv, m);
+		dma_resv_unlock(bo->tbo.base.resv);
+	}
  	seq_puts(m, "\n");
 
  	return size;