diff options
| author | Rasmus Villemoes <[email protected]> | 2019-10-08 14:03:27 +0200 |
|---|---|---|
| committer | Lee Jones <[email protected]> | 2019-10-14 08:57:45 +0100 |
| commit | ca58b37034453e690e5278f95f32ea050951cf9f (patch) | |
| tree | 07f29271da2dd267d4eed1979069c33799355011 /scripts/generate_rust_target.rs | |
| parent | 407feae1cacaa5d00ebe686532a73ad6de747409 (diff) | |
backlight: pwm_bl: Switch to power-of-2 base for fixed-point math
Using a power-of-2 instead of power-of-10 base makes the computations
much cheaper. 2^16 is safe; retval never becomes more than 2^48 +
2^32/2. On a 32 bit platform, the very expensive 64/32 division at the
end of cie1931() instead becomes essentially free (a shift by 32 is
just a register rename).
Signed-off-by: Rasmus Villemoes <[email protected]>
Reviewed-by: Daniel Thompson <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Diffstat (limited to 'scripts/generate_rust_target.rs')
0 files changed, 0 insertions, 0 deletions