[Intel-gfx] [PATCH] drm/i915/guc: Don't error on reset of banned context

John.C.Harrison at Intel.com John.C.Harrison at Intel.com
Fri Jan 7 00:31:43 UTC 2022


From: John Harrison <John.C.Harrison at Intel.com>

There is a race (already documented in the code) whereby a context can
be (re-)queued for submission at the same time as it is being banned
due to a hang and reset. That leads to a hang/reset report from GuC
for a context which i915 thinks is already banned.

While the race is indented to be fixed in a future GuC update, there
is no actual harm beyond the wasted execution time of that new hang
detection period. The context has already been banned for bad
behaviour so a fresh hang is hardly surprising and certainly isn't
going to be losing any work that wouldn't already have been lost if
there was no race.

So don't treat this situation as an error. The error message is seen
by the CI system as something fatal and causes test failures. Instead,
just print an informational so the user at least knows a context reset
occurred (given that the error capture is being skipped).

Signed-off-by: John Harrison <John.C.Harrison at Intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index 9989d121127d..e8a32a7e7daf 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -3978,6 +3978,10 @@ static void guc_handle_context_reset(struct intel_guc *guc,
 		   !context_blocked(ce))) {
 		capture_error_state(guc, ce);
 		guc_context_replay(ce);
+	} else if (intel_context_is_banned(ce)) {
+		drm_info(&guc_to_gt(guc)->i915->drm,
+			 "Reset notificaion for banned context 0x%04X on %s",
+			 ce->guc_id.id, ce->engine->name);
 	} else {
 		drm_err(&guc_to_gt(guc)->i915->drm,
 			"Invalid GuC engine reset notificaion for 0x%04X on %s: banned = %d, blocked = %d",
-- 
2.25.1



More information about the Intel-gfx mailing list