mbox series

[v3,0/6] Allow error capture without a request & fix locking issues

Message ID 20230119065000.1661857-1-John.C.Harrison@Intel.com (mailing list archive)
Headers show
Series Allow error capture without a request & fix locking issues | expand

Message

John Harrison Jan. 19, 2023, 6:49 a.m. UTC
From: John Harrison <John.C.Harrison@Intel.com>

It is technically possible to get a hung context without a valid
request. In such a situation, try to provide as much information in
the error capture as possible rather than just aborting and capturing
nothing.

Similarly, in the case of an engine reset failure the GuC is not able
to report the guilty context. So try a manual search instead of
reporting nothing.

While doing all this, it was noticed that the locking was broken in a
number of places when searching for hung requests and dumping request
info. So fix all that up as well.

v2: Tidy up code flow in error capture. Reword some comments/messages.
(review feedback from Tvrtko)
Also fix up request locking issues from earlier changes noticed during
code review of this change.
v3: Fix some potential null pointer derefs and a reference leak.
Add new patch to refactor the duplicated hung request search code into
a common backend agnostic wrapper function and use the correct
spinlocks for the correct lists. Also tweak some of the patch
descriptions for better accuracy.

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>


John Harrison (6):
  drm/i915: Fix request locking during error capture & debugfs dump
  drm/i915: Fix up locking around dumping requests lists
  drm/i915: Allow error capture without a request
  drm/i915: Allow error capture of a pending request
  drm/i915/guc: Look for a guilty context when an engine reset fails
  drm/i915/guc: Add a debug print on GuC triggered reset

 drivers/gpu/drm/i915/gt/intel_context.c       | 31 +++++++
 drivers/gpu/drm/i915/gt/intel_context.h       |  3 +
 drivers/gpu/drm/i915/gt/intel_engine_cs.c     | 49 ++++++-----
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 34 ++++++-
 drivers/gpu/drm/i915/i915_gpu_error.c         | 88 ++++++++++---------
 5 files changed, 138 insertions(+), 67 deletions(-)