diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-03-27 04:32:20 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-03-27 04:32:20 +0000 |
commit | 954eab8ef1e9972c15a3f465f484d3a524fb6d46 (patch) | |
tree | 91b2811b5d332d5f16df01e7b40078ea5f8486b3 /sys | |
parent | a0232292f8d2ec27f8d04c5a9c0a129dc3f30c3a (diff) |
drm: Don't treat 0 as -1 in drm_fixp2int_ceil
From Harry Wentland
bac3d37d2f7cab3d9c42a7c9775c84aee4fa89d9 in linux-6.6.y/6.6.23
cf8837d7204481026335461629b84ac7f4538fa5 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/include/drm/drm_fixed.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/include/drm/drm_fixed.h b/sys/dev/pci/drm/include/drm/drm_fixed.h index 6ea339d5de0..0c9f917a4d4 100644 --- a/sys/dev/pci/drm/include/drm/drm_fixed.h +++ b/sys/dev/pci/drm/include/drm/drm_fixed.h @@ -95,7 +95,7 @@ static inline int drm_fixp2int_round(s64 a) static inline int drm_fixp2int_ceil(s64 a) { - if (a > 0) + if (a >= 0) return drm_fixp2int(a + DRM_FIXED_ALMOST_ONE); else return drm_fixp2int(a - DRM_FIXED_ALMOST_ONE); |