From 908663d231add99994b6eaa2d25d5b9824d99bd0 Mon Sep 17 00:00:00 2001 From: Nikita Kalyazin Date: Wed, 20 Nov 2013 11:32:53 +0400 Subject: [PATCH] [IMPROVE] energy: add coefficients for LCD The coefficients were calculated for M0 target. They consider only backlight brightness (no pixel self brightness). Change-Id: If44d483db3dea7c9e1fa9858c6dd1624d626004a Signed-off-by: Nikita Kalyazin --- start.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 3e6701d..a1ed5be 100755 --- a/start.sh +++ b/start.sh @@ -21,6 +21,9 @@ insmod swap_message_parser.ko || exit 1 # parser is loaded # Flash coefficients are multiplied by 10^3 because # - they were calculated for mAs # - result should be exposed in uAs +# LCD coefficients are divided by 10^6 because +# - they were calculated for mAs +# - result should be exposed in uAs # cpu idle: 76.8301 / 1 echo 76830 > /sys/kernel/debug/swap/energy/cpu_idle/numerator && @@ -36,4 +39,12 @@ echo 69998585 > /sys/kernel/debug/swap/energy/flash_read/denominator && # flash write: 131.443 / 31129333 echo 131443 > /sys/kernel/debug/swap/energy/flash_write/numerator && -echo 31129333 > /sys/kernel/debug/swap/energy/flash_write/denominator +echo 31129333 > /sys/kernel/debug/swap/energy/flash_write/denominator && + +# lcd max (white max - black max) / 2: 255 / 1 +echo 255 > `ls /sys/kernel/debug/swap/energy/lcd/*/max_num` && +echo 1000000 > `ls /sys/kernel/debug/swap/energy/lcd/*/max_denom` && + +# lcd min (white min - black min) / 2: 179 / 1 +echo 179 > `ls /sys/kernel/debug/swap/energy/lcd/*/min_num` && +echo 1000000 > `ls /sys/kernel/debug/swap/energy/lcd/*/min_denom` -- 2.7.4