[PATCH v2] drm/i915/guc: Enable CT_DEAD output in regular debug builds

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Tue Jul 1 21:21:00 UTC 2025



On 6/13/2025 8:02 PM, John.C.Harrison at Intel.com wrote:
> From: John Harrison <John.C.Harrison at Intel.com>
>
> 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 at Intel.com>

Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>

Daniele

> ---
>   drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 11 +++++++----
>   drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h |  2 +-
>   2 files changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
> index 0d5197c0824a9..380a11c92d632 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
> @@ -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);
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h
> index 2c4bb9a941be6..e9a6ec4e6d387 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h
> @@ -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;



More information about the Intel-gfx mailing list