Re: [PATCH v2 01/19] drm/i915: Constify LUT entries in checker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> Subject:  [PATCH v2 01/19] drm/i915: Constify LUT entries in
> checker
> 
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> The LUT checker doesn't modify the LUT entries so make them const.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

LGTM.
Reviewed-by: Animesh Manna <animesh.manna@xxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/display/intel_color.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c
> b/drivers/gpu/drm/i915/display/intel_color.c
> index 8966e6560516..2d5640aab4d8 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -2848,16 +2848,16 @@ static int icl_pre_csc_lut_precision(const struct
> intel_crtc_state *crtc_state)
>  	return 16;
>  }
> 
> -static bool err_check(struct drm_color_lut *lut1,
> -		      struct drm_color_lut *lut2, u32 err)
> +static bool err_check(const struct drm_color_lut *lut1,
> +		      const struct drm_color_lut *lut2, u32 err)
>  {
>  	return ((abs((long)lut2->red - lut1->red)) <= err) &&
>  		((abs((long)lut2->blue - lut1->blue)) <= err) &&
>  		((abs((long)lut2->green - lut1->green)) <= err);  }
> 
> -static bool intel_lut_entries_equal(struct drm_color_lut *lut1,
> -				    struct drm_color_lut *lut2,
> +static bool intel_lut_entries_equal(const struct drm_color_lut *lut1,
> +				    const struct drm_color_lut *lut2,
>  				    int lut_size, u32 err)
>  {
>  	int i;
> @@ -2874,7 +2874,7 @@ static bool intel_lut_equal(const struct
> drm_property_blob *blob1,
>  			    const struct drm_property_blob *blob2,
>  			    int check_size, int precision)
>  {
> -	struct drm_color_lut *lut1, *lut2;
> +	const struct drm_color_lut *lut1, *lut2;
>  	int lut_size1, lut_size2;
>  	u32 err;
> 
> --
> 2.39.3





[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux