[PATCH 2/3] drm/amdgpu: add firmware info to benchmark metrics

Prike Liang Prike.Liang at amd.com
Tue Apr 16 08:51:49 UTC 2024


Export the firmware info in the benchmark metrics.

Signed-off-by: Prike Liang <Prike.Liang at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 4 ++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.h   | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       | 5 +++++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
index 20784c407e0b..f6848b574dea 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
@@ -502,6 +502,10 @@ static void amdgpu_benchmark_driver_config_dump(struct amdgpu_device *adev, stru
 
 	seq_printf(m, "\tvbios: %s\n", adev->mode_info.atom_context->vbios_pn);
 
+	seq_puts(m, "-----------------firmware info:----------------- \n");
+	amdgpu_debugfs_firmware_info_export(m);
+	seq_puts(m, "-----------------firmware info:----------------- \n");
+
 	seq_printf(m, "\n");
 
 }
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.h
index 0425432d8659..9f802cad828e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.h
@@ -33,4 +33,4 @@ void amdgpu_debugfs_fence_init(struct amdgpu_device *adev);
 void amdgpu_debugfs_firmware_init(struct amdgpu_device *adev);
 void amdgpu_debugfs_gem_init(struct amdgpu_device *adev);
 void amdgpu_debugfs_mes_event_log_init(struct amdgpu_device *adev);
-
+void amdgpu_debugfs_firmware_info_export(struct seq_file *m);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 5d1b084eb631..a7d878846907 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -1869,6 +1869,11 @@ static int amdgpu_debugfs_firmware_info_show(struct seq_file *m, void *unused)
 
 DEFINE_SHOW_ATTRIBUTE(amdgpu_debugfs_firmware_info);
 
+void amdgpu_debugfs_firmware_info_export(struct seq_file *m)
+{
+	amdgpu_debugfs_firmware_info_show(m, NULL);
+}
+
 #endif
 
 void amdgpu_debugfs_firmware_init(struct amdgpu_device *adev)
-- 
2.34.1



More information about the amd-gfx mailing list