Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/guc: Treat non-response message after BUSY as unexpected
@ 2024-01-11 15:48 Michal Wajdeczko
  2024-01-11 16:52 ` Matthew Brost
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Michal Wajdeczko @ 2024-01-11 15:48 UTC (permalink / raw)
  To: intel-xe

Once GuC replied with GUC_HXG_TYPE_NO_RESPONSE_BUSY message then
we may expect that only RESPONSE_SUCCESS or FAILURE message will
be sent, anything else is a violation of the HXG protocol.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_guc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
index 6e73ebf67251..254c9d3c8c73 100644
--- a/drivers/gpu/drm/xe/xe_guc.c
+++ b/drivers/gpu/drm/xe/xe_guc.c
@@ -718,8 +718,12 @@ int xe_guc_mmio_send_recv(struct xe_guc *guc, const u32 *request,
 		if (unlikely(FIELD_GET(GUC_HXG_MSG_0_ORIGIN, header) !=
 			     GUC_HXG_ORIGIN_GUC))
 			goto proto;
-		if (unlikely(ret))
+		if (unlikely(ret)) {
+			if (FIELD_GET(GUC_HXG_MSG_0_TYPE, header) !=
+			    GUC_HXG_TYPE_NO_RESPONSE_BUSY)
+				goto proto;
 			goto timeout;
+		}
 	}
 
 	if (FIELD_GET(GUC_HXG_MSG_0_TYPE, header) ==

base-commit: 79184e72263e91528195db01783148435c7e4fad
-- 
2.25.1


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

end of thread, other threads:[~2024-01-11 17:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-11 15:48 [PATCH] drm/xe/guc: Treat non-response message after BUSY as unexpected Michal Wajdeczko
2024-01-11 16:52 ` Matthew Brost
2024-01-11 16:54 ` ✓ CI.Patch_applied: success for " Patchwork
2024-01-11 16:54 ` ✓ CI.checkpatch: " Patchwork
2024-01-11 16:55 ` ✓ CI.KUnit: " Patchwork
2024-01-11 17:03 ` ✓ CI.Build: " Patchwork
2024-01-11 17:03 ` ✓ CI.Hooks: " Patchwork
2024-01-11 17:05 ` ✓ CI.checksparse: " Patchwork
2024-01-11 17:40 ` ✓ CI.BAT: " Patchwork

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