hwc: Handle validation reset during InternalValidate state
If layer stack needs Client compositiontype , HWC display gets into the
Internal Validate state. If validation gets reset by another thread
in this state, set the geometry change flag on stack to ensure that
Client target gets composed by SF.
CRs-Fixed: 2497345
Change-Id: If82ed6e64cb1037f17cfa1ea4877632562ae6ca2
diff --git a/sdm/libs/hwc2/hwc_display.cpp b/sdm/libs/hwc2/hwc_display.cpp
index c33fc61..299aad7 100644
--- a/sdm/libs/hwc2/hwc_display.cpp
+++ b/sdm/libs/hwc2/hwc_display.cpp
@@ -782,9 +782,14 @@
layer_stack_.layers.push_back(layer);
}
+ // If layer stack needs Client composition, HWC display gets into InternalValidate state. If
+ // validation gets reset by any other thread in this state, enforce Geometry change to ensure
+ // that Client target gets composed by SF.
+ bool enforce_geometry_change = (validate_state_ == kInternalValidate) && !validated_;
+
// TODO(user): Set correctly when SDM supports geometry_changes as bitmask
layer_stack_.flags.geometry_changed = UINT32((geometry_changes_ ||
- geometry_changes_on_doze_suspend_) > 0);
+ geometry_changes_on_doze_suspend_) > 0) || enforce_geometry_change;
layer_stack_.flags.config_changed = !validated_;
// Append client target to the layer stack