return NULL;
}
+static tdm_error
+_tdm_hwc_check_hwc_commit_handler_validation(tdm_private_hwc *private_hwc, tdm_private_hwc_commit_handler *hwc_commit_handler)
+{
+ tdm_private_hwc_commit_handler *commit_handler = NULL;
+
+ if (LIST_IS_EMPTY(&private_hwc->hwc_commit_handler_list))
+ return TDM_ERROR_INVALID_PARAMETER;
+
+ LIST_FOR_EACH_ENTRY(commit_handler, &private_hwc->hwc_commit_handler_list, link) {
+ if (commit_handler == hwc_commit_handler)
+ return TDM_ERROR_NONE;
+ }
+
+ return TDM_ERROR_INVALID_PARAMETER;
+}
+
static void
_tdm_hwc_thread_cb_commit(tdm_private_display *private_display, void *object,
tdm_thread_cb_base *cb_base, void *user_data)
tdm_thread_cb_remove(private_hwc, TDM_THREAD_CB_HWC_COMMIT, hwc_commit_handler,
_tdm_hwc_thread_cb_commit, NULL);
+ TDM_RETURN_IF_FAIL(_tdm_hwc_check_hwc_commit_handler_validation(private_hwc, hwc_commit_handler) == TDM_ERROR_NONE)
+
LIST_DEL(&hwc_commit_handler->link);
if (tdm_debug_module & TDM_DEBUG_COMMIT) {