Skip to content

Commit 68172f2

Browse files
committed
drm/i915: Pull printing GT capabilities on error to err_print_gt
We try not to assume that we captured any information, and so have to check that error->gt exists before reporting. This check was missed in err_print_capabilities, so lets break up the capability info and push it into the GT dump. We are still a long way from yamlifying this output! Reported-by: Dan Carpenter <[email protected]> Fixes: 792592e ("drm/i915: Move the engine mask to intel_gt_info") Signed-off-by: Chris Wilson <[email protected]> Cc: Daniele Ceraolo Spurio <[email protected]> Cc: Dan Carpenter <[email protected]> Reviewed-by: Daniele Ceraolo Spurio <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent b2295e2 commit 68172f2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

drivers/gpu/drm/i915/i915_gpu_error.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,6 @@ static void err_print_capabilities(struct drm_i915_error_state_buf *m,
626626

627627
intel_device_info_print_static(&error->device_info, &p);
628628
intel_device_info_print_runtime(&error->runtime_info, &p);
629-
intel_gt_info_print(&error->gt->info, &p);
630-
intel_sseu_print_topology(&error->gt->info.sseu, &p);
631629
intel_driver_caps_print(&error->driver_caps, &p);
632630
}
633631

@@ -678,6 +676,15 @@ static void err_free_sgl(struct scatterlist *sgl)
678676
}
679677
}
680678

679+
static void err_print_gt_info(struct drm_i915_error_state_buf *m,
680+
struct intel_gt_coredump *gt)
681+
{
682+
struct drm_printer p = i915_error_printer(m);
683+
684+
intel_gt_info_print(&gt->info, &p);
685+
intel_sseu_print_topology(&gt->info.sseu, &p);
686+
}
687+
681688
static void err_print_gt(struct drm_i915_error_state_buf *m,
682689
struct intel_gt_coredump *gt)
683690
{
@@ -734,6 +741,8 @@ static void err_print_gt(struct drm_i915_error_state_buf *m,
734741

735742
if (gt->uc)
736743
err_print_uc(m, gt->uc);
744+
745+
err_print_gt_info(m, gt);
737746
}
738747

739748
static void __err_print_to_sgl(struct drm_i915_error_state_buf *m,

0 commit comments

Comments
 (0)