Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/pf: Restore PF config before resuming submission after GT reset
@ 2026-11-18 23:39 FNU VISHWANATHA
  2026-11-18 23:56 ` FNU VISHWANATHA
  2026-11-19  0:02 ` sashiko-bot
  0 siblings, 2 replies; 4+ messages in thread
From: FNU VISHWANATHA @ 2026-11-18 23:39 UTC (permalink / raw)
  To: intel-xe
  Cc: Matthew Brost, Thomas Hellström, Rodrigo Vivi,
	Michal Wajdeczko, Piotr Piórkowski, FNU VISHWANATHA

A GT reset reloads the GuC, which loses the configuration the PF pushed
to it, including the PF's own scheduling parameters. It is restored by
the asynchronous PF restart worker, which is only queued after
xe_uc_start() has already resumed submission and re-registered the exec
queues.

Exec queues registered with the GuC in that window are acknowledged
(SCHED_CONTEXT_MODE_DONE) but are never dispatched, so their jobs never
start and their fences never signal. This shows up as repeated "Check
job timeout ... not started" errors after the first GT reset and,
eventually, as a hung task in ttm_bo_delayed_delete() waiting for a
fence that never signals.

Restore the configuration synchronously after the GuC has been reloaded
and before calling xe_uc_start(), using xe_gt_sriov_pf_config_restart().
That pushes the PF self configuration and all non-empty VF
configurations. The rest of the PF restart (policy and VF control state)
is still done by the asynchronous worker, which also pushes the
configuration again; this is harmless.

Fixes: 1c38dd6afa4a ("drm/xe/pf: Resend PF provisioning after GT reset")
Signed-off-by: FNU VISHWANATHA <fnu.vishwanatha@intel.com>
---
 drivers/gpu/drm/xe/xe_gt.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index fe71cb011d3a..a5f7a4bf4d94 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -35,6 +35,7 @@
 #include "xe_gt_mcr.h"
 #include "xe_gt_printk.h"
 #include "xe_gt_sriov_pf.h"
+#include "xe_gt_sriov_pf_config.h"
 #include "xe_gt_sriov_vf.h"
 #include "xe_gt_stats.h"
 #include "xe_gt_sysfs.h"
@@ -891,6 +892,18 @@ static int do_gt_restart(struct xe_gt *gt)
 	/* Get CCS mode in sync between sw/hw */
 	xe_gt_apply_ccs_mode(gt);
 
+	/*
+	 * The GuC was reloaded and lost the PF configuration pushed to it,
+	 * including the scheduling parameters. Restore it before
+	 * xe_uc_start() resumes submission: exec queues re-registered with
+	 * the GuC under its default configuration may be accepted but never
+	 * dispatched, leaving their jobs unstarted and their fences unsignaled.
+	 * The asynchronous PF restart below pushes the configuration again,
+	 * which is harmless.
+	 */
+	if (IS_SRIOV_PF(gt_to_xe(gt)))
+		xe_gt_sriov_pf_config_restart(gt);
+
 	err = xe_uc_start(&gt->uc);
 	if (err)
 		return err;
-- 
2.34.1


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

end of thread, other threads:[~2026-11-19  1:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 23:39 [PATCH] drm/xe/pf: Restore PF config before resuming submission after GT reset FNU VISHWANATHA
2026-11-18 23:56 ` FNU VISHWANATHA
2026-11-19  1:23   ` Ceraolo Spurio, Daniele
2026-11-19  0:02 ` sashiko-bot

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