[PATCH 4/4] HAX wip debugging + messages for igt analysis

Alan Previn alan.previn.teres.alexis at intel.com
Wed Sep 14 05:51:23 UTC 2022


HAX wip debugging + messages for igt analysis
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 10 ++++++++++
 1 file changed, 10 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 34844f8ea0b0..8343cc3bc95b 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -1543,6 +1543,7 @@ static void guc_flush_submissions(struct intel_guc *guc)
 	spin_unlock_irqrestore(&sched_engine->lock, flags);
 }
 
+static int mid_reset_during_flush = 0;
 static void guc_flush_destroyed_contexts(struct intel_guc *guc);
 static void guc_flush_all_delayed_disable_sched_contexts(struct intel_guc *guc);
 
@@ -3072,7 +3073,11 @@ static void __delay_sched_disable(struct work_struct *wrk)
 	if (bypass_sched_disable(guc, ce)) {
 		spin_unlock_irqrestore(&ce->guc_state.lock, flags);
 		intel_context_sched_disable_unpin(ce);
+		if (mid_reset_during_flush)
+			DRM_INFO("ALANPREVIN delay-disable-worker immmediate unpin");
 	} else {
+		if (mid_reset_during_flush)
+			DRM_INFO("ALANPREVIN delay-disable-worker do-disable");
 		do_sched_disable(guc, ce, flags);
 	}
 }
@@ -3123,12 +3128,15 @@ static void guc_flush_all_delayed_disable_sched_contexts(struct intel_guc *guc)
 	unsigned long ceflags;
 
 	xa_lock_irqsave(&guc->context_lookup, flags);
+	DRM_INFO("ALANPREVIN - start flushing all delay-disable workers");
+	mid_reset_during_flush = 1;
 	xa_for_each(&guc->context_lookup, index, ce) {
 		if (!kref_get_unless_zero(&ce->ref))
 			continue;
 		xa_unlock(&guc->context_lookup);
 		if (test_bit(CONTEXT_GUC_INIT, &ce->flags) &&
 		    cancel_delayed_work(&ce->guc_state.sched_disable_delay)) {
+			DRM_INFO("ALANPREVIN - context with cancelled delay-disable");
 			spin_lock_irqsave(&ce->guc_state.lock, ceflags);
 			spin_unlock_irqrestore(&ce->guc_state.lock, ceflags);
 			intel_context_sched_disable_unpin(ce);
@@ -3136,6 +3144,8 @@ static void guc_flush_all_delayed_disable_sched_contexts(struct intel_guc *guc)
 		intel_context_put(ce);
 		xa_lock(&guc->context_lookup);
 	}
+	mid_reset_during_flush = 0;
+	DRM_INFO("ALANPREVIN - done flushing all delay-disable workers");
 	xa_unlock_irqrestore(&guc->context_lookup, flags);
 }
 
-- 
2.25.1



More information about the Intel-gfx-trybot mailing list