Re: [PATCH RESEND 3/4] drm/vkms: add a KUnit test for the precomputed LUT table

From: Louis Chauvet

Date: Tue Nov 24 2026 - 10:14:06 EST




On 11/23/26 17:20, Oarora Etimis wrote:
build_lut_table() turns a per-pixel interpolation into a table lookup, so
a wrong entry changes the composed output with no other symptom.

Compare every entry against apply_lut_to_channel_value() for the same
channel and value, for a 4-entry LUT whose channels differ and for the
256-entry sRGB one. The check stops at the first mismatch and prints its
channel, value and both results.

The tables are built with apply_lut_to_channel_value(), so this proves the
lookup matches the interpolation, not that the LUT arithmetic is right;
vkms_color_srgb_inv_srgb() covers the latter.

Signed-off-by: Oarora Etimis <oaroraetimis@xxxxxxxxx>

Reviewed-by: Louis Chauvet <louis.chauvet@xxxxxxxxxxx>