artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7da3a2
)
drm: Fix drm_fixp2int_round() making it add 0.5
author
jsg
<jsg@openbsd.org>
Wed, 27 Mar 2024 04:58:34 +0000
(
04:58
+0000)
committer
jsg
<jsg@openbsd.org>
Wed, 27 Mar 2024 04:58:34 +0000
(
04:58
+0000)
From Arthur Grillo
296e6678a432aaff0b8c6a6a17b9b2b193556c71
in linux-6.6.y/6.6.23
807f96abdf14c80f534c78f2d854c2590963345c
in mainline linux
sys/dev/pci/drm/include/drm/drm_fixed.h
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/include/drm/drm_fixed.h
b/sys/dev/pci/drm/include/drm/drm_fixed.h
index
0c9f917
..
81572d3
100644
(file)
--- a/
sys/dev/pci/drm/include/drm/drm_fixed.h
+++ b/
sys/dev/pci/drm/include/drm/drm_fixed.h
@@
-71,7
+71,6
@@
static inline u32 dfixed_div(fixed20_12 A, fixed20_12 B)
}
#define DRM_FIXED_POINT 32
-#define DRM_FIXED_POINT_HALF 16
#define DRM_FIXED_ONE (1ULL << DRM_FIXED_POINT)
#define DRM_FIXED_DECIMAL_MASK (DRM_FIXED_ONE - 1)
#define DRM_FIXED_DIGITS_MASK (~DRM_FIXED_DECIMAL_MASK)
@@
-90,7
+89,7
@@
static inline int drm_fixp2int(s64 a)
static inline int drm_fixp2int_round(s64 a)
{
- return drm_fixp2int(a +
(1 << (DRM_FIXED_POINT_HALF - 1))
);
+ return drm_fixp2int(a +
DRM_FIXED_ONE / 2
);
}
static inline int drm_fixp2int_ceil(s64 a)