<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[AMD Official Use Only - General]<br>
</p>
<br>
<div>
<div dir="auto">Gentle reminder for review.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Regards</div>
<div dir="auto">Sunil </div>
<div><br>
</div>
<div id="ms-outlook-mobile-signature" dir="auto">Get <a href="https://aka.ms/AAb9ysg">
Outlook for Android</a></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Sunil Khatri <sunil.khatri@amd.com><br>
<b>Sent:</b> Tuesday, March 12, 2024 6:11:47 PM<br>
<b>To:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Sharma, Shashank <Shashank.Sharma@amd.com><br>
<b>Cc:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; Khatri, Sunil <Sunil.Khatri@amd.com><br>
<b>Subject:</b> [PATCH 1/2] drm/amdgpu: add the IP information of the soc</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Add all the IP's information on a SOC to the<br>
devcoredump.<br>
<br>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 19 +++++++++++++++++++<br>
 1 file changed, 19 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c<br>
index a0dbccad2f53..611fdb90a1fc 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c<br>
@@ -196,6 +196,25 @@ amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count,<br>
                            coredump->reset_task_info.process_name,<br>
                            coredump->reset_task_info.pid);<br>
 <br>
+       /* GPU IP's information of the SOC */<br>
+       if (coredump->adev) {<br>
+               drm_printf(&p, "\nIP Information\n");<br>
+               drm_printf(&p, "SOC Family: %d\n", coredump->adev->family);<br>
+               drm_printf(&p, "SOC Revision id: %d\n", coredump->adev->rev_id);<br>
+<br>
+               for (int i = 0; i < coredump->adev->num_ip_blocks; i++) {<br>
+                       struct amdgpu_ip_block *ip =<br>
+                               &coredump->adev->ip_blocks[i];<br>
+                       drm_printf(&p, "IP type: %d IP name: %s\n",<br>
+                                  ip->version->type,<br>
+                                  ip->version->funcs->name);<br>
+                       drm_printf(&p, "IP version: (%d,%d,%d)\n\n",<br>
+                                  ip->version->major,<br>
+                                  ip->version->minor,<br>
+                                  ip->version->rev);<br>
+               }<br>
+       }<br>
+<br>
         if (coredump->ring) {<br>
                 drm_printf(&p, "\nRing timed out details\n");<br>
                 drm_printf(&p, "IP Type: %d Ring Name: %s\n",<br>
-- <br>
2.34.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>