From: Sk Anirban <sk.anirban@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: anshuman.gupta@intel.com, badal.nilawar@intel.com,
riana.tauro@intel.com, karthik.poosa@intel.com,
raag.jadav@intel.com, soham.purkait@intel.com,
mallesh.koujalagi@intel.com, vinay.belgaumkar@intel.com,
Sk Anirban <sk.anirban@intel.com>
Subject: [PATCH] drm/xe/guc: suppress GuC error logs when device is wedged
Date: Mon, 20 Apr 2026 16:59:26 +0530 [thread overview]
Message-ID: <20260420112925.1379274-2-sk.anirban@intel.com> (raw)
When the device is wedged, GuC CT sends return -ECANCELED. This is
expected behavior, not an actionable error. Avoid logging these as
errors in the engine activity and power profile code paths.
Signed-off-by: Sk Anirban <sk.anirban@intel.com>
---
drivers/gpu/drm/xe/xe_guc_engine_activity.c | 8 +++++---
drivers/gpu/drm/xe/xe_guc_engine_activity.h | 2 +-
drivers/gpu/drm/xe/xe_guc_pc.c | 4 ++--
drivers/gpu/drm/xe/xe_uc.c | 5 ++++-
4 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_guc_engine_activity.c b/drivers/gpu/drm/xe/xe_guc_engine_activity.c
index 2b99c1ebdd58..700f3464fb63 100644
--- a/drivers/gpu/drm/xe/xe_guc_engine_activity.c
+++ b/drivers/gpu/drm/xe/xe_guc_engine_activity.c
@@ -464,18 +464,20 @@ int xe_guc_engine_activity_function_stats(struct xe_guc *guc, int num_vfs, bool
*
* Enable engine activity stats and set initial timestamps
*/
-void xe_guc_engine_activity_enable_stats(struct xe_guc *guc)
+int xe_guc_engine_activity_enable_stats(struct xe_guc *guc)
{
int ret;
if (!xe_guc_engine_activity_supported(guc))
- return;
+ return 0;
ret = enable_engine_activity_stats(guc);
- if (ret)
+ if (ret && !(xe_device_wedged(guc_to_xe(guc)) && ret == -ECANCELED))
xe_gt_err(guc_to_gt(guc), "failed to enable activity stats%d\n", ret);
else
engine_activity_set_cpu_ts(guc, 0);
+
+ return ret;
}
static void engine_activity_fini(void *arg)
diff --git a/drivers/gpu/drm/xe/xe_guc_engine_activity.h b/drivers/gpu/drm/xe/xe_guc_engine_activity.h
index b32926c2d208..188f325a462d 100644
--- a/drivers/gpu/drm/xe/xe_guc_engine_activity.h
+++ b/drivers/gpu/drm/xe/xe_guc_engine_activity.h
@@ -13,7 +13,7 @@ struct xe_guc;
int xe_guc_engine_activity_init(struct xe_guc *guc);
bool xe_guc_engine_activity_supported(struct xe_guc *guc);
-void xe_guc_engine_activity_enable_stats(struct xe_guc *guc);
+int xe_guc_engine_activity_enable_stats(struct xe_guc *guc);
int xe_guc_engine_activity_function_stats(struct xe_guc *guc, int num_vfs, bool enable);
u64 xe_guc_engine_activity_active_ticks(struct xe_guc *guc, struct xe_hw_engine *hwe,
unsigned int fn_id);
diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c
index 7ecd91ad6192..efcd432ef6ef 100644
--- a/drivers/gpu/drm/xe/xe_guc_pc.c
+++ b/drivers/gpu/drm/xe/xe_guc_pc.c
@@ -1202,7 +1202,7 @@ int xe_guc_pc_set_power_profile(struct xe_guc_pc *pc, const char *buf)
ret = pc_action_set_param(pc,
SLPC_PARAM_POWER_PROFILE,
val);
- if (ret)
+ if (ret && !(xe_device_wedged(pc_to_xe(pc)) && ret == -ECANCELED))
xe_gt_err_once(pc_to_gt(pc), "Failed to set power profile to %d: %pe\n",
val, ERR_PTR(ret));
else
@@ -1306,7 +1306,7 @@ int xe_guc_pc_start(struct xe_guc_pc *pc)
/* Set cached value of power_profile */
ret = xe_guc_pc_set_power_profile(pc, power_profile_to_string(pc));
- if (unlikely(ret))
+ if (ret && !(xe_device_wedged(xe) && ret == -ECANCELED))
xe_gt_err(gt, "Failed to set SLPC power profile: %pe\n", ERR_PTR(ret));
return ret;
diff --git a/drivers/gpu/drm/xe/xe_uc.c b/drivers/gpu/drm/xe/xe_uc.c
index 75091bde0d50..b440cf8c431d 100644
--- a/drivers/gpu/drm/xe/xe_uc.c
+++ b/drivers/gpu/drm/xe/xe_uc.c
@@ -215,7 +215,10 @@ int xe_uc_load_hw(struct xe_uc *uc)
if (ret)
return ret;
- xe_guc_engine_activity_enable_stats(&uc->guc);
+ ret = xe_guc_engine_activity_enable_stats(&uc->guc);
+
+ if (xe_device_wedged(guc_to_xe(&uc->guc)) && ret == -ECANCELED)
+ return ret;
/* We don't fail the driver load if HuC fails to auth */
ret = xe_huc_auth(&uc->huc, XE_HUC_AUTH_VIA_GUC);
--
2.43.0
next reply other threads:[~2026-04-20 11:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 11:29 Sk Anirban [this message]
2026-04-20 19:51 ` [PATCH] drm/xe/guc: suppress GuC error logs when device is wedged Summers, Stuart
2026-04-21 15:44 ` Anirban, Sk
2026-04-21 17:23 ` Michal Wajdeczko
2026-04-29 19:12 ` Anirban, Sk
2026-04-20 23:23 ` ✓ CI.KUnit: success for " Patchwork
2026-04-21 0:10 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-21 2:54 ` ✗ Xe.CI.FULL: failure " 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=20260420112925.1379274-2-sk.anirban@intel.com \
--to=sk.anirban@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=karthik.poosa@intel.com \
--cc=mallesh.koujalagi@intel.com \
--cc=raag.jadav@intel.com \
--cc=riana.tauro@intel.com \
--cc=soham.purkait@intel.com \
--cc=vinay.belgaumkar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox