[PATCH] drm/xe: Add helper function to inject fault into ct_dead_capture()
Satyanarayana K V P
satyanarayana.k.v.p at intel.com
Tue Apr 29 13:46:49 UTC 2025
When injecting fault to xe_guc_ct_send_recv() & xe_guc_mmio_send_recv()
functions, the CI test systems are going out of space and crashing. To
avoid this issue, a new helper function is created and when fault is injected
into this xe_should_fail_ct_dead_capture() helper function, ct dead capture is
avoided which suppresses ct dumps in the log.
Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p at intel.com>
Suggested-by: John Harrison <John.C.Harrison at Intel.com>
Tested-by: Aditya Chauhan <aditya.chauhan at intel.com>
---
drivers/gpu/drm/xe/xe_guc_ct.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index 2447de0ebedf..3a49e432f74a 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -1770,6 +1770,12 @@ void xe_guc_ct_print(struct xe_guc_ct *ct, struct drm_printer *p, bool want_ctb)
}
#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
+static noinline int xe_should_fail_ct_dead_capture(void)
+{
+ return 0;
+}
+ALLOW_ERROR_INJECTION(xe_should_fail_ct_dead_capture, ERRNO);
+
static void ct_dead_capture(struct xe_guc_ct *ct, struct guc_ctb *ctb, u32 reason_code)
{
struct xe_guc_log_snapshot *snapshot_log;
@@ -1778,6 +1784,13 @@ static void ct_dead_capture(struct xe_guc_ct *ct, struct guc_ctb *ctb, u32 reaso
unsigned long flags;
bool have_capture;
+ /*
+ * Huge dump is getting generated when injecting error for guc CT/MMIO
+ * functions. So, let us suppress the dump when fault is injected.
+ */
+ if (xe_should_fail_ct_dead_capture())
+ return;
+
if (ctb)
ctb->info.broken = true;
--
2.43.0
More information about the Intel-xe
mailing list