diff options
author | qctecmdr <qctecmdr@localhost> | 2020-11-11 06:49:54 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2020-11-11 06:49:54 -0800 |
commit | 916a061201e4073f975fa14fc462eca2700f7794 (patch) | |
tree | e91b05743d9e739e3aba4d7fc3f7824700cfa2aa | |
parent | 24cebbf2725152b6a8228b9a241e0bd9c6e83610 (diff) | |
parent | a46dd43efd962a760a08d0da7462ece75eb7c49c (diff) |
Merge "sdm: Reset pending_doze_ state if next state no longer doze"
-rwxr-xr-x | sdm/libs/core/display_base.cpp | 12 | ||||
-rw-r--r-- | sdm/libs/core/display_builtin.cpp | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sdm/libs/core/display_base.cpp b/sdm/libs/core/display_base.cpp index ba2733d9..8cbfbc7b 100755 --- a/sdm/libs/core/display_base.cpp +++ b/sdm/libs/core/display_base.cpp @@ -625,16 +625,18 @@ DisplayError DisplayBase::SetDisplayState(DisplayState state, bool teardown, DisablePartialUpdateOneFrame(); if (error == kErrorNone) { - if (!pending_doze_ && !pending_power_on_) { - active_ = active; - state_ = state; - } - comp_manager_->SetDisplayState(display_comp_ctx_, state, release_fence ? *release_fence : -1); // If previously requested doze state is still pending reset it on any new display state request // and handle the new request. if (state != kStateDoze) { pending_doze_ = false; } + + if (!pending_doze_ && !pending_power_on_) { + active_ = active; + state_ = state; + } + comp_manager_->SetDisplayState(display_comp_ctx_, state, release_fence ? *release_fence : -1); + // If previously requested power on state is still pending reset it on any new display state // request and handle the new request. if (state != kStateOn) { diff --git a/sdm/libs/core/display_builtin.cpp b/sdm/libs/core/display_builtin.cpp index 2e76a574..fe6911fc 100644 --- a/sdm/libs/core/display_builtin.cpp +++ b/sdm/libs/core/display_builtin.cpp @@ -332,7 +332,7 @@ DisplayError DisplayBuiltIn::SetDisplayMode(uint32_t mode) { HWDisplayMode hw_display_mode = static_cast<HWDisplayMode>(mode); uint32_t pending = 0; - if (!active_) { + if (!active_ && !pending_doze_ && !pending_power_on_) { DLOGW("Invalid display state = %d. Panel must be on.", state_); return kErrorNotSupported; } |