SF: Reconfirm all period changes, ignore HWC

This change includes two separate fixes to make waking up from idle more
robust when using a kernel idle timer:

  1) Always reconfirm the refresh rate when we resync to hardware vsync.
     This is because if the kernel idle timer is enabled, we may not
     immediately be in the refresh rate we expect to be.
  2) Ignore the refresh rate reported by the hardware vsync callbacks,
     since that refresh rate may not reflect the actual refresh rate
     when the kernel idle timer is in effect.

Bug: 154303580
Test: systrace
Test: libsurfaceflinger_unittest
Change-Id: I79c66faeaed262acd9c5925fe2202a9fb3f10b7b
diff --git a/services/surfaceflinger/Scheduler/Scheduler.h b/services/surfaceflinger/Scheduler/Scheduler.h
index 4a0280f..1b8ceb7 100644
--- a/services/surfaceflinger/Scheduler/Scheduler.h
+++ b/services/surfaceflinger/Scheduler/Scheduler.h
@@ -205,15 +205,15 @@
 
     std::atomic<nsecs_t> mLastResyncTime = 0;
 
+    // Whether to use idle timer callbacks that support the kernel timer.
+    const bool mSupportKernelTimer;
+
     std::unique_ptr<DispSync> mPrimaryDispSync;
     std::unique_ptr<EventControlThread> mEventControlThread;
 
     // Used to choose refresh rate if content detection is enabled.
     std::unique_ptr<scheduler::LayerHistory> mLayerHistory;
 
-    // Whether to use idle timer callbacks that support the kernel timer.
-    const bool mSupportKernelTimer;
-
     // Timer that records time between requests for next vsync.
     std::optional<scheduler::OneShotTimer> mIdleTimer;
     // Timer used to monitor touch events.