From: John.C.Harrison@Intel.com
To: Intel-Xe@Lists.FreeDesktop.Org
Cc: John Harrison <John.C.Harrison@Intel.com>
Subject: [PATCH 2/2] drm/xe/guc: Support crash dump notification from GuC
Date: Fri, 8 Nov 2024 13:27:37 -0800 [thread overview]
Message-ID: <20241108212737.2044007-3-John.C.Harrison@Intel.com> (raw)
In-Reply-To: <20241108212737.2044007-1-John.C.Harrison@Intel.com>
From: John Harrison <John.C.Harrison@Intel.com>
Add support for the two crash dump notifications from GuC. Either one
means GuC is toast, so just capture state trigger a reset.
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
---
drivers/gpu/drm/xe/xe_guc_ct.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index 63bd91963eb1..7eb175a0b874 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -54,6 +54,7 @@ enum {
CT_DEAD_PARSE_G2H_UNKNOWN, /* 0x1000 */
CT_DEAD_PARSE_G2H_ORIGIN, /* 0x2000 */
CT_DEAD_PARSE_G2H_TYPE, /* 0x4000 */
+ CT_DEAD_CRASH, /* 0x8000 */
};
static void ct_dead_worker_func(struct work_struct *w);
@@ -1120,6 +1121,24 @@ static int parse_g2h_event(struct xe_guc_ct *ct, u32 *msg, u32 len)
return 0;
}
+static int guc_crash_process_msg(struct xe_guc_ct *ct, u32 action)
+{
+ struct xe_gt *gt = ct_to_gt(ct);
+
+ if (action == XE_GUC_ACTION_NOTIFY_CRASH_DUMP_POSTED)
+ xe_gt_err(gt, "GuC Crash dump notification\n");
+ else if (action == XE_GUC_ACTION_NOTIFY_EXCEPTION)
+ xe_gt_err(gt, "GuC Exception notification\n");
+ else
+ xe_gt_err(gt, "Unknown GuC crash notification: 0x%04X\n", action);
+
+ CT_DEAD(ct, NULL, CRASH);
+
+ kick_reset(ct);
+
+ return 0;
+}
+
static int parse_g2h_response(struct xe_guc_ct *ct, u32 *msg, u32 len)
{
struct xe_gt *gt = ct_to_gt(ct);
@@ -1294,6 +1313,10 @@ static int process_g2h_msg(struct xe_guc_ct *ct, u32 *msg, u32 len)
case GUC_ACTION_GUC2PF_ADVERSE_EVENT:
ret = xe_gt_sriov_pf_monitor_process_guc2pf(gt, hxg, hxg_len);
break;
+ case XE_GUC_ACTION_NOTIFY_CRASH_DUMP_POSTED:
+ case XE_GUC_ACTION_NOTIFY_EXCEPTION:
+ ret = guc_crash_process_msg(ct, action);
+ break;
default:
xe_gt_err(gt, "unexpected G2H action 0x%04x\n", action);
}
--
2.47.0
next prev parent reply other threads:[~2024-11-08 21:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 21:27 [PATCH 0/2] drm/xe/guc: Handle crash notifications & drop default log verbosity John.C.Harrison
2024-11-08 21:27 ` [PATCH 1/2] drm/xe/guc: Reduce default GuC " John.C.Harrison
2024-11-08 23:33 ` Matthew Brost
2024-11-08 23:49 ` John Harrison
2024-11-08 21:27 ` John.C.Harrison [this message]
2024-11-08 23:35 ` [PATCH 2/2] drm/xe/guc: Support crash dump notification from GuC Matthew Brost
2024-11-08 23:51 ` John Harrison
2024-11-08 23:56 ` Matthew Brost
2024-11-09 0:39 ` John Harrison
2024-11-09 2:09 ` John Harrison
2024-11-08 21:50 ` [PATCH 0/2] drm/xe/guc: Handle crash notifications & drop default log verbosity Cavitt, Jonathan
2024-11-08 22:28 ` ✓ CI.Patch_applied: success for " Patchwork
2024-11-08 22:28 ` ✓ CI.checkpatch: " Patchwork
2024-11-08 22:29 ` ✓ CI.KUnit: " Patchwork
2024-11-08 22:41 ` ✓ CI.Build: " Patchwork
2024-11-08 22:43 ` ✓ CI.Hooks: " Patchwork
2024-11-08 22:45 ` ✓ CI.checksparse: " Patchwork
2024-11-08 23:02 ` ✓ CI.BAT: " Patchwork
2024-11-10 1:47 ` ✗ CI.FULL: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241108212737.2044007-3-John.C.Harrison@Intel.com \
--to=john.c.harrison@intel.com \
--cc=Intel-Xe@Lists.FreeDesktop.Org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox