* Taeheon Kim <th908.kim@samsung.com>,
* YoungJun Cho <yj44.cho@samsung.com>,
* SooChan Lim <sc1.lim@samsung.com>,
- * Boram Park <sc1.lim@samsung.com>
+ * Boram Park <boram1288.park@samsung.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
output_status.base.sync = 1;
output_status.status = status;
- ret = tdm_thread_cb_call(private_output, &output_status.base);
+ ret = tdm_thread_cb_call(private_output, &output_status.base, 1);
TDM_WARNING_IF_FAIL(ret == TDM_ERROR_NONE);
return TDM_ERROR_NONE;
output_dpms.base.sync = 0;
output_dpms.dpms = dpms;
- ret = tdm_thread_cb_call(private_output, &output_dpms.base);
+ ret = tdm_thread_cb_call(private_output, &output_dpms.base, 1);
TDM_WARNING_IF_FAIL(ret == TDM_ERROR_NONE);
return TDM_ERROR_NONE;
if (tdm_debug_module & TDM_DEBUG_COMMIT)
TDM_INFO("output(%d) wait_vblank: handler(%p)", vblank_handler->private_output->pipe, vblank_handler);
- ret = tdm_thread_cb_call(vblank_handler->private_output, &output_vblank.base);
+ ret = tdm_thread_cb_call(vblank_handler->private_output, &output_vblank.base, 1);
TDM_WARNING_IF_FAIL(ret == TDM_ERROR_NONE);
}
output_commit.tv_sec = tv_sec;
output_commit.tv_usec = tv_usec;
- ret = tdm_thread_cb_call(private_output, &output_commit.base);
+ ret = tdm_thread_cb_call(private_output, &output_commit.base, 1);
TDM_WARNING_IF_FAIL(ret == TDM_ERROR_NONE);
}
TDM_RETURN_VAL_IF_FAIL(ret == TDM_ERROR_NONE, ret);
if (!TDM_OUTPUT_DPMS_VSYNC_IS_OFF(dpms_value)) {
- if (func) {
- if (!private_output->regist_commit_cb) {
- private_output->regist_commit_cb = 1;
- ret = func_output->output_set_commit_handler(private_output->output_backend, _tdm_output_cb_commit);
- TDM_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, commit_failed);
- }
-
- output_commit_handler = calloc(1, sizeof(tdm_private_output_commit_handler));
- if (!output_commit_handler) {
- /* LCOV_EXCL_START */
- TDM_ERR("failed: alloc memory");
- return TDM_ERROR_OUT_OF_MEMORY;
- /* LCOV_EXCL_STOP */
- }
+ if (!private_output->regist_commit_cb) {
+ private_output->regist_commit_cb = 1;
+ ret = func_output->output_set_commit_handler(private_output->output_backend, _tdm_output_cb_commit);
+ TDM_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, commit_failed);
+ }
- ret = tdm_thread_cb_add(private_output, TDM_THREAD_CB_OUTPUT_COMMIT, output_commit_handler, _tdm_output_thread_cb_commit, NULL);
- if (ret != TDM_ERROR_NONE) {
- TDM_ERR("tdm_thread_cb_add failed");
- free(output_commit_handler);
- return ret;
- }
+ output_commit_handler = calloc(1, sizeof(tdm_private_output_commit_handler));
+ if (!output_commit_handler) {
+ /* LCOV_EXCL_START */
+ TDM_ERR("failed: alloc memory");
+ return TDM_ERROR_OUT_OF_MEMORY;
+ /* LCOV_EXCL_STOP */
+ }
- LIST_ADDTAIL(&output_commit_handler->link, &private_output->output_commit_handler_list);
- output_commit_handler->private_output = private_output;
- output_commit_handler->func = func;
- output_commit_handler->user_data = user_data;
- output_commit_handler->owner_tid = syscall(SYS_gettid);
+ ret = tdm_thread_cb_add(private_output, TDM_THREAD_CB_OUTPUT_COMMIT, output_commit_handler, _tdm_output_thread_cb_commit, NULL);
+ if (ret != TDM_ERROR_NONE) {
+ TDM_ERR("tdm_thread_cb_add failed");
+ free(output_commit_handler);
+ return ret;
}
+ LIST_ADDTAIL(&output_commit_handler->link, &private_output->output_commit_handler_list);
+ output_commit_handler->private_output = private_output;
+ output_commit_handler->func = func;
+ output_commit_handler->user_data = user_data;
+ output_commit_handler->owner_tid = syscall(SYS_gettid);
+
ret = func_output->output_commit(private_output->output_backend, sync,
output_commit_handler);
TDM_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, commit_failed);
+ if (ret == TDM_ERROR_NONE) {
+ if (private_output->current_mode &&
+ private_output->caps.status != TDM_OUTPUT_CONN_STATUS_MODE_SETTED) {
+ TDM_WRN("backend doesn't change the output connection status");
+ tdm_output_cb_status(private_output->output_backend,
+ TDM_OUTPUT_CONN_STATUS_MODE_SETTED,
+ private_output);
+ }
+ }
+
if (tdm_debug_module & TDM_DEBUG_COMMIT)
TDM_INFO("output(%d) backend commit: handle(%p) func(%p) user_data(%p)",
private_output->pipe, output_commit_handler, func, user_data);
if (!private_layer->waiting_buffer)
continue;
- if (private_layer->committed_buffer)
+ if (private_layer->committed_buffer) {
tdm_layer_free_buffer(private_layer, private_layer->committed_buffer);
+ private_layer->committed_buffer = NULL;
+ if (tdm_debug_module & TDM_DEBUG_BUFFER)
+ TDM_INFO("layer(%p) waiting_buffer(%p) committed_buffer(%p)",
+ private_layer, private_layer->waiting_buffer->buffer,
+ private_layer->committed_buffer);
+ }
private_layer->committed_buffer = private_layer->waiting_buffer;
private_layer->waiting_buffer = NULL;
if (private_output->current_dpms_value != dpms_value) {
private_output->current_dpms_value = dpms_value;
_tdm_output_call_thread_cb_dpms(private_output, dpms_value);
- TDM_INFO("output(%d) dpms '%s' done", private_output->pipe, tdm_dpms_str(dpms_value));
}
+ TDM_INFO("output(%d) dpms '%s' done", private_output->pipe, tdm_dpms_str(dpms_value));
} else {
tdm_output_dpms temp = TDM_OUTPUT_DPMS_OFF;
ev.base.data = NULL;
ev.base.sync = 0;
- ret = tdm_thread_cb_call(private_output, &ev.base);
+ ret = tdm_thread_cb_call(private_output, &ev.base, 1);
TDM_WARNING_IF_FAIL(ret == TDM_ERROR_NONE);
TDM_INFO("tdm-thread: get a 'need to revalidate' event for the ouptut:%p.", private_output);