Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/xe/guc: Escalate GuC load failure immediately
@ 2025-02-13 21:39 Daniele Ceraolo Spurio
  2025-02-13 22:05 ` ✓ CI.Patch_applied: success for drm/xe/guc: Escalate GuC load failure immediately (rev2) Patchwork
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: Daniele Ceraolo Spurio @ 2025-02-13 21:39 UTC (permalink / raw)
  To: intel-xe
  Cc: Daniele Ceraolo Spurio, Matthew Brost, John Harrison,
	Tejas Upadhyay

When the Xe was first introduced, we intentionally avoided escalating
GuC load failures, to not abort mid-probe. Xe is now mature enough and
we gracefully handle probe failures, so we can start escalating
immediately.

Note that even without this patch the probe is still aborted because
the attempt to enable CTs after GuC load will fail and that failure is
already escalated.

v2: only return success if the load_done variable is 1 (Tejas)

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
---
 drivers/gpu/drm/xe/xe_guc.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
index 1619c0a52db9..407399cc4764 100644
--- a/drivers/gpu/drm/xe/xe_guc.c
+++ b/drivers/gpu/drm/xe/xe_guc.c
@@ -938,7 +938,7 @@ static s32 guc_pc_get_cur_freq(struct xe_guc_pc *guc_pc)
 #endif
 #define GUC_LOAD_TIME_WARN_MS      200
 
-static void guc_wait_ucode(struct xe_guc *guc)
+static int guc_wait_ucode(struct xe_guc *guc)
 {
 	struct xe_gt *gt = guc_to_gt(guc);
 	struct xe_mmio *mmio = &gt->mmio;
@@ -1045,6 +1045,8 @@ static void guc_wait_ucode(struct xe_guc *guc)
 			  delta_ms, xe_guc_pc_get_act_freq(guc_pc), guc_pc_get_cur_freq(guc_pc),
 			  before_freq, status, count);
 	}
+
+	return load_done == 1 ? 0 : -EIO;
 }
 
 static int __xe_guc_upload(struct xe_guc *guc)
@@ -1077,14 +1079,16 @@ static int __xe_guc_upload(struct xe_guc *guc)
 		goto out;
 
 	/* Wait for authentication */
-	guc_wait_ucode(guc);
+	ret = guc_wait_ucode(guc);
+	if (ret)
+		goto out;
 
 	xe_uc_fw_change_status(&guc->fw, XE_UC_FIRMWARE_RUNNING);
 	return 0;
 
 out:
 	xe_uc_fw_change_status(&guc->fw, XE_UC_FIRMWARE_LOAD_FAIL);
-	return 0	/* FIXME: ret, don't want to stop load currently */;
+	return ret;
 }
 
 static int vf_guc_min_load_for_hwconfig(struct xe_guc *guc)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2025-03-03 22:29 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 21:39 [PATCH v2] drm/xe/guc: Escalate GuC load failure immediately Daniele Ceraolo Spurio
2025-02-13 22:05 ` ✓ CI.Patch_applied: success for drm/xe/guc: Escalate GuC load failure immediately (rev2) Patchwork
2025-02-13 22:06 ` ✓ CI.checkpatch: " Patchwork
2025-02-13 22:07 ` ✓ CI.KUnit: " Patchwork
2025-02-13 22:24 ` ✓ CI.Build: " Patchwork
2025-02-13 22:26 ` ✓ CI.Hooks: " Patchwork
2025-02-13 22:27 ` ✓ CI.checksparse: " Patchwork
2025-02-13 22:43 ` [PATCH v2] drm/xe/guc: Escalate GuC load failure immediately John Harrison
2025-02-13 22:59 ` ✓ Xe.CI.BAT: success for drm/xe/guc: Escalate GuC load failure immediately (rev2) Patchwork
2025-02-14  9:58 ` [PATCH v2] drm/xe/guc: Escalate GuC load failure immediately K V P, Satyanarayana
2025-02-14 18:39 ` ✗ Xe.CI.Full: failure for drm/xe/guc: Escalate GuC load failure immediately (rev2) Patchwork
2025-03-03 19:27 ` ✓ CI.Patch_applied: success for drm/xe/guc: Escalate GuC load failure immediately (rev3) Patchwork
2025-03-03 19:27 ` ✓ CI.checkpatch: " Patchwork
2025-03-03 19:28 ` ✓ CI.KUnit: " Patchwork
2025-03-03 19:45 ` ✓ CI.Build: " Patchwork
2025-03-03 19:47 ` ✓ CI.Hooks: " Patchwork
2025-03-03 19:49 ` ✓ CI.checksparse: " Patchwork
2025-03-03 20:10 ` ✓ Xe.CI.BAT: " Patchwork
2025-03-03 22:29 ` ✗ Xe.CI.Full: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox