public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu: add the IP information of the soc
@ 2024-03-12 12:41 Sunil Khatri
  2024-03-12 12:41 ` [PATCH 2/2] drm:amdgpu: add firmware information of all IP's Sunil Khatri
  2024-03-13 20:28 ` [PATCH 1/2] drm/amdgpu: add the IP information of the soc Alex Deucher
  0 siblings, 2 replies; 12+ messages in thread
From: Sunil Khatri @ 2024-03-12 12:41 UTC (permalink / raw)
  To: Alex Deucher, Christian König, Shashank Sharma
  Cc: amd-gfx, dri-devel, linux-kernel, Sunil Khatri

Add all the IP's information on a SOC to the
devcoredump.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
index a0dbccad2f53..611fdb90a1fc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
@@ -196,6 +196,25 @@ amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count,
 			   coredump->reset_task_info.process_name,
 			   coredump->reset_task_info.pid);
 
+	/* GPU IP's information of the SOC */
+	if (coredump->adev) {
+		drm_printf(&p, "\nIP Information\n");
+		drm_printf(&p, "SOC Family: %d\n", coredump->adev->family);
+		drm_printf(&p, "SOC Revision id: %d\n", coredump->adev->rev_id);
+
+		for (int i = 0; i < coredump->adev->num_ip_blocks; i++) {
+			struct amdgpu_ip_block *ip =
+				&coredump->adev->ip_blocks[i];
+			drm_printf(&p, "IP type: %d IP name: %s\n",
+				   ip->version->type,
+				   ip->version->funcs->name);
+			drm_printf(&p, "IP version: (%d,%d,%d)\n\n",
+				   ip->version->major,
+				   ip->version->minor,
+				   ip->version->rev);
+		}
+	}
+
 	if (coredump->ring) {
 		drm_printf(&p, "\nRing timed out details\n");
 		drm_printf(&p, "IP Type: %d Ring Name: %s\n",
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-03-14 17:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-12 12:41 [PATCH 1/2] drm/amdgpu: add the IP information of the soc Sunil Khatri
2024-03-12 12:41 ` [PATCH 2/2] drm:amdgpu: add firmware information of all IP's Sunil Khatri
2024-03-13 20:36   ` Alex Deucher
2024-03-14  5:58     ` Khatri, Sunil
2024-03-14  6:10       ` Sharma, Shashank
2024-03-14  9:52         ` Khatri, Sunil
2024-03-14 13:27         ` Alex Deucher
2024-03-13 20:28 ` [PATCH 1/2] drm/amdgpu: add the IP information of the soc Alex Deucher
2024-03-14  5:44   ` Khatri, Sunil
2024-03-14 14:42     ` Alex Deucher
2024-03-14 16:16       ` Khatri, Sunil
2024-03-14 17:51         ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox