Commit d898c2e5 authored by Michal Wajdeczko's avatar Michal Wajdeczko

drm/xe/guc: Return CTB response length

Not all CTB responses from the GuC are fixed size and we need to
pass response length to the caller, if there was a response_buffer.
Easiest solution is to return it as positive value from all
xe_guc_ct_send_recv() functions.  The CTB response length is always
between 1 and 254 (ie. GUC_HXG_MSG_MIN_LEN and GUC_CTB_MAX_DWORDS
- GUC_HXG_MSG_MIN_LEN).

Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20240111152724.497-1-michal.wajdeczko@intel.comSigned-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
parent 3c01e012
......@@ -780,7 +780,7 @@ static int guc_ct_send_recv(struct xe_guc_ct *ct, const u32 *action, u32 len,
ret = -EIO;
}
return ret > 0 ? 0 : ret;
return ret > 0 ? response_buffer ? g2h_fence.response_len : 0 : ret;
}
int xe_guc_ct_send_recv(struct xe_guc_ct *ct, const u32 *action, u32 len,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment