drm/xe: Make devcoredump VM error state print consistent

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

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240307135229.41973-1-jose.souza@intel.com
parent 070f8fd6
...@@ -3458,12 +3458,15 @@ void xe_vm_snapshot_print(struct xe_vm_snapshot *snap, struct drm_printer *p) ...@@ -3458,12 +3458,15 @@ void xe_vm_snapshot_print(struct xe_vm_snapshot *snap, struct drm_printer *p)
unsigned long i, j; unsigned long i, j;
for (i = 0; i < snap->num_snaps; i++) { 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].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)) { for (j = 0; j < snap->snap[i].len; j += sizeof(u32)) {
u32 *val = snap->snap[i].data + j; u32 *val = snap->snap[i].data + j;
...@@ -3473,12 +3476,6 @@ void xe_vm_snapshot_print(struct xe_vm_snapshot *snap, struct drm_printer *p) ...@@ -3473,12 +3476,6 @@ void xe_vm_snapshot_print(struct xe_vm_snapshot *snap, struct drm_printer *p)
} }
drm_puts(p, "\n"); 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));
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment