[Intel-xe] [PATCH 1/4] drm/xe/guc: Fix wrong assert about full_len
Matthew Brost
matthew.brost at intel.com
Wed Nov 15 09:02:05 UTC 2023
On Wed, Nov 15, 2023 at 12:37:45PM +0100, Michal Wajdeczko wrote:
> 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 at intel.com>
Reviewed-by: Matthew Brost <matthew.brost at 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 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 */
> --
> 2.25.1
>
More information about the Intel-xe
mailing list