Skip to content

Commit 665de08

Browse files
Harry Wentlandgregkh
authored andcommitted
drm/vkms: Round fixp2int conversion in lerp_u16
[ Upstream commit 8ec43c5 ] fixp2int always rounds down, fixp2int_ceil rounds up. We need the new fixp2int_round. Signed-off-by: Alex Hung <[email protected]> Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Louis Chauvet <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Louis Chauvet <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 7b67d26 commit 665de08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/vkms/vkms_composer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static u16 lerp_u16(u16 a, u16 b, s64 t)
9898

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

101-
return drm_fixp2int(a_fp + delta);
101+
return drm_fixp2int_round(a_fp + delta);
102102
}
103103

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

0 commit comments

Comments
 (0)