drm/xe/guc: Read HXG fields from DW1 of G2H response
authorMatthew Brost <matthew.brost@intel.com>
Wed, 18 Jan 2023 02:34:34 +0000 (18:34 -0800)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:35:20 +0000 (18:35 -0500)
The HXG fields are DW1 not DW0, fix this.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_guc_ct.c

index 137c184df4879ca22028bc763860e5518847e272..615cc4d4ad698169a0a97aff7cde9d064e86bf7e 100644 (file)
@@ -790,13 +790,13 @@ static int parse_g2h_response(struct xe_guc_ct *ct, u32 *msg, u32 len)
        if (type == GUC_HXG_TYPE_RESPONSE_FAILURE) {
                g2h_fence->fail = true;
                g2h_fence->error =
-                       FIELD_GET(GUC_HXG_FAILURE_MSG_0_ERROR, msg[0]);
+                       FIELD_GET(GUC_HXG_FAILURE_MSG_0_ERROR, msg[1]);
                g2h_fence->hint =
-                       FIELD_GET(GUC_HXG_FAILURE_MSG_0_HINT, msg[0]);
+                       FIELD_GET(GUC_HXG_FAILURE_MSG_0_HINT, msg[1]);
        } else if (type == GUC_HXG_TYPE_NO_RESPONSE_RETRY) {
                g2h_fence->retry = true;
                g2h_fence->reason =
-                       FIELD_GET(GUC_HXG_RETRY_MSG_0_REASON, msg[0]);
+                       FIELD_GET(GUC_HXG_RETRY_MSG_0_REASON, msg[1]);
        } else if (g2h_fence->response_buffer) {
                g2h_fence->response_len = response_len;
                memcpy(g2h_fence->response_buffer, msg + GUC_CTB_MSG_MIN_LEN,