Skip to content

Commit 4e65d10

Browse files
johnharr-inteldceraolo
authored andcommitted
drm/i915/guc: Enable CT_DEAD output in regular debug builds
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
1 parent dccf655 commit 4e65d10

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "intel_guc_ct.h"
1414
#include "intel_guc_print.h"
1515

16-
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC)
16+
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
1717
enum {
1818
CT_DEAD_ALIVE = 0,
1919
CT_DEAD_SETUP,
@@ -144,7 +144,7 @@ void intel_guc_ct_init_early(struct intel_guc_ct *ct)
144144
spin_lock_init(&ct->requests.lock);
145145
INIT_LIST_HEAD(&ct->requests.pending);
146146
INIT_LIST_HEAD(&ct->requests.incoming);
147-
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC)
147+
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
148148
INIT_WORK(&ct->dead_ct_worker, ct_dead_ct_worker_func);
149149
#endif
150150
INIT_WORK(&ct->requests.worker, ct_incoming_request_worker_func);
@@ -373,7 +373,7 @@ int intel_guc_ct_enable(struct intel_guc_ct *ct)
373373

374374
ct->enabled = true;
375375
ct->stall_time = KTIME_MAX;
376-
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC)
376+
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
377377
ct->dead_ct_reported = false;
378378
ct->dead_ct_reason = CT_DEAD_ALIVE;
379379
#endif
@@ -1377,7 +1377,7 @@ void intel_guc_ct_print_info(struct intel_guc_ct *ct,
13771377
ct->ctbs.recv.desc->tail);
13781378
}
13791379

1380-
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC)
1380+
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
13811381
static void ct_dead_ct_worker_func(struct work_struct *w)
13821382
{
13831383
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)
13861386
if (ct->dead_ct_reported)
13871387
return;
13881388

1389+
if (i915_error_injected())
1390+
return;
1391+
13891392
ct->dead_ct_reported = true;
13901393

13911394
guc_info(guc, "CTB is dead - reason=0x%X\n", ct->dead_ct_reason);

drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ struct intel_guc_ct {
9797
/** @stall_time: time of first time a CTB submission is stalled */
9898
ktime_t stall_time;
9999

100-
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC)
100+
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
101101
int dead_ct_reason;
102102
bool dead_ct_reported;
103103
struct work_struct dead_ct_worker;

0 commit comments

Comments
 (0)