Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c57f2c39 authored by Kevin DuBois's avatar Kevin DuBois
Browse files

SF: enable VSyncReactor

Enable VSyncReactor timing system. This is a vsync timing system
intended to work with VRR, multiple fixed rates, and typical fixed  rate
devices.

System can be disabled with
setprop debug.sf.vsync_reactor 0; stop; start

Test: go/dispsync2-checks
Fixes: 140302863

Change-Id: I46bb8d55604136cc0eb8b249e465d6ae5470c3f3
parent 69298c18
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ namespace android {

std::unique_ptr<DispSync> createDispSync() {
    // TODO (140302863) remove this and use the vsync_reactor system.
    if (property_get_bool("debug.sf.vsync_reactor", false)) {
    if (property_get_bool("debug.sf.vsync_reactor", true)) {
        // TODO (144707443) tune Predictor tunables.
        static constexpr int default_rate = 60;
        static constexpr auto initial_period =
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ VSyncPredictor::~VSyncPredictor() = default;

VSyncPredictor::VSyncPredictor(nsecs_t idealPeriod, size_t historySize,
                               size_t minimumSamplesForPrediction, uint32_t outlierTolerancePercent)
      : mTraceOn(property_get_bool("debug.sf.vsp_trace", false)),
      : mTraceOn(property_get_bool("debug.sf.vsp_trace", true)),
        kHistorySize(historySize),
        kMinimumSamplesForPrediction(minimumSamplesForPrediction),
        kOutlierTolerancePercent(std::min(outlierTolerancePercent, kMaxPercent)),