Skip to content

Commit 8ec43c5

Browse files
Harry WentlandFomys
authored andcommitted
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: 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]>
1 parent 511a344 commit 8ec43c5

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
@@ -67,7 +67,7 @@ static u16 lerp_u16(u16 a, u16 b, s64 t)
6767

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

70-
return drm_fixp2int(a_fp + delta);
70+
return drm_fixp2int_round(a_fp + delta);
7171
}
7272

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

0 commit comments

Comments
 (0)