Re: [RFC 3/4] drm: fixed: Add dfixed_frac() macro

2012-04-12 Thread Thierry Reding
* Stephen Warren wrote:
 On 04/11/2012 06:10 AM, Thierry Reding wrote:
  This commit is taken from the Chromium tree and was originally written
  by Robert Morell.
 
 Maybe just cherry-pick it from there? That way, the git authorship will
 show up as Robert.

I can do that. Though I'll have to remove the Chromium-specific tags.

Thierry


pgpernz1zQbKU.pgp
Description: PGP signature
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

[RFC 3/4] drm: fixed: Add dfixed_frac() macro

2012-04-11 Thread Thierry Reding
This commit is taken from the Chromium tree and was originally written
by Robert Morell.

Signed-off-by: Thierry Reding thierry.red...@avionic-design.de
---
 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

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [RFC 3/4] drm: fixed: Add dfixed_frac() macro

2012-04-11 Thread Stephen Warren
On 04/11/2012 06:10 AM, Thierry Reding wrote:
 This commit is taken from the Chromium tree and was originally written
 by Robert Morell.

Maybe just cherry-pick it from there? That way, the git authorship will
show up as Robert.
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu