summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_guc_ct.c
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2024-01-11 18:27:24 +0300
committerMichal Wajdeczko <michal.wajdeczko@intel.com>2024-01-11 22:54:29 +0300
commitd898c2e55593fea5da068de48a878c66520a4af8 (patch)
treef77177767586c2e41db2b2df2c1bb5d756b231bd /drivers/gpu/drm/xe/xe_guc_ct.c
parent3c01e01214026114609c577ce31f81d4e037dd50 (diff)
downloadlinux-d898c2e55593fea5da068de48a878c66520a4af8.tar.xz
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: Matthew Brost <matthew.brost@intel.com> Link: https://lore.kernel.org/r/20240111152724.497-1-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_guc_ct.c')
-rw-r--r--drivers/gpu/drm/xe/xe_guc_ct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index c29f095aa1b9..d490a4d42c01 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -780,7 +780,7 @@ retry_same_fence:
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,