diff --git a/sdm/libs/hwc2/hwc_display.cpp b/sdm/libs/hwc2/hwc_display.cpp index 0c48b05f..0ce1f1e1 100644 --- a/sdm/libs/hwc2/hwc_display.cpp +++ b/sdm/libs/hwc2/hwc_display.cpp @@ -1214,10 +1214,6 @@ HWC2::Error HWCDisplay::GetHdrCapabilities(uint32_t *out_num_types, int32_t *out HWC2::Error HWCDisplay::CommitLayerStack(void) { - if (shutdown_pending_ || layer_set_.empty()) { - return HWC2::Error::None; - } - if (skip_validate_ && !CanSkipValidate()) { validated_ = false; } @@ -1227,6 +1223,10 @@ HWC2::Error HWCDisplay::CommitLayerStack(void) { return HWC2::Error::NotValidated; } + if (shutdown_pending_ || layer_set_.empty()) { + return HWC2::Error::None; + } + DumpInputBuffers(); if (!flush_) { @@ -1316,8 +1316,11 @@ HWC2::Error HWCDisplay::PostCommitLayerStack(int32_t *out_retire_fence) { close(layer_buffer->acquire_fence_fd); layer_buffer->acquire_fence_fd = -1; } + + layer->request.flags = {}; } + client_target_->GetSDMLayer()->request.flags = {}; *out_retire_fence = -1; if (!flush_) { // if swapinterval property is set to 0 then close and reset the list retire fence @@ -1337,8 +1340,6 @@ HWC2::Error HWCDisplay::PostCommitLayerStack(int32_t *out_retire_fence) { geometry_changes_ = GeometryChanges::kNone; flush_ = false; - ClearRequestFlags(); - return status; } @@ -2016,12 +2017,6 @@ DisplayClass HWCDisplay::GetDisplayClass() { return display_class_; } -void HWCDisplay::ClearRequestFlags() { - for (Layer *layer : layer_stack_.layers) { - layer->request.flags = {}; - } -} - std::string HWCDisplay::Dump() { std::ostringstream os; os << "\n------------HWC----------------\n"; diff --git a/sdm/libs/hwc2/hwc_display.h b/sdm/libs/hwc2/hwc_display.h index 263b69fd..c2519447 100644 --- a/sdm/libs/hwc2/hwc_display.h +++ b/sdm/libs/hwc2/hwc_display.h @@ -249,7 +249,6 @@ class HWCDisplay : public DisplayEventHandler { bool IsSurfaceUpdated(const std::vector &dirty_regions); bool IsLayerUpdating(const Layer *layer); uint32_t SanitizeRefreshRate(uint32_t req_refresh_rate); - virtual void ClearRequestFlags(); virtual void GetUnderScanConfig() { } enum {