History log of /frameworks/native/services/surfaceflinger/DispSync.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cbf153bedf2eafc1443bbc97c4e74f97e7973edd 11-Mar-2017 Fabien Sanglard <sanglardf@google.com> Use hasSyncFramework value from configStore

Change-Id: I41c6b1a26001eb6ba08cbc419dc8a683f5722aa3
/frameworks/native/services/surfaceflinger/DispSync.cpp
c45a7d9dfdefa07512c5acc07bcbee5362b34e3d 14-Mar-2017 Fabien Sanglard <sanglardf@google.com> [SF] Use presentTimeOffset from configStore

Change-Id: If9c872c565e68e8abe552ee11d2c7d48f44aec4b
/frameworks/native/services/surfaceflinger/DispSync.cpp
e0ea99cc4ba89452b9b6b1baa33bddcb11f3351a 12-Jan-2017 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of a2c2d11f9 to master

Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I84d0ffa430df3beca0dcc6ed205ce220d7be1f87
7823e124e00576e20e47ec717cbe8bc89f0f2bf2 29-Sep-2016 Mark Salyzyn <salyzyn@google.com> Replace cutils/log.h and rationalize log/log.h and android/log.h

- cutils/log.h treat as deprecated and lead by example
- android/log.h to be used instead of log/log.h if possible
- add system includes that are assumed as side effects
- define LOG_TAG first

Test: compile
Bug: 31289077
Bug: 30465923
Change-Id: I8d99b24c333578c9b5aa9f2a01324bd0bba268dd
/frameworks/native/services/surfaceflinger/DispSync.cpp
c03d283e8b3f830d76dd94822b2a13872c05c730 28-Dec-2016 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of 525a5f2 to master

Test: build
Change-Id: Id1c6d3d9dd158fb086b0d8ab74f7838ef0a51af1
a5e161b1207ef447a51e99856097d69d4a6111e1 29-Sep-2016 Mark Salyzyn <salyzyn@google.com> Replace cutils/log.h and rationalize log/log.h and android/log.h

- cutils/log.h treat as deprecated and lead by example
- android/log.h to be used instead of log/log.h if required
- add system includes that are assumed as side effects of log.h
- modules that use SLOG should use SLOG for all logging (installd)
- define LOG_TAG first
- remove logging infrastructure if not used

Test: build
Bug: 31289077
Change-Id: Iea147a0104c7ab7f12451304131d6500f42141e7
/frameworks/native/services/surfaceflinger/DispSync.cpp
75b1868620b63f772a93cbc9a67dec5a62cc6182 08-Sep-2016 Tim Murray <timmurray@google.com> Boost priority of short-running SF FIFO threads slightly. am: 35520634e2 am: 584fb9544f
am: 7a7de48b25

Change-Id: I23f953ba137f7958e77733fc516cfa5c351290f8
35520634e298f53bd8433825640d6999760f25b3 07-Sep-2016 Tim Murray <timmurray@google.com> Boost priority of short-running SF FIFO threads slightly.

The short-running FIFO threads should preempt the SurfaceFlinger main
thread in order to prevent deadlock.

bug 31223682

Change-Id: I29e7b4b8439bb876998a8aeeb2b8d6ee5b6b7d36
/frameworks/native/services/surfaceflinger/DispSync.cpp
de4883bab707e2699350d561c5e6382d0bad34ba 02-Aug-2016 Tim Murray <timmurray@google.com> Update SurfaceFlinger FIFO configuration. am: acff43dca6 am: 4d818bf221
am: 618f8aba21

Change-Id: Ie003b648afb3b63abf8335d4332c22fcdd98c1d5
acff43dca6a3c8a29f449706967d4de21c373d26 29-Jul-2016 Tim Murray <timmurray@google.com> Update SurfaceFlinger FIFO configuration.

- move SurfaceFlinger main thread to prio 2
- drop EventThread from FIFO but not SFEventThread, which is still FIFO
prio 1
- make DispSyncThread FIFO, prio 1

