Display team introduces new refresh rate residency in kernel.
Current display data provider is polling data from state sysfs.
To reduce CPU loading and improve efficiency, we should get
rid of polling data provider and create new data provider to
read data from time_in_state sysfs in PowerStatsHAL.
Bug: 316260832
Test: vts-tradefed run vts -m VtsHalPowerStatsTargetTest
Change-Id: I4d9886f13207e41f13defd89ea2c19614918a570
Signed-off-by: Darren Hsu <darrenhsu@google.com>
This is a new data provider to get state residency from fvp_stats,
which is similar with DVFS data provider. But the difference is that
CPU frequency table is read from cpufreq sysfs and not predefined in
the config.
Bug: 272642210
Bug: 267638537
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I22451b55dee5dfb0a1b36497533c2063984d5483
Signed-off-by: Darren Hsu <darrenhsu@google.com>
AoC power stats are reported in ticks that are different frequency
in different SoC.
Bug: 233923713
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I047d7ae163941c2168dcd8a0ea34da73ab4a8477
Signed-off-by: Darren Hsu <darrenhsu@google.com>
Reading data from an AoC sysfs node by getline takes 1 second. In total
there are 17 AoC sysfs nodes that must be read. The worst case is taking
17 seconds long that is greater than dumpsys timeout. Therefore, we need
the timeout mechanism to ignore the AoC power stats reporting when AoC
latency exceeds the allowed time.
Bug: 219630658
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Ic5c2a0b36728153fd2e2593599a8f2bcdb50ace4
Signed-off-by: Darren Hsu <darrenhsu@google.com>
Revert submission 17800080-power-stats-aoc-timeout
Reason for revert: Causing crashes due to improper thread sync
Reverted Changes:
I71a9e6817:powerstats: timeout mechanism for AoC data provide...
I725c00745:powerstats: set time limit as timeout for AoC
I5b290a53d:powerstats: set time limit as timeout for AoC
Change-Id: I6844a141739f93154d10debc29c7565f92349d25
Reading data from an AoC sysfs node by getline takes 1 second. In total
there are 17 AoC sysfs nodes that must be read. The worst case is taking
17 seconds long that is greater than dumpsys timeout. Therefore, we need
the timeout mechanism to ignore the AoC power stats reporting when AoC
latency exceeds the allowed time.
Bug: 219630658
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I71a9e681780471f31141599c53bb516aef445add
Signed-off-by: Darren Hsu <darrenhsu@google.com>
Revert submission 17442015-powerstats-aoc-timeout
Reason for revert: Causes PowerStatsHAL crashes (b/227578192)
Reverted Changes:
I9a9eb27fa:powerstats: set time limit as timeout for AoC
Ib70000580:powerstats: timeout mechanism for AoC data provide...
Ied599054c:Revert "powerstats: disable AoC power stats report...
Iaf5af43eb:powerstats: set time limit as timeout for AoC
Change-Id: I53e280871197aaf003d9ef3e5e0cb4c79f486cc8