summaryrefslogtreecommitdiff
path: root/sdm/libs/core/fb/hw_device.cpp
diff options
context:
space:
mode:
authorNaseer Ahmed <naseer@codeaurora.org>2016-08-05 16:23:32 -0400
committerGerrit - the friendly Code Review server <code-review@localhost>2016-08-09 01:50:44 -0700
commitb6b936d4eced87bed7aec48784251004c481491e (patch)
tree67ca28c7d6a4f800e93884a714f29f45e9f34039 /sdm/libs/core/fb/hw_device.cpp
parentd15d0adf4c2da3eae3f200c1db35bc56b576746f (diff)
downloaddisplay-b6b936d4eced87bed7aec48784251004c481491e.tar.gz
sdm: Add option to defer video mode retire fence
Per the HWC2 header the present(retire) fence should be signaled at the vsync when the result of composition of *this* frame starts to appear (for video-mode panels). In our current implementation, the retire fence timeline is the same as the release fence timeline for video mode, so the retire fence that we get at present() signals when the next frame comes in to replace the current one. Hence, for video mode panels, we need to defer the retire fence to meet the header requirements. Change-Id: Ia84c9f14ba5c3667c4cad996027638f1f074914f CRs-Fixed: 1050596
Diffstat (limited to 'sdm/libs/core/fb/hw_device.cpp')
-rw-r--r--sdm/libs/core/fb/hw_device.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/sdm/libs/core/fb/hw_device.cpp b/sdm/libs/core/fb/hw_device.cpp
index c707847d..6cb919d2 100644
--- a/sdm/libs/core/fb/hw_device.cpp
+++ b/sdm/libs/core/fb/hw_device.cpp
@@ -458,7 +458,12 @@ DisplayError HWDevice::Commit(HWLayers *hw_layers) {
}
stack->retire_fence_fd = mdp_commit.retire_fence;
-
+#ifdef VIDEO_MODE_DEFER_RETIRE_FENCE
+ if (hw_panel_info_.mode == kModeVideo) {
+ stack->retire_fence_fd = stored_retire_fence;
+ stored_retire_fence = mdp_commit.retire_fence;
+ }
+#endif
// MDP returns only one release fence for the entire layer stack. Duplicate this fence into all
// layers being composed by MDP.