[PATCH 1/2] drm/amdgpu: add the IP information of the soc

Khatri, Sunil Sunil.Khatri at amd.com
Wed Mar 13 19:45:59 UTC 2024


[AMD Official Use Only - General]

Gentle Reminder for review.

Regards,
Sunil

Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: Sunil Khatri <sunil.khatri at amd.com>
Sent: Tuesday, March 12, 2024 6:11:47 PM
To: Deucher, Alexander <Alexander.Deucher at amd.com>; Koenig, Christian <Christian.Koenig at amd.com>; Sharma, Shashank <Shashank.Sharma at amd.com>
Cc: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>; dri-devel at lists.freedesktop.org <dri-devel at lists.freedesktop.org>; linux-kernel at vger.kernel.org <linux-kernel at vger.kernel.org>; Khatri, Sunil <Sunil.Khatri at amd.com>
Subject: [PATCH 1/2] drm/amdgpu: add the IP information of the soc

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

Signed-off-by: Sunil Khatri <sunil.khatri at 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20240313/5dd40c1f/attachment.htm>


More information about the dri-devel mailing list