]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/i915/guc: Enable CT_DEAD output in regular debug builds
authorJohn Harrison <John.C.Harrison@Intel.com>
Sat, 14 Jun 2025 03:02:22 +0000 (20:02 -0700)
committerDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Thu, 3 Jul 2025 21:05:10 +0000 (14:05 -0700)
There is a sporadic failure to enable CTs ocurring in CI on one
specific machine that can't be reproduced locally. The driver already
supports dumping out a whole bunch of GuC related debug info on such a
failure but only when the verbose GuC debug config option is enabled.
It would be preferable to not enable all the verbose debug output. So
just bump the CT_DEAD code to regular I915 debug level rather than GUC
debug level, at least temporarily for CI.

To prevent excessive spam in other parts of CI, also add a check
against doing a CT_DEAD dump during an error injection test. No point
in dumping large amounts of 'why did this fail' info when the fail is
deliberately induced.

v2: Revert accidentally enabling some other verbose debug output.

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://lore.kernel.org/r/20250614030222.105601-1-John.C.Harrison@Intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h

index 0d5197c0824a91b5e923a2ac72a9ebea65ecfc48..380a11c92d632a66b122ed30447b6729a3781fca 100644 (file)
@@ -13,7 +13,7 @@
 #include "intel_guc_ct.h"
 #include "intel_guc_print.h"
 
-#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC)
+#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
 enum {
        CT_DEAD_ALIVE = 0,
        CT_DEAD_SETUP,
@@ -144,7 +144,7 @@ void intel_guc_ct_init_early(struct intel_guc_ct *ct)
        spin_lock_init(&ct->requests.lock);
        INIT_LIST_HEAD(&ct->requests.pending);
        INIT_LIST_HEAD(&ct->requests.incoming);
-#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC)
+#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
        INIT_WORK(&ct->dead_ct_worker, ct_dead_ct_worker_func);
 #endif
        INIT_WORK(&ct->requests.worker, ct_incoming_request_worker_func);
@@ -373,7 +373,7 @@ int intel_guc_ct_enable(struct intel_guc_ct *ct)
 
        ct->enabled = true;
        ct->stall_time = KTIME_MAX;
-#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC)
+#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
        ct->dead_ct_reported = false;
        ct->dead_ct_reason = CT_DEAD_ALIVE;
 #endif
@@ -1377,7 +1377,7 @@ void intel_guc_ct_print_info(struct intel_guc_ct *ct,
                   ct->ctbs.recv.desc->tail);
 }
 
-#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC)
+#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
 static void ct_dead_ct_worker_func(struct work_struct *w)
 {
        struct intel_guc_ct *ct = container_of(w, struct intel_guc_ct, dead_ct_worker);
@@ -1386,6 +1386,9 @@ static void ct_dead_ct_worker_func(struct work_struct *w)
        if (ct->dead_ct_reported)
                return;
 
+       if (i915_error_injected())
+               return;
+
        ct->dead_ct_reported = true;
 
        guc_info(guc, "CTB is dead - reason=0x%X\n", ct->dead_ct_reason);
index 2c4bb9a941be602db44afae192f4cf3ddec1b4b3..e9a6ec4e6d387c2205259dbf53a6c047ce8d74a4 100644 (file)
@@ -97,7 +97,7 @@ struct intel_guc_ct {
        /** @stall_time: time of first time a CTB submission is stalled */
        ktime_t stall_time;
 
-#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC)
+#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
        int dead_ct_reason;
        bool dead_ct_reported;
        struct work_struct dead_ct_worker;