HWC2: Add properties to revert latching changes
Adds two properties:
debug.sf.latch_unsignaled - This causes SurfaceFlinger to latch
buffers even if their fences haven't signaled
debug.sf.disable_backpressure - This causes SurfaceFlinger to skip
propagating backpressure back to apps by not running when it
detects that a prior composition missed hardware vsync
Bug: 30216498
Change-Id: Idd70f472ec567a4bc03352f30f201f434cf5d660
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index f298399..8baf28c 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -179,6 +179,10 @@
}
ALOGI_IF(mDebugRegion, "showupdates enabled");
ALOGI_IF(mDebugDDMS, "DDMS debugging enabled");
+
+ property_get("debug.sf.disable_backpressure", value, "0");
+ mPropagateBackpressure = !atoi(value);
+ ALOGI_IF(!mPropagateBackpressure, "Disabling backpressure propagation");
}
void SurfaceFlinger::onFirstRef()
@@ -924,7 +928,7 @@
mPreviousPresentFence != Fence::NO_FENCE &&
mPreviousPresentFence->getSignalTime() == INT64_MAX;
ATRACE_INT("FrameMissed", static_cast<int>(frameMissed));
- if (frameMissed) {
+ if (mPropagateBackpressure && frameMissed) {
signalLayerUpdate();
break;
}