Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/guc: Return CTB response length
@ 2024-01-11 15:27 Michal Wajdeczko
  2024-01-11 15:30 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Michal Wajdeczko @ 2024-01-11 15:27 UTC (permalink / raw)
  To: intel-xe

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).

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_ct.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 @@ 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,

base-commit: 79184e72263e91528195db01783148435c7e4fad
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-01-11 20:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-11 15:27 [PATCH] drm/xe/guc: Return CTB response length Michal Wajdeczko
2024-01-11 15:30 ` ✓ CI.Patch_applied: success for " Patchwork
2024-01-11 15:30 ` ✓ CI.checkpatch: " Patchwork
2024-01-11 15:31 ` ✓ CI.KUnit: " Patchwork
2024-01-11 15:38 ` ✓ CI.Build: " Patchwork
2024-01-11 15:39 ` ✓ CI.Hooks: " Patchwork
2024-01-11 15:40 ` ✓ CI.checksparse: " Patchwork
2024-01-11 16:17 ` ✗ CI.BAT: failure " Patchwork
2024-01-11 17:31   ` Michal Wajdeczko
2024-01-11 16:40 ` [PATCH] " Matthew Brost
2024-01-11 17:07   ` Michal Wajdeczko
2024-01-11 20:02     ` Matthew Brost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox