aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Wajdeczko <[email protected]>2023-11-16 16:12:39 +0100
committerRodrigo Vivi <[email protected]>2023-12-21 11:44:38 -0500
commit4a9b7d29c117fc6e49690728f35b6a16454556f2 (patch)
treeab5f8b11137e358f622db4d64c0b42d4341f5444
parent32dd40fb48c56265ab08d379fecb8bbf62e3c427 (diff)
drm/xe/guc: Fix wrong assert about full_len
This variable holds full length of the message, including header length so it should be checked against GUC_CTB_MSG_MAX_LEN. Signed-off-by: Michal Wajdeczko <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]>
-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 a84e111bb36a..c44e75074695 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -419,7 +419,7 @@ static int h2g_write(struct xe_guc_ct *ct, const u32 *action, u32 len,
full_len = len + GUC_CTB_HDR_LEN;
lockdep_assert_held(&ct->lock);
- xe_assert(xe, full_len <= (GUC_CTB_MSG_MAX_LEN - GUC_CTB_HDR_LEN));
+ xe_assert(xe, full_len <= GUC_CTB_MSG_MAX_LEN);
xe_assert(xe, tail <= h2g->info.size);
/* Command will wrap, zero fill (NOPs), return and check credits again */