From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: daniele.ceraolospurio@intel.com, michal.wajdeczko@intel.com,
aravind.iddamsetty@intel.com, mallesh.koujalagi@intel.com,
alan.previn.teres.alexis@intel.com, julia.filipchuk@intel.com
Subject: [PATCH v5 3/7] drm/xe/guc: Make ct_dead_capture available on non-debug config
Date: Fri, 18 Sep 2026 22:00:59 -0700 [thread overview]
Message-ID: <20260919050055.2092579-12-umesh.nerlige.ramappa@intel.com> (raw)
In-Reply-To: <20260919050055.2092579-9-umesh.nerlige.ramappa@intel.com>
Define ct_dead_capture for non-debug as well to simplify future
refactor.
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
v2: Fix CI build failure
---
drivers/gpu/drm/xe/xe_guc_ct.c | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index b3a6aa37808b..5dbda0fe20f3 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -59,7 +59,10 @@ static struct xe_device *ct_to_xe(struct xe_guc_ct *ct)
return gt_to_xe(ct_to_gt(ct));
}
-#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
+#define ct_id(reason_code) CT_DEAD_##reason_code
+#define CT_DEAD(ct, ctb, reason_code) ct_dead_capture((ct), (ctb), ct_id(reason_code))
+static void ct_dead_capture(struct xe_guc_ct *ct, struct guc_ctb *ctb, u32 reason_code);
+
enum {
/* Internal states, not error conditions */
CT_DEAD_STATE_REARM, /* 0x0001 */
@@ -82,8 +85,8 @@ enum {
CT_DEAD_CRASH, /* 0x8000 */
};
+#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
static void ct_dead_worker_func(struct work_struct *w);
-static void ct_dead_capture(struct xe_guc_ct *ct, struct guc_ctb *ctb, u32 reason_code);
static void ct_dead_fini(struct xe_guc_ct *ct)
{
@@ -162,9 +165,6 @@ static void fast_req_track(struct xe_guc_ct *ct, u16 fence, u16 action)
ct->fast_req[slot].fence = fence;
ct->fast_req[slot].action = action;
}
-
-#define CT_DEAD(ct, ctb, reason_code) ct_dead_capture((ct), (ctb), CT_DEAD_##reason_code)
-
#else
static void ct_dead_fini(struct xe_guc_ct *ct) { }
@@ -173,13 +173,6 @@ static void ct_dead_init(struct xe_guc_ct *ct) { }
static void fast_req_report(struct xe_guc_ct *ct, u16 fence) { }
static void fast_req_track(struct xe_guc_ct *ct, u16 fence, u16 action) { }
-#define CT_DEAD(ct, ctb, reason) \
- do { \
- struct guc_ctb *_ctb = (ctb); \
- if (_ctb) \
- _ctb->info.broken = true; \
- } while (0)
-
#endif
/* Used when a CT send wants to block and / or receive data */
@@ -2376,4 +2369,10 @@ static void ct_dead_worker_func(struct work_struct *w)
spin_unlock_irq(&ct->dead.lock);
}
+#else
+static void ct_dead_capture(struct xe_guc_ct *ct, struct guc_ctb *ctb, u32 reason_code)
+{
+ if (ctb)
+ ctb->info.broken = true;
+}
#endif
--
2.55.0
next prev parent reply other threads:[~2026-09-19 5:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-19 5:00 [PATCH v5 0/7] Use SIG_ID logs for GuC component Umesh Nerlige Ramappa
2026-09-19 5:00 ` [PATCH v5 1/7] drm/xe/guc: Use different error codes for GuC load errors Umesh Nerlige Ramappa
2026-09-19 5:00 ` [PATCH v5 2/7] drm/xe/guc: Handle CRASH and EXCEPTION G2H with separate helpers Umesh Nerlige Ramappa
2026-09-19 5:09 ` sashiko-bot
2026-09-19 5:00 ` Umesh Nerlige Ramappa [this message]
2026-09-19 5:01 ` [PATCH v5 4/7] drm/xe/guc: Cleanup error codes and handling for CT errors Umesh Nerlige Ramappa
2026-09-19 5:14 ` sashiko-bot
2026-09-19 5:01 ` [PATCH v5 5/7] drm/xe/uc: Report DMA failure using SIGID Umesh Nerlige Ramappa
2026-09-19 5:01 ` [PATCH v5 6/7] drm/xe/guc: Report major GuC failures " Umesh Nerlige Ramappa
2026-09-19 5:01 ` [PATCH v5 7/7] drm/xe/guc: Report errors that cause a CT shutdown " Umesh Nerlige Ramappa
2026-09-19 5:07 ` ✗ CI.checkpatch: warning for Use SIG_ID logs for GuC component (rev4) Patchwork
2026-09-19 5:09 ` ✓ CI.KUnit: success " Patchwork
2026-09-19 5:48 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-09-19 8:33 ` ✗ Xe.CI.FULL: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260919050055.2092579-12-umesh.nerlige.ramappa@intel.com \
--to=umesh.nerlige.ramappa@intel.com \
--cc=alan.previn.teres.alexis@intel.com \
--cc=aravind.iddamsetty@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=julia.filipchuk@intel.com \
--cc=mallesh.koujalagi@intel.com \
--cc=michal.wajdeczko@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.