hwc2: Allow commit to go through if flush_ flag is set

Allow commit to go through if flush_ flag is set even if
display is not validated

Change-Id: Ic87f87342a72de541fe79ba514915dd5e6e13c86
CRs-Fixed: 2218342
This commit is contained in:
Baldev Sahu
2018-04-04 11:39:20 +05:30
committed by Gerrit - the friendly Code Review server
parent 99455b1939
commit 9ded89a4f9

View File

@@ -1250,6 +1250,10 @@ HWC2::Error HWCDisplay::GetHdrCapabilities(uint32_t *out_num_types, int32_t *out
HWC2::Error HWCDisplay::CommitLayerStack(void) { HWC2::Error HWCDisplay::CommitLayerStack(void) {
if (flush_) {
return HWC2::Error::None;
}
if (skip_validate_ && !CanSkipValidate()) { if (skip_validate_ && !CanSkipValidate()) {
validated_ = false; validated_ = false;
} }
@@ -1265,7 +1269,6 @@ HWC2::Error HWCDisplay::CommitLayerStack(void) {
DumpInputBuffers(); DumpInputBuffers();
if (!flush_) {
DisplayError error = kErrorUndefined; DisplayError error = kErrorUndefined;
int status = 0; int status = 0;
if (tone_mapper_) { if (tone_mapper_) {
@@ -1278,6 +1281,7 @@ HWC2::Error HWCDisplay::CommitLayerStack(void) {
tone_mapper_->Terminate(); tone_mapper_->Terminate();
} }
} }
error = display_intf_->Commit(&layer_stack_); error = display_intf_->Commit(&layer_stack_);
if (error == kErrorNone) { if (error == kErrorNone) {
@@ -1297,7 +1301,6 @@ HWC2::Error HWCDisplay::CommitLayerStack(void) {
flush_ = true; flush_ = true;
} }
} }
}
skip_validate_ = true; skip_validate_ = true;
return HWC2::Error::None; return HWC2::Error::None;