drm_fixp_from_fraction allows us to create a fixed point directly
from a fraction, rather than creating fixed point values and dividing
later. This avoids overflow of our 64 bit value for large numbers.
drm_fixp2int_ceil allows us to return the ceiling of our fixed point
value.
[airlied: squash Jordan's fix]
32-bit-build-fix: Jordan Lazare <[email protected]>
Signed-off-by: Harry Wentland <[email protected]>
Cc: [email protected]
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Required for certain driver calculations. Code
was written by Christian König and ported to the
drm by me.
v2: fix 64 bit divides
v3: fix 64 bit for real (math64.h)
Signed-off-by: Alex Deucher <[email protected]>
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]>