Commit 4a9b7d29 authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Rodrigo Vivi
Browse files

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: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 32dd40fb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 */