Re: [PATCH RESEND v6 04/11] drm/mediatek: gamma: Improve and simplify HW LUT calculation

From: Alexandre Mergnat
Date: Fri Jul 28 2023 - 09:00:52 EST


Reviewed-by: Alexandre Mergnat <amergnat@xxxxxxxxxxxx>

On 27/07/2023 11:46, AngeloGioacchino Del Regno wrote:
Use drm_color_lut_extract() to avoid open-coding the bits reduction
calculations for each color channel and use a struct drm_color_lut
to temporarily store the information instead of an array of u32.

Also, slightly improve the precision of the HW LUT calculation in the
LUT DIFF case by performing the subtractions on the 16-bits values and
doing the 10 bits conversion later.

--
Regards,
Alexandre