tdm_hwc_window **hwc_windows, int *fences);
/**
+ * @brief Get the commit interval
+ * @param[in] hwc A hwc object
+ * @param[out] interval commit interval of backend
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+tdm_error
+tdm_hwc_get_commit_interval(tdm_hwc *hwc, tdm_hwc_commit_interval *interval);
+
+/**
* @brief Set the property which has a given id on the hwc object.
* @param[in] hwc A hwc object
* @param[in] id The property id
* @return #TDM_ERROR_NONE if success. Otherwise, error value.
*/
tdm_error (*hwc_get_property)(tdm_hwc *hwc, uint32_t id, tdm_value *value);
+
+ /**
+ * @brief Get the commit interval
+ * @param[in] hwc A hwc object
+ * @param[out] interval commit interval of backend
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+ tdm_error (*hwc_get_commit_interval)(tdm_hwc *hwc, tdm_hwc_commit_interval *interval);
} tdm_func_hwc;
/**
TDM_HWC_WIN_CONSTRAINT_BUFFER_QUEUE = (1 << 0),
} tdm_hwc_window_constraint;
+typedef enum {
+ TDM_HWC_COMMIT_INTERVAL_NONE = 0,
+ /** If this interval is set by tdm backend, the compositor call commit per vblank
+ * even if the handler of commit isn't called.
+ */
+ TDM_HWC_COMMIT_INTERVAL_VBLANK = 1,
+} tdm_hwc_commit_interval;
+
/**
* @brief The tdm display object
*/
return ret;
}
+
+tdm_error
+tdm_hwc_get_commit_interval(tdm_hwc *hwc, tdm_hwc_commit_interval *refresh)
+{
+ tdm_private_module *private_module;
+ tdm_func_hwc *func_hwc = NULL;
+
+ HWC_FUNC_ENTRY();
+
+ _pthread_mutex_lock(&private_display->lock);
+
+ private_module = private_hwc->private_module;
+ func_hwc = &private_module->func_hwc;
+
+ /* LCOV_EXCL_START */
+ if (!func_hwc->hwc_get_commit_interval) {
+ _pthread_mutex_unlock(&private_display->lock);
+ return TDM_ERROR_NOT_IMPLEMENTED;
+ }
+
+ ret = func_hwc->hwc_get_commit_interval(private_hwc->hwc_backend, refresh);
+ /* LCOV_EXCL_STOP */
+
+ _pthread_mutex_unlock(&private_display->lock);
+
+ return ret;
+}