hwcomposer2: few changes for refresh rate switching
- getSupportedDisplayVsyncPeriods was removed as the vsync period
can be obtained by getDisplayAttribute for each individual config.
- renamed setActiveConfigAndVsyncPeriod -> setActiveConfigWithConstraints
to better describe what this function does.
- added VsyncPeriodChangeTimeline and onVsyncPeriodTimingChanged
Test: rev up composer to 2.4 and test refresh rate switching
Bug: 141329414
Change-Id: Ifec51c893bb9038e9ac48d02c1c7b0fe9e25c108
diff --git a/include/hardware/hwcomposer_defs.h b/include/hardware/hwcomposer_defs.h
index 8ca474b..db81c51 100644
--- a/include/hardware/hwcomposer_defs.h
+++ b/include/hardware/hwcomposer_defs.h
@@ -250,6 +250,11 @@
/* Indicates which of the vendor-defined color transforms is provided by
* this configuration. */
HWC_DISPLAY_COLOR_TRANSFORM = 6,
+
+ /* The configuration group this config is associated to. The groups are defined
+ * to mark certain configs as similar and changing configs within a certain group
+ * may be done seamlessly in some conditions. setActiveConfigWithConstraints. */
+ HWC_DISPLAY_CONFIG_GROUP = 7,
};
/* Allowed events for hwc_methods::eventControl() */
@@ -310,6 +315,21 @@
uint8_t seamlessRequired;
} hwc_vsync_period_change_constraints_t;
+/* Timing for a vsync period change. */
+typedef struct hwc_vsync_period_change_timeline {
+ /* The time in CLOCK_MONOTONIC when the new display will start to refresh at
+ * the new vsync period. */
+ int64_t newVsyncAppliedTimeNanos;
+
+ /* Set to true if the client is required to sent a frame to be displayed before
+ * the change can take place. */
+ uint8_t refreshRequired;
+
+ /* The time in CLOCK_MONOTONIC when the client is expected to send the new frame.
+ * Should be ignored if refreshRequired is false. */
+ int64_t refreshTimeNanos;
+} hwc_vsync_period_change_timeline_t;
+
/*****************************************************************************/
__END_DECLS