sdm: Reset pending_doze on new display state request
Reset pending_doze on new display state request to avoid deferring
subsequent vsync enable request
Change-Id: I0aca23805166188663dae4ad9899dae90c9725b4
diff --git a/sdm/libs/core/display_base.cpp b/sdm/libs/core/display_base.cpp
index 6985f7a..8f60f08 100644
--- a/sdm/libs/core/display_base.cpp
+++ b/sdm/libs/core/display_base.cpp
@@ -631,6 +631,11 @@
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;
+ }
}
// Handle vsync pending on resume, Since the power on commit is synchronous we pass -1 as retire