[PATCH] drm/xe/gt: Remove redundant num_engine check

Ghimiray, Himal Prasad himal.prasad.ghimiray at intel.com
Fri Mar 8 07:00:00 UTC 2024



> -----Original Message-----
> From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of Tejas
> Upadhyay
> Sent: 08 March 2024 12:33
> To: intel-xe at lists.freedesktop.org
> Cc: Andi Shyti <andi.shyti at linux.intel.com>; Vishwanathapura, Niranjana
> <niranjana.vishwanathapura at intel.com>; Upadhyay, Tejas
> <tejas.upadhyay at intel.com>
> Subject: [PATCH] drm/xe/gt: Remove redundant num_engine check
> 
> In __xe_gt_apply_ccs_mode num_engines will never be 0 as it is already
> checked by parent function.
> 
> Fixes: 0d97ecce16bd ("drm/xe: Enable Fixed CCS mode setting")
> Signed-off-by: Tejas Upadhyay <tejas.upadhyay at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_gt_ccs_mode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
> b/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
> index 529fc286cd06..2bbd7b203cc2 100644
> --- a/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
> +++ b/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
> @@ -22,7 +22,7 @@ static void __xe_gt_apply_ccs_mode(struct xe_gt *gt,
> u32 num_engines)
> 
>  	xe_assert(xe, xe_gt_ccs_mode_enabled(gt));
> 
> -	xe_assert(xe, num_engines && num_engines <= num_slices);
> +	xe_assert(xe, num_engines <= num_slices);

LGTM.

Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>

>  	xe_assert(xe, !(num_slices % num_engines));
> 
>  	/*
> --
> 2.25.1



More information about the Intel-xe mailing list