Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/xe: Make devcoredump VM error state print consistent
@ 2024-03-04 14:05 José Roberto de Souza
  2024-03-04 14:05 ` [PATCH 2/4] drm/xe/devcoredump: Print errno if VM snapshot was not captured José Roberto de Souza
                   ` (9 more replies)
  0 siblings, 10 replies; 14+ messages in thread
From: José Roberto de Souza @ 2024-03-04 14:05 UTC (permalink / raw)
  To: intel-xe; +Cc: Maarten Lankhorst, José Roberto de Souza

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


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

end of thread, other threads:[~2024-03-07 10:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-04 14:05 [PATCH 1/4] drm/xe: Make devcoredump VM error state print consistent José Roberto de Souza
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

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