summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_guc_ct.c
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2023-11-16 18:12:39 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:44:38 +0300
commit4a9b7d29c117fc6e49690728f35b6a16454556f2 (patch)
treeab5f8b11137e358f622db4d64c0b42d4341f5444 /drivers/gpu/drm/xe/xe_guc_ct.c
parent32dd40fb48c56265ab08d379fecb8bbf62e3c427 (diff)
downloadlinux-4a9b7d29c117fc6e49690728f35b6a16454556f2.tar.xz
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 <michal.wajdeczko@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@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 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 */