projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
398b470
)
drm: fixed: Add dfixed_frac
author
Robert Morell
<
[email protected]
>
Wed, 25 Apr 2012 09:45:01 +0000
(11:45 +0200)
committer
Dave Airlie
<
[email protected]
>
Fri, 27 Apr 2012 08:29:35 +0000
(09:29 +0100)
This helper macro retrieves the fractional part of a fixed20_12 20.12
fixed-point number.
Signed-off-by: Robert Morell <
[email protected]
>
Signed-off-by: Olof Johansson <
[email protected]
>
Signed-off-by: Thierry Reding <
[email protected]
>
Signed-off-by: Dave Airlie <
[email protected]
>
include/drm/drm_fixed.h
patch
|
blob
|
history
diff --git
a/include/drm/drm_fixed.h
b/include/drm/drm_fixed.h
index 4a08a664ff1f243fd14cdc094215627e7a626605..0ead502e17d27638fef2bb7df81d9118967b2010 100644
(file)
--- a/
include/drm/drm_fixed.h
+++ b/
include/drm/drm_fixed.h
@@
-37,6
+37,7
@@
typedef union dfixed {
#define dfixed_init(A) { .full = dfixed_const((A)) }
#define dfixed_init_half(A) { .full = dfixed_const_half((A)) }
#define dfixed_trunc(A) ((A).full >> 12)
+#define dfixed_frac(A) ((A).full & ((1 << 12) - 1))
static inline u32 dfixed_floor(fixed20_12 A)
{