Commit Graph

9 Commits

Author SHA1 Message Date
Kelly Rossmoyer
b296bbf7f0 Add temp workaround Easel power stats on 2017
While snapshot Easel power data is captured in bugreports via dumpstate,
Easel does not provide low power stats on a recurring basis via
PowerHAL, which is the type of data need to detect the presence and
scope of power drain issues in the field.  As a temporary workaround,
this set of changes keeps cumulative counts of the number of times
PowerHAL saw Easel's state (an existing sysfs node) as "on" (state 1)
or "not on" (state 0 or 2), and logs the "on" count as cumulative count
and the "not on" count as cumulative duration.

This does not sufficiently address the long term need for cumulative
stats, since this will just be comprised of essentially random snapshots
of Easel's current state.  However, for the known issue already being
investigated, this should be enough to gauge the scope of the issue.

sepolicy updates allow hal_power to search/read the directory/file
containing Easel's current state: /sys/devices/virtual/misc/mnh_sm/state

Bug: 77208137
Bug: 36576572
Test: Installed on taimen, used camera for various functions, used
easel debug commands and properties to force it into different states,
captured a bugreport and verified the content against observed "current
state" values from monitoring the state file while performing similar
camera functions.

Change-Id: Ib1ee92db477d2a6c9d6f293fb4fcc2f753b8335a
2018-04-19 17:36:21 +00:00
Wei Wang
e671f7473c wahoo: power: add dumpstate support in Power HAL
Test: Capture bugreport and check:
      lshal-debug/android.hardware.power@1.2::IPower_default.txt
Bug: 72071908
Change-Id: I0220ce80e69636381d0901c69896b7ce96fde323
2018-03-21 10:36:57 -07:00
Wei Wang
15fd9f5fae Power: restart PowerHAL if audio HAL died with active low_latency hint
Audio low latency which can go parallel with other long-term hints and
there is small change that leaves the powerHAL stuck with the hint for
long time. This CL will require another property to record the state of it.

Bug: 67648152
Test: kill audiohal, audioserver
Change-Id: Ic0017b0c7a27994e7583d7701665b2cd156ca192
2018-01-16 14:02:32 -08:00
Wei Wang
d71c835526 Power: fix typo in log
Test: Build
Change-Id: Iaaa7365e5c62173ada90cb6253ad21503df13d88
2018-01-15 20:58:43 +00:00
Wei Wang
fadd4b28e0 wahoo: power: Reorder cpu max node value priority
Add CPUBigClusterMaxFreq to Launch and Camera hints with higher priority
than Video Encode's hint value. In this case, Video Encode hint doesn't
need to be canceled during those hints.

Bug: 71869406
Test: Build
Change-Id: I53d17d32a8ff77257ba44cef7b8be2911b20b85f
2018-01-11 23:44:57 -08:00
Wei Wang
1c36565762 wahoo: power: Add hint state into PowerHAL in case of restart
PowerHAL should remember the long-lasting hint when it (re)starts,
in case it crashed/killed. Also when clint crashed, the long-lasting
hint should be cancelled.

This CL adds a property for PowerHAL to store its long-lasting hint,
and uses init to clear the property and restart PowerHAL when client
died.


Bug: 67648152
Test: kill cameraHAL, powerHAL, system-server
Change-Id: I6b2cae3c2228da00bcb97a3befacf9ab045eeba8
2018-01-09 19:21:07 +00:00
Wei Wang
4c69ba7dda wahoo: power: add atrace into powerhint calls and improve camera powerhint
1) Add atrace into powerhint calls
2) Release encoder hint when placing camera and launch hint

Video Encode hint caps Big Cluster to 1.9G, so it will stop camera and launch hints setting Big
Cluster minfreq node to Max. If Video Encode hint is on, this CL will cancel it first and recover
it after camera/launch hints end.

Test: launch camera on walleye
Bug: 62041945
Change-Id: Ib278bdc55f58d5be9b2b4c2996c468bff5d71fbb
2018-01-06 17:45:09 -08:00
Wei Wang
4a56f1b85a wahoo: power: change node owner early to reduce permission denial log spam
PowerHAL (started in class hal) will try to reset nodes to their initial values,
however the node permission is granted only upon boot_complete which leads some
permission log spam. This CL is to address the logspam.

Test: boot and do powerhint
Bug: 62041945
Change-Id: I35ad8dfe23f35c829f50479ca951445afeb46b87
2018-01-04 22:30:07 -08:00
Wei Wang
d7f901b58d wahoo: power: switch to libperfmgr for powerhint
Test: boot and do powerhint
Bug: 62041945
Change-Id: I7de1d2bf377fb46162171a084fca3413b1067d3b
2018-01-04 13:51:18 -08:00