bug 30481949

Change-Id: Ifedccfbf3cf144ffad030109849a924dddae8d09
/frameworks/native/services/surfaceflinger/DispSync.cpp
c406791ead6d864ec693ad01a80c5f471bdc2a7a 03-May-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings.

Bug: 28341362
Change-Id: I7e061f68acdde368a3b63c029b928133646ebff2
/frameworks/native/services/surfaceflinger/DispSync.cpp
8f8374d75ab17be5d168fea14d3f8e2a40ca3c66 19-Apr-2016 Dan Stoza <stoza@google.com> DispSync: Actually wait forever

When computeNextEventTimeLocked returns INT64_MAX (because there are
currently no listeners), wait until the condition variable is
signaled instead of waiting for a long timeout. Since the condition
variable timeout is specified using CLOCK_REALTIME behind the scenes,
we can receive false wakeups in the presence of large system clock
changes.

Bug: 28152577
Change-Id: I88dbab5d5d0776cb25dea76a4574db055b308fd1
/frameworks/native/services/surfaceflinger/DispSync.cpp
4a4e4a239f034cb8af2df9a438b26c3bc088889c 19-Apr-2016 Tim Murray <timmurray@google.com> Revert "Revert "DispSync: Always resync after inactivity""

This reverts commit 67264e930992e43ef3351b04692d4ca59cbb01ad.

We've fixed the kernel issues this exposed.

bug 28198793

Change-Id: Ie895cc0a815094cce4bee3b2bf45800ee1e2fdc3
/frameworks/native/services/surfaceflinger/DispSync.cpp
67264e930992e43ef3351b04692d4ca59cbb01ad 14-Apr-2016 Dan Stoza <stoza@google.com> Revert "DispSync: Always resync after inactivity"

This reverts commit f34b9be610ce286af224364cb6e69ef6f7697ee9.
Bug: 28160740

Change-Id: I48a5bd66712651b42fdc0aaf1492899d7b032977
/frameworks/native/services/surfaceflinger/DispSync.cpp
f34b9be610ce286af224364cb6e69ef6f7697ee9 06-Apr-2016 Dan Stoza <stoza@google.com> DispSync: Always resync after inactivity

Changes DispSync to enable hardware vsync immediately when new frames
arrive after a period of inactivity.

No matter how hard we try, we can't avoid drifting over time without
being able to detect error based on display retire fences. By enabling
hardware vsync immediately, we avoid having a weird period or phase
offset relative to hardware while we retrain the model. Once the model
has locked, we turn hardware vsync back off to save power (until we
detect drift again).

Bug: 26255070
Change-Id: If4dd17c2d541015c730f47d824359d7cb4b52c3c
/frameworks/native/services/surfaceflinger/DispSync.cpp
22279c44183a9c71301c770c4275545500a48345 10-Mar-2016 Dan Stoza <stoza@google.com> Revert "DispSync: workaround HH hardware vsync issue"

This reverts commit c734d95c575830ffc97fc5d2ae14b020c95d05de, which was
a workaround for a bug on a device which is now obsolete.

Bug: 25845510
Change-Id: I3244bfd3f758c52dfe76e9d5b0a72bbcffdf5a6f
/frameworks/native/services/surfaceflinger/DispSync.cpp
c734d95c575830ffc97fc5d2ae14b020c95d05de 24-Nov-2015 Haixia Shi <hshi@google.com> DispSync: workaround HH hardware vsync issue

The HWC of HH seems to have a bug where it fails to generate vsync events upon
the first eventControl call to turn on HWC_EVENT_VSYNC.

The workaround is for DispSync to detect when it has received no resync samples
after many presents, and return false so that SF will disable HW vsync and
re-enable it in the next present. This gets the HWC of HH out of the bad state.

Bug:25845510
TEST=reboot HH then immediately capture systrace while scrolling all apps

Change-Id: Ie034c113d94ea53068eef75b8eac39a32788666a
/frameworks/native/services/surfaceflinger/DispSync.cpp
676b1f6ed0d637b7eb1858361e0d09068f26e9fa 29-Oct-2015 Haixia Shi <hshi@google.com> SF: more DispSync improvements.

Pass the reference time to DispSyncThread. Since the phase offset is calculated
using timestamps relative to the reference time, we must also adjust the phase
offset by the same reference time when computing the next refresh time.

Always reset phase offset to zero when updating the reference time because the
reference time equals the first timestamp.

After beginResync() we need to keep HW vsync enabled until the model is updated.

Bug: 25113115
Change-Id: I8eae227bee91c24a99bf8e57fbebceb98d29c77d
Test: check in systrace that app/sf vsync events have correct phase
/frameworks/native/services/surfaceflinger/DispSync.cpp
664339a8e8d3f2d5acd5728dae666cc9a14e08f3 28-Oct-2015 Haixia Shi <hshi@google.com> SF: use first sample timestamp as reference.

Do not use the absolute 64-bit nsecs_t timestamp directly in phase
and error calculations. Compared to the estimated vsync period, the
timestamp tend to many orders of magnitudes larger, and consequently
the integer modulo operation used to calculate phase and error can
be very sensitive to tiny fluctuation in vsync period.

Bug: 25113115
Test: set kTraceDetailedInfo=true; see Phase and Error are stable in systrace

Change-Id: I687703eec31b1072c606898c0424a96c0a8ca033
/frameworks/native/services/surfaceflinger/DispSync.cpp
67d8bd66aaf04805cb8f2616ba964141b865e3b9 11-Sep-2014 Lajos Molnar <lajos@google.com> surfaceflinger: add getDisplayStats() method

This is used by media service to schedule video frames at the
proper time, based on precise vsync timings.

Bug: 14659809
Change-Id: I1a90603f3dc09dca9aa4f90a3aa845fab56e0a5e
/frameworks/native/services/surfaceflinger/DispSync.cpp
645b1f7ffb41d21a60765d1ec54ba82f14a36a59 10-Jun-2014 Andy McFadden <fadden@android.com> Replace "lower power mode" experiment

This replaces the previous low-power mode experiment, which
discarded refresh events, with a new experiment that alters
the refresh period.

(see also I2849e5ea335c0d2509fea1c315392bce7f20451d )

The feature is enabled by specifying a nonzero value for the
"refresh skip count", which indicates the number of periods
to skip. For example, the command:

adb shell service call SurfaceFlinger 1016 i32 1

sets a skip count of '1', yielding a 30Hz refresh rate on a device
with a 60Hz display. Changing the last value to '2' would set the
refresh to 20Hz. '0' returns to the default behavior.

Bug 15523257

Change-Id: I00039c22a55750e74035644c63800e4bee1c774a
/frameworks/native/services/surfaceflinger/DispSync.cpp
5167ec68fed047bf65b1eb0c6091534682135eef 22-May-2014 Andy McFadden <fadden@android.com> Disable DispSync resync when not needed

If app and SF events aren't using phase offsets, we don't need
to maintain the DispSync model. We just turn hardware VSYNC on
whenever something wants to draw. This avoids some edge cases
where we were doing too much resync work.

Also, updated the systrace output. The "VsyncOn" line was a
combination of SF and app event threads, and would occasionally
be very weird. Removed VsyncOn, renamed VSYNC to VSYNC-app,
and added VSYNC-sf.

Also, added more details to the --dispsync dumpsys output.

Also, renamed global constants to not look like local variables.

Bug 15516453

Change-Id: I0da10b72f0d9a7b7eb5202d87cc18967f698adbd
/frameworks/native/services/surfaceflinger/DispSync.cpp
c751e92c56de5f335a36e68607c7a6c627dcd0dc 08-May-2014 Andy McFadden <fadden@android.com> Add "dumpsys SurfaceFlinger --dispsync"

Dumps the current DispSync state.

Bug 14651879

Change-Id: Ide4e6dbd58b117bc1a6b97b57d10cd92ec86dc84
/frameworks/native/services/surfaceflinger/DispSync.cpp
150ecd8c1bd5543bf0a65ac838a7409131106716 08-May-2014 Andy McFadden <fadden@android.com> Add mutex

Change-Id: I81072031e74a5cca8384e4e8bce4babf2187d8bb
/frameworks/native/services/surfaceflinger/DispSync.cpp
41d67d7ab4da1c393497a620a116a854b3c618e7 26-Apr-2014 Andy McFadden <fadden@android.com> Improve SurfaceFlinger PTS estimation

Get the next refresh time from DispSync instead of guessing based
on the current time.

Change-Id: I8dc72a3217bfd4e9b4c905034194d1a298cad69a
/frameworks/native/services/surfaceflinger/DispSync.cpp
f52b3c88f18c0546526996c839fbce74172e11c7 25-Apr-2014 Ruchi Kandoi <kandoiruchi@google.com> SurfaceFlinger: Adds the functionality to reduce refresh rate to half of
the default.

Feature added for the low power mode.

Change-Id: I2849e5ea335c0d2509fea1c315392bce7f20451d
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
/frameworks/native/services/surfaceflinger/DispSync.cpp
92dc3fc52cf097bd105460cf377779bdcf146d62 12-Mar-2014 Mark Salyzyn <salyzyn@google.com> native frameworks: 64-bit compile issues

- Fix format (print/scanf)
- Suppress unused argument warning messages (bonus)

Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
/frameworks/native/services/surfaceflinger/DispSync.cpp
629b98781823db12879d65b5d8480616093b175b 29-Oct-2013 Jamie Gennis <jgennis@google.com> DispSync: remove delay when enabling vsync events

This change fixes a bug that caused an extra frame of latency when enabling
vsync event callbacks in DispSync. The bug was related to the logic that
prevents the two events from firing with very little time between them due to
updates to the vsync model.

Bug: 11479720
Change-Id: Ie7eaff9e92ffb7b7b6cb4d3d4402c96cbd29af7e
/frameworks/native/services/surfaceflinger/DispSync.cpp
44e45cfeb37a04c206730b12ff001525ebe42a7b 13-Oct-2013 Jesse Hall <jessehall@google.com> Merge "DispSync: don't compensate for wakeup latency" into klp-dev
72f69d9f2348efa580c7e1e1659865c638e41357 10-Oct-2013 Jesse Hall <jessehall@google.com> Wake up disp sync thread when setting display period

Bug: 10624956
Change-Id: I272c15f319521bfbd1bb70451366c7dd84d60bf9
/frameworks/native/services/surfaceflinger/DispSync.cpp
0d5c60edf11fdded738acf3f78a0c667599cd60d 10-Oct-2013 Jamie Gennis <jgennis@google.com> DispSync: don't compensate for wakeup latency

This change removes the wakeup latency compensation from the software-generated
vsync events. Choreographer can't handle timestamps in the future, so don't
aim for early wake-ups with the expectation that the actual wake-up will be
late.

Bug: 11153576
/frameworks/native/services/surfaceflinger/DispSync.cpp
faf77cce9d9ec0238d6999b3bd0d40c71ff403c5 31-Jul-2013 Jamie Gennis <jgennis@google.com> SurfaceFlinger: SW-based vsync events

This change adds the DispSync class, which models the hardware vsync event
times to allow vsync event callbacks to be done at an arbitrary phase offset
from the hardware vsync. This can be used to reduce the minimum latency from
Choreographer wake-up to on-screen image presentation.

Bug: 10624956
Change-Id: I8c7a54ceacaa4d709726ed97b0dcae4093a7bdcf
/frameworks/native/services/surfaceflinger/DispSync.cpp