Unverified Commit 8ec43c58 authored by Harry Wentland's avatar Harry Wentland Committed by Louis Chauvet
Browse files

drm/vkms: Round fixp2int conversion in lerp_u16



fixp2int always rounds down, fixp2int_ceil rounds up. We need
the new fixp2int_round.

Signed-off-by: default avatarAlex Hung <alex.hung@amd.com>
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Reviewed-by: default avatarLouis Chauvet <louis.chauvet@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241220043410.416867-3-alex.hung@amd.com


Signed-off-by: default avatarLouis Chauvet <louis.chauvet@bootlin.com>
parent 511a3444
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ static u16 lerp_u16(u16 a, u16 b, s64 t)

	s64 delta = drm_fixp_mul(b_fp - a_fp, t);

	return drm_fixp2int(a_fp + delta);
	return drm_fixp2int_round(a_fp + delta);
}

static s64 get_lut_index(const struct vkms_color_lut *lut, u16 channel_value)