drm/xe/guc: Treat non-response message after BUSY as unexpected
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 11 Jan 2024 15:48:38 +0000 (16:48 +0100)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 11 Jan 2024 18:16:09 +0000 (19:16 +0100)
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 <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20240111154838.541-1-michal.wajdeczko@intel.com
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
drivers/gpu/drm/xe/xe_guc.c

index 0fd9b5efe4c2d6b7a5886415754365e6596ffc7b..235d27b17ff9930c3965e7417bd0de9c3afd5c5b 100644 (file)
@@ -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) ==