Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "José Roberto de Souza" <jose.souza@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"José Roberto de Souza" <jose.souza@intel.com>
Subject: [PATCH 1/4] drm/xe: Make devcoredump VM error state print consistent
Date: Mon,  4 Mar 2024 06:05:11 -0800	[thread overview]
Message-ID: <20240304140514.24768-1-jose.souza@intel.com> (raw)

This makes VM error consistent with [x].length and [x].data.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/xe/xe_vm.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 643b3701a7386..df9360a4c9e8e 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -3435,12 +3435,15 @@ void xe_vm_snapshot_print(struct xe_vm_snapshot *snap, struct drm_printer *p)
 	unsigned long i, j;
 
 	for (i = 0; i < snap->num_snaps; i++) {
-		if (IS_ERR(snap->snap[i].data))
-			goto uncaptured;
-
 		drm_printf(p, "[%llx].length: 0x%lx\n", snap->snap[i].ofs, snap->snap[i].len);
-		drm_printf(p, "[%llx].data: ",
-			   snap->snap[i].ofs);
+
+		if (IS_ERR(snap->snap[i].data)) {
+			drm_printf(p, "[%llx].error: %li\n", snap->snap[i].ofs,
+				   PTR_ERR(snap->snap[i].data));
+			continue;
+		}
+
+		drm_printf(p, "[%llx].data: ", snap->snap[i].ofs);
 
 		for (j = 0; j < snap->snap[i].len; j += sizeof(u32)) {
 			u32 *val = snap->snap[i].data + j;
@@ -3450,12 +3453,6 @@ void xe_vm_snapshot_print(struct xe_vm_snapshot *snap, struct drm_printer *p)
 		}
 
 		drm_puts(p, "\n");
-		continue;
-
-uncaptured:
-		drm_printf(p, "Unable to capture range [%llx-%llx]: %li\n",
-			   snap->snap[i].ofs, snap->snap[i].ofs + snap->snap[i].len - 1,
-			   PTR_ERR(snap->snap[i].data));
 	}
 }
 
-- 
2.44.0


             reply	other threads:[~2024-03-04 14:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04 14:05 José Roberto de Souza [this message]
2024-03-04 14:05 ` [PATCH 2/4] drm/xe/devcoredump: Print errno if VM snapshot was not captured José Roberto de Souza
2024-03-07 10:50   ` Maarten Lankhorst
2024-03-04 14:05 ` [PATCH 3/4] drm/xe/devcoredump: Lock snap_mutex earlier José Roberto de Souza
2024-03-07 10:53   ` Maarten Lankhorst
2024-03-04 14:05 ` [PATCH 4/4] drm/xe: Nuke EXEC_QUEUE_FLAG_PERSISTENT José Roberto de Souza
2024-03-07 10:54   ` Maarten Lankhorst
2024-03-05  5:35 ` ✓ CI.Patch_applied: success for series starting with [1/4] drm/xe: Make devcoredump VM error state print consistent (rev2) Patchwork
2024-03-05  5:35 ` ✗ CI.checkpatch: warning " Patchwork
2024-03-05  5:36 ` ✓ CI.KUnit: success " Patchwork
2024-03-05  5:47 ` ✓ CI.Build: " Patchwork
2024-03-05  5:47 ` ✓ CI.Hooks: " Patchwork
2024-03-05  5:49 ` ✓ CI.checksparse: " Patchwork
2024-03-05  6:09 ` ✓ CI.BAT: " Patchwork

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=20240304140514.24768-1-jose.souza@intel.com \
    --to=jose.souza@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox