Harry Wentland 36ac37d237 drm: Don't treat 0 as -1 in drm_fixp2int_ceil
[ Upstream commit cf8837d7204481026335461629b84ac7f4538fa5 ]

Unit testing this in VKMS shows that passing 0 into
this function returns -1, which is highly counter-
intuitive. Fix it by checking whether the input is
>= 0 instead of > 0.

Fixes: 64566b5e767f ("drm: Add drm_fixp_from_fraction and drm_fixp2int_ceil")
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231108163647.106853-2-harry.wentland@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit e3271a9f1432472bfd1aec82a5086d6b10e0dfec)
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-04-16 10:30:31 +00:00
..
2017-03-24 09:36:06 +01:00
2017-08-11 10:47:17 +02:00
2017-06-14 12:10:22 +10:00
2017-06-01 08:02:14 +02:00
2017-06-01 08:02:14 +02:00
2018-02-22 15:42:18 +01:00