All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/guc: Log engine resets
@ 2021-12-14 15:07 ` Tvrtko Ursulin
  0 siblings, 0 replies; 20+ messages in thread
From: Tvrtko Ursulin @ 2021-12-14 15:07 UTC (permalink / raw)
  To: Intel-gfx; +Cc: Matthew Brost, John Harrison, dri-devel, Tvrtko Ursulin

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Log engine resets done by the GuC firmware in the similar way it is done
by the execlists backend.

This way we have notion of where the hangs are before the GuC gains
support for proper error capture.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

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 97311119da6f..51512123dc1a 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -11,6 +11,7 @@
 #include "gt/intel_context.h"
 #include "gt/intel_engine_pm.h"
 #include "gt/intel_engine_heartbeat.h"
+#include "gt/intel_engine_user.h"
 #include "gt/intel_gpu_commands.h"
 #include "gt/intel_gt.h"
 #include "gt/intel_gt_clock_utils.h"
@@ -3934,9 +3935,18 @@ static void capture_error_state(struct intel_guc *guc,
 {
 	struct intel_gt *gt = guc_to_gt(guc);
 	struct drm_i915_private *i915 = gt->i915;
-	struct intel_engine_cs *engine = __context_to_physical_engine(ce);
+	struct intel_engine_cs *engine = ce->engine;
 	intel_wakeref_t wakeref;
 
+	if (intel_engine_is_virtual(engine)) {
+		drm_notice(&i915->drm, "%s class, engines 0x%x; GuC engine reset\n",
+			   intel_engine_class_repr(engine->class),
+			   engine->mask);
+		engine = guc_virtual_get_sibling(engine, 0);
+	} else {
+		drm_notice(&i915->drm, "%s GuC engine reset\n", engine->name);
+	}
+
 	intel_engine_set_hung_context(engine, ce);
 	with_intel_runtime_pm(&i915->runtime_pm, wakeref)
 		i915_capture_error_state(gt, engine->mask);
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-12-24 11:57 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 15:07 [PATCH] drm/i915/guc: Log engine resets Tvrtko Ursulin
2021-12-14 15:07 ` [Intel-gfx] " Tvrtko Ursulin
2021-12-14 16:33 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-12-14 22:25 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-12-17 12:15 ` [Intel-gfx] [PATCH] " Tvrtko Ursulin
2021-12-17 12:15   ` Tvrtko Ursulin
2021-12-17 16:22   ` Matthew Brost
2021-12-17 16:22     ` Matthew Brost
2021-12-20 15:00     ` Tvrtko Ursulin
2021-12-20 15:00       ` Tvrtko Ursulin
2021-12-20 17:55       ` Matthew Brost
2021-12-20 17:55         ` Matthew Brost
2021-12-20 18:34       ` John Harrison
2021-12-21 13:37         ` Tvrtko Ursulin
2021-12-21 22:14           ` John Harrison
2021-12-22 16:21             ` Tvrtko Ursulin
2021-12-22 21:58               ` John Harrison
2021-12-23 10:23                 ` Tvrtko Ursulin
2021-12-23 17:35                   ` John Harrison
2021-12-24 11:57                     ` Tvrtko Ursulin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.