Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41be9385 authored by Steve Kondik's avatar Steve Kondik
Browse files

power: Add CM performance manager



Squashed commit of:

power: Add CPU boosting interface

 * Boosts CPU using Power HAL for the given duration.
 * Duration is given in microseconds.
 * Power HAL must implement POWER_HINT_CPU_BOOST.

Add CPU boosting hooks

 * Send boost hint during scrolling
 * Still relevant on even high-end hardware

perf: Send a boost hint when a key on the navbar is pressed

 * A lot of stuff happens, especially when invoking recents.
 * Get ahead of the storm by sending a boost hint before
   kicking off the animations.

perf: Send boost hint during initial launch

perf: Per-app performance profiles

 * Performance Profiles is going to grow into a much more powerful
   feature which can apply advanced optimizations or power saving
   techniques depending on both the state of the hardware as well
   as the current applications in use.
 * Refactor the original code and move it into PowerManager so
   that it's managed from the same place.
 * Implement "automatic performance profiles". This feature will
   automatically select a profile when specific activities are
   running. Currently this list is static and engages performance
   mode for several benchmarks (trollface).
 * Added support for a new power hint, POWER_HINT_SET_PROFILE.
   Currently, these profiles are fired using a property trigger
   in init. This is easy, but the PowerHAL can do more.
 * Moved the setting to Settings.Secure and also wrapped calls
   to the service in the DEVICE_POWER permission. Nobody should
   mess with this stuff except the system.
 * Powersave profile will automatically activate Android's built-in
   low power mode.
 * Original patch by Jorge Ruesga

TODO:
 * Implement API for per-app configuration by user
 * Quicksettings tile

perf: Boost during animations

 * Reduce animation jank by preemptively boostin the CPUs.
 * Original idea taken from CodeAurora, modified for CM perf control.

systemui: Boost when expanding the notification shade

power: Add a new power hint for application launches

 * Some devices may prefer a different behavior when launching apps,
   particularly to avoid priority inversion issues. Add support
   for a new LAUNCH_BOOST hint which can be handled in the PowerHAL.

power: Boost improvements

 * Boost when opening the panelview
 * Adjust launch boost to handle relaunch correctly

PowerManager: change performance profile when disabling battery saver

We need to be sure to update the performance profile when the system
disables battery saver mode.

This fixes the perf tile becoming out of sync - changing it to low power
mode triggers power saver, but turning power saver off does not trigger
the tile.

Ref: CYNGNOS-1156

Signed-off-by: default avatarRoman Birg <roman@cyngn.com>

base: cache power profiles support

Signed-off-by: default avatarJorge Ruesga <jorge@ruesga.com>

perf: Add support for additional power profiles

 * Add support for bias power (efficiency) and bias performance (quick)
   modes if supported by a device.

Change-Id: Id3a53eaacdaf6ae93ee899835cfcb21279d35ad4
parent 2e724e9f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment