summaryrefslogtreecommitdiff
path: root/arch/mips/lantiq
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2019-10-08 14:03:27 +0200
committerLee Jones <lee.jones@linaro.org>2019-10-14 08:57:45 +0100
commitca58b37034453e690e5278f95f32ea050951cf9f (patch)
tree07f29271da2dd267d4eed1979069c33799355011 /arch/mips/lantiq
parent407feae1cacaa5d00ebe686532a73ad6de747409 (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 <linux@rasmusvillemoes.dk> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'arch/mips/lantiq')
0 files changed, 0 insertions, 0 deletions