[PATCH v2] drm/xe/uc: Add stop on hardware initialization error

Zhanjun Dong zhanjun.dong at intel.com
Thu Jul 24 22:44:13 UTC 2025


During hardware initialization, GuC communication is expected, which
will increase the outstanding counter. Non-zero counter will cause
assertion failed during shutdown process.
Add GuC CT stop to clear the counter.

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5466
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5530
Signed-off-by: Zhanjun Dong <zhanjun.dong at intel.com>
---
v2: Switch to xe_guc_ct_stop
---
 drivers/gpu/drm/xe/xe_uc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_uc.c b/drivers/gpu/drm/xe/xe_uc.c
index 465bda355443..e8874b4d7633 100644
--- a/drivers/gpu/drm/xe/xe_uc.c
+++ b/drivers/gpu/drm/xe/xe_uc.c
@@ -13,6 +13,7 @@
 #include "xe_gt_printk.h"
 #include "xe_gt_sriov_vf.h"
 #include "xe_guc.h"
+#include "xe_guc_ct.h"
 #include "xe_guc_pc.h"
 #include "xe_guc_engine_activity.h"
 #include "xe_huc.h"
@@ -173,6 +174,7 @@ static int vf_uc_load_hw(struct xe_uc *uc)
 	return 0;
 
 err_out:
+	xe_guc_ct_stop(&uc->guc.ct);
 	xe_guc_sanitize(&uc->guc);
 	return err;
 }
@@ -228,6 +230,7 @@ int xe_uc_load_hw(struct xe_uc *uc)
 	return 0;
 
 err_out:
+	xe_guc_ct_stop(&uc->guc.ct);
 	xe_guc_sanitize(&uc->guc);
 	return ret;
 }
-- 
2.34.1



More information about the Intel-xe mailing list