All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sunil Khatri <sunil.khatri@amd.com>
To: "Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Cc: amd-gfx@lists.freedesktop.org, Sunil Khatri <sunil.khatri@amd.com>
Subject: [PATCH v5 6/6] drm/amdgpu: add ip dump for each ip in devcoredump
Date: Wed, 17 Apr 2024 15:08:09 +0530	[thread overview]
Message-ID: <20240417093809.168002-6-sunil.khatri@amd.com> (raw)
In-Reply-To: <20240417093809.168002-1-sunil.khatri@amd.com>

Add ip dump for each ip of the asic in the
devcoredump for all the ips where a callback
is registered for register dump.

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

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
index 64fe564b8036..c1cb62683695 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
@@ -262,6 +262,20 @@ amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count,
 	drm_printf(&p, "Faulty page starting at address: 0x%016llx\n", fault_info->addr);
 	drm_printf(&p, "Protection fault status register: 0x%x\n\n", fault_info->status);
 
+	/* dump the ip state for each ip */
+	drm_printf(&p, "IP Dump\n");
+	for (int i = 0; i < coredump->adev->num_ip_blocks; i++) {
+		if (coredump->adev->ip_blocks[i].version->funcs->print_ip_state) {
+			drm_printf(&p, "IP: %s\n",
+				   coredump->adev->ip_blocks[i]
+					   .version->funcs->name);
+			coredump->adev->ip_blocks[i]
+				.version->funcs->print_ip_state(
+					(void *)coredump->adev, &p);
+			drm_printf(&p, "\n");
+		}
+	}
+
 	/* Add ring buffer information */
 	drm_printf(&p, "Ring buffer information\n");
 	for (int i = 0; i < coredump->adev->num_rings; i++) {
-- 
2.34.1


  parent reply	other threads:[~2024-04-17  9:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17  9:38 [PATCH v5 1/6] drm/amdgpu: add prototype for ip dump Sunil Khatri
2024-04-17  9:38 ` [PATCH v5 2/6] drm/amdgpu: add support of gfx10 register dump Sunil Khatri
2024-04-17 15:51   ` Alex Deucher
2024-04-17 16:01     ` Lazar, Lijo
2024-04-17 16:11       ` Khatri, Sunil
2024-04-17 16:23         ` Lazar, Lijo
2024-04-17 16:51           ` Alex Deucher
2024-04-17 17:01             ` Khatri, Sunil
2024-04-17 17:30               ` Alex Deucher
2024-04-18  6:12                 ` Christian König
2024-04-17  9:38 ` [PATCH v5 3/6] drm/amdgpu: add protype for print ip state Sunil Khatri
2024-04-17 15:48   ` Alex Deucher
2024-04-17  9:38 ` [PATCH v5 4/6] drm/amdgpu: add support for gfx v10 print Sunil Khatri
2024-04-17 15:52   ` Alex Deucher
2024-04-17  9:38 ` [PATCH v5 5/6] drm/amdgpu: dump ip state before reset for each ip Sunil Khatri
2024-04-17 15:52   ` Alex Deucher
2024-04-17  9:38 ` Sunil Khatri [this message]
2024-04-17 15:53   ` [PATCH v5 6/6] drm/amdgpu: add ip dump for each ip in devcoredump Alex Deucher
2024-04-17 15:45 ` [PATCH v5 1/6] drm/amdgpu: add prototype for ip dump Alex Deucher
2024-04-18  8:45   ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240417093809.168002-6-sunil.khatri@amd.com \
    --to=sunil.khatri@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.