drm_hwcomposer: Implement SetActiveConfigWithConstraints

Enough to get 100% passes in Composer 2.4 VTS.
Some SOCs require a VTS fix to pass [1]

[1]: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1954544
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
diff --git a/hwc2_device/HwcDisplay.h b/hwc2_device/HwcDisplay.h
index 5a5c98e..e7ce7ef 100644
--- a/hwc2_device/HwcDisplay.h
+++ b/hwc2_device/HwcDisplay.h
@@ -195,7 +195,9 @@
 
   DrmHwcTwo *const hwc2_;
 
-  std::optional<DrmMode> staged_mode;
+  std::optional<DrmMode> staged_mode_;
+  int64_t staged_mode_change_time_{};
+  uint32_t staged_mode_config_id_{};
 
   DrmDisplayPipeline *const pipeline_;
 
@@ -204,6 +206,8 @@
   VSyncWorker vsync_worker_;
   bool vsync_event_en_{};
   bool vsync_flattening_en_{};
+  bool vsync_tracking_en_{};
+  int64_t last_vsync_ts_{};
 
   const hwc2_display_t handle_;
   HWC2::DisplayType type_;
@@ -223,6 +227,8 @@
   std::string DumpDelta(HwcDisplay::Stats delta);
 
   HWC2::Error Init();
+
+  HWC2::Error SetActiveConfigInternal(uint32_t config, int64_t change_time);
 };
 
 }  // namespace android