sm6375-common: power-libperfmgr: add support for devices without display idle signals
To workaround b/141025174, adding support for devices without display idle signals. Also added a property to override idle display function. Besides the idle signal support, this CL also makes touch boost duration tunable through several new vendor properties. It also named display idle monitor thread and cleans out the obsolete HIDL Power HAL implementation. Bug: 168080943 Bug: 169065024 Bug: 171494137 Test: Boot and trace Change-Id: I76067d10958654d539624ec4cac8f346103e67bc
This commit is contained in:
parent
384c894a8a
commit
6c2db2f0a7
3 changed files with 76 additions and 41 deletions
|
|
@ -14,8 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef POWER_LIBPERFMGR_INTERACTIONHANDLER_H_
|
||||
#define POWER_LIBPERFMGR_INTERACTIONHANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include <condition_variable>
|
||||
#include <memory>
|
||||
|
|
@ -25,9 +24,16 @@
|
|||
|
||||
#include <perfmgr/HintManager.h>
|
||||
|
||||
namespace aidl {
|
||||
namespace google {
|
||||
namespace hardware {
|
||||
namespace power {
|
||||
namespace impl {
|
||||
namespace pixel {
|
||||
|
||||
using ::android::perfmgr::HintManager;
|
||||
|
||||
enum interaction_state {
|
||||
enum InteractionState {
|
||||
INTERACTION_STATE_UNINITIALIZED,
|
||||
INTERACTION_STATE_IDLE,
|
||||
INTERACTION_STATE_INTERACTION,
|
||||
|
|
@ -51,24 +57,20 @@ class InteractionHandler {
|
|||
void PerfLock();
|
||||
void PerfRel();
|
||||
|
||||
size_t CalcTimespecDiffMs(struct timespec start, struct timespec end);
|
||||
|
||||
enum interaction_state mState;
|
||||
|
||||
enum InteractionState mState;
|
||||
int mIdleFd;
|
||||
int mEventFd;
|
||||
|
||||
int32_t mWaitMs;
|
||||
int32_t mMinDurationMs;
|
||||
int32_t mMaxDurationMs;
|
||||
int32_t mDurationMs;
|
||||
|
||||
struct timespec mLastTimespec;
|
||||
|
||||
std::unique_ptr<std::thread> mThread;
|
||||
std::mutex mLock;
|
||||
std::condition_variable mCond;
|
||||
std::shared_ptr<HintManager> mHintManager;
|
||||
};
|
||||
|
||||
#endif // POWER_LIBPERFMGR_INTERACTIONHANDLER_H_
|
||||
} // namespace pixel
|
||||
} // namespace impl
|
||||
} // namespace power
|
||||
} // namespace hardware
|
||||
} // namespace google
|
||||
} // namespace aidl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue