[RFC v2 4/5] drm: fixed: Add dfixed_frac |
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: [RFC v2 4/5] drm: fixed: Add dfixed_frac
- From: Thierry Reding <thierry.reding@xxxxxxxxxxxxxxxxx>
- Date: Wed, 25 Apr 2012 11:45:01 +0200
- Cc: Robert Morell <rmorell@xxxxxxxxxx>, Olof Johansson <olofj@xxxxxxxxxxxx>, Stephen Warren <swarren@xxxxxxxxxxxxx>, Olof Johansson <olof@xxxxxxxxx>, Colin Cross <ccross@xxxxxxxxxxx>, Jon Mayo <jmayo@xxxxxxxxxx>, Terje Bergström <tbergstrom@xxxxxxxxxx>, Lucas Stach <dev@xxxxxxxxxx>, dri-devel@xxxxxxxxxxxxxxxxxxxxx, David Airlie <airlied@xxxxxxxx>, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, Joerg Roedel <joerg.roedel@xxxxxxx>, Hiroshi Doyu <hdoyu@xxxxxxxxxx>, devicetree-discuss@xxxxxxxxxxxxxxxx, Grant Likely <grant.likely@xxxxxxxxxxxx>, Rob Herring <rob.herring@xxxxxxxxxxx>, Liam Girdwood <lrg@xxxxxx>, Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>, Ben Dooks <ben-linux@xxxxxxxxx>, Wolfram Sang <w.sang@xxxxxxxxxxxxxx>, linux-i2c@xxxxxxxxxxxxxxx
- In-reply-to: <1335347102-14905-1-git-send-email-thierry.reding@avionic-design.de>
From: Robert Morell <rmorell@xxxxxxxxxx>
This helper macro retrieves the fractional part of a fixed20_12 20.12
fixed-point number.
Signed-off-by: Robert Morell <rmorell@xxxxxxxxxx>
Signed-off-by: Olof Johansson <olofj@xxxxxxxxxxxx>
Signed-off-by: Thierry Reding <thierry.reding@xxxxxxxxxxxxxxxxx>
---
include/drm/drm_fixed.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/drm/drm_fixed.h b/include/drm/drm_fixed.h
index 4a08a66..0ead502 100644
--- 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)
{
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[ARM Kernel]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]