Re: [CI] drm/i915/gt: Refactor hangcheck selftest to use igt_spinner

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/19/2023 15:50, Andi Shyti wrote:
From: Jonathan Cavitt <jonathan.cavitt@xxxxxxxxx>

The hangcheck live selftest contains duplicate declarations of some
functions that already exist in igt_spinner.c, such as the creation and
deconstruction of a spinning batch buffer (spinner) that hangs an engine.
It's undesireable to have such code duplicated, as the requirements for
the spinner may change with hardware updates, necessitating both
execution paths be updated.  To avoid this, have the hangcheck live
selftest use the declaration from igt_spinner.  This eliminates the need
for the declarations in the selftest itself, as well as the associated
local helper structures, so we can erase those.

Suggested-by: Matt Roper <matthew.d.roper@xxxxxxxxx>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@xxxxxxxxx>
---
  drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 457 ++++++-------------
  drivers/gpu/drm/i915/selftests/igt_spinner.c |  15 +-
  drivers/gpu/drm/i915/selftests/igt_spinner.h |   9 +
  3 files changed, 155 insertions(+), 326 deletions(-)
[snip]

-		pr_err("[%s] Hang init failed: %d!\n", engine->name, err);
+		pr_err("[%s] Spinner init failed: %d!\n", engine->name, err);
If this code is being touched, can you also change it to use gt_err instead of pr_err? And gt_info instead of pr_info, etc. The pr_err functions are the worst of the worst for message prints, they don't even tag the output with 'i915' let alone anything useful like which GT it was or which card in a multi-card system.

John.




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux