[PATCH] drm/xe/guc: In guc_ct_send_recv flush g2h worker if g2h resp times out
Badal Nilawar
badal.nilawar at intel.com
Fri Sep 27 19:24:28 UTC 2024
It is observed that for GuC CT request G2H IRQ triggered and g2h_worker
queued, but it didn't get opportunity to execute and timeout occurred.
To address this the g2h_worker is being flushed.
Cc: John Harrison <John.C.Harrison at Intel.com>
Signed-off-by: Badal Nilawar <badal.nilawar at intel.com>
---
drivers/gpu/drm/xe/xe_guc_ct.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index 4b95f75b1546..4a5d7f85d1a0 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -903,6 +903,17 @@ static int guc_ct_send_recv(struct xe_guc_ct *ct, const u32 *action, u32 len,
}
ret = wait_event_timeout(ct->g2h_fence_wq, g2h_fence.done, HZ);
+
+ /*
+ * It is observed that for above GuC CT request G2H IRQ triggered
+ * and g2h_worker queued, but it didn't get opportunity to execute
+ * and timeout occurred. To address the g2h_worker is being flushed.
+ */
+ if (!ret) {
+ flush_work(&ct->g2h_worker);
+ ret = wait_event_timeout(ct->g2h_fence_wq, g2h_fence.done, HZ);
+ }
+
if (!ret) {
xe_gt_err(gt, "Timed out wait for G2H, fence %u, action %04x",
g2h_fence.seqno, action[0]);
--
2.34.1
More information about the Intel-xe
mailing list