diff options
author | Michal Wajdeczko <[email protected]> | 2023-11-16 16:12:39 +0100 |
---|---|---|
committer | Rodrigo Vivi <[email protected]> | 2023-12-21 11:44:38 -0500 |
commit | 4a9b7d29c117fc6e49690728f35b6a16454556f2 (patch) | |
tree | ab5f8b11137e358f622db4d64c0b42d4341f5444 | |
parent | 32dd40fb48c56265ab08d379fecb8bbf62e3c427 (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.c | 2 |
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 */ |