drm/amdgpu: add the evf attached gem obj resv dump
authorPrike Liang <Prike.Liang@amd.com>
Tue, 15 Apr 2025 02:27:44 +0000 (10:27 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Apr 2025 22:05:07 +0000 (18:05 -0400)
This debug dump will help on debugging the evf attached gem obj fence
related issue.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Arvind Yadav <Arvind.Yadav@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

index 0b9987781f7622454bfd6db79126b9168d6bb225..dbe57996a4816c539ae0b4e6d349056645dc53cb 100644 (file)
@@ -1644,7 +1644,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;