From: Michal Wajdeczko Date: Thu, 11 Jan 2024 15:48:38 +0000 (+0100) Subject: drm/xe/guc: Treat non-response message after BUSY as unexpected X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3c01e01214026114609c577ce31f81d4e037dd50;p=linux.git drm/xe/guc: Treat non-response message after BUSY as unexpected 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. Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20240111154838.541-1-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko --- diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c index 0fd9b5efe4c2d..235d27b17ff99 100644 --- a/drivers/gpu/drm/xe/xe_guc.c +++ b/drivers/gpu/drm/xe/xe_guc.c @@ -731,8 +731,12 @@ timeout: 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) ==