tdm_private_module *private_module;
tdm_func_hwc *func_hwc = NULL;
tdm_private_hwc_commit_handler *hwc_commit_handler = NULL;
+ tdm_private_voutput *private_voutput = NULL;
+ tdm_private_voutput_commit_handler *voutput_commit_handler = NULL;
HWC_FUNC_ENTRY();
if (tdm_debug_module & TDM_DEBUG_COMMIT)
TDM_INFO("hwc(%d) commit", private_hwc->index);
+ if (private_module == private_display->virtual_module) {
+ if (!private_output->private_voutput) {
+ TDM_ERR("virtual module but don't have voutput");
+ _pthread_mutex_unlock(&private_display->lock);
+ return TDM_ERROR_BAD_MODULE;
+ }
+ }
+
if (!private_hwc->regist_commit_cb) {
private_hwc->regist_commit_cb = 1;
ret = func_hwc->hwc_set_commit_handler(private_hwc->hwc_backend, _tdm_hwc_cb_commit);
hwc_commit_handler->user_data = user_data;
hwc_commit_handler->owner_tid = syscall(SYS_gettid);
+ if (private_module == private_display->virtual_module) {
+ private_voutput = private_output->private_voutput;
+
+ if (LIST_LENGTH(&private_voutput->voutput_commit_handler_list) != 0) {
+ voutput_commit_handler = LIST_FIRST_ENTRY(&private_voutput->voutput_commit_handler_list, tdm_private_voutput_commit_handler, link);
+ voutput_commit_handler->user_data = private_hwc->display_target_buffer;
+ }
+ }
+
ret = func_hwc->hwc_commit(private_hwc->hwc_backend, sync, hwc_commit_handler);
TDM_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, commit_failed);