summaryrefslogtreecommitdiff
path: root/sdm
diff options
context:
space:
mode:
authorAlex Sarraf <asarraf@codeaurora.org>2020-01-09 18:25:15 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2020-11-05 02:06:53 -0800
commita46dd43efd962a760a08d0da7462ece75eb7c49c (patch)
tree16809b24b51ed71ddbb7f3a5cc1bf5eb91b74c00 /sdm
parent6e63dd4ba77b2dd68f3d0e0217592f29d406a840 (diff)
sdm: Reset pending_doze_ state if next state no longer doze
-Previously checking for setting active_ and state_ were done withou check of pending_doze_. Latest fix changed checks state instead of state_. If leaving doze to power on state while pending_doze_ is true, we fall in situation where pending_doze_ does not reset until after it is checked. Reset pending_doze_ state if leaving doze before check should be done. -Allow display mode changes as long as panel is not active nor pending doze nor pending power on Change-Id: I8cfb933c6d7403c41394f1cb7b295db7dcb0b73e
Diffstat (limited to 'sdm')
-rwxr-xr-xsdm/libs/core/display_base.cpp12
-rw-r--r--sdm/libs/core/display_builtin.cpp2
2 files changed, 8 insertions, 6 deletions
diff --git a/sdm/libs/core/display_base.cpp b/sdm/libs/core/display_base.cpp
index cc2855e1..f1025bbd 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 4cdf9d83..2e0538a4 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;
}