return ret;
}
+/* LCOV_EXCL_START */
static void
_tdm_output_update(tdm_output *output_backend, void *user_data)
{
TDM_OUTPUT_CHANGE_CONNECTION,
value, 0);
}
+/* LCOV_EXCL_STOP */
EXTERN tdm_error
tdm_output_add_change_handler(tdm_output *output,
change_handler = calloc(1, sizeof(tdm_private_change_handler));
if (!change_handler) {
+ /* LCOV_EXCL_START */
TDM_ERR("failed: alloc memory");
_pthread_mutex_unlock(&private_display->lock);
return TDM_ERROR_OUT_OF_MEMORY;
+ /* LCOV_EXCL_STOP */
}
change_handler->private_output = private_output;
func_output = &private_display->func_output;
if (!func_output->output_set_property) {
+ /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
+ /* LCOV_EXCL_STOP */
}
ret = func_output->output_set_property(private_output->output_backend, id,
func_output = &private_display->func_output;
if (!func_output->output_get_property) {
+ /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
+ /* LCOV_EXCL_STOP */
}
ret = func_output->output_get_property(private_output->output_backend, id,
interval = 1;
if (!func_output->output_wait_vblank) {
+ /* LCOV_EXCL_START */
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
+ /* LCOV_EXCL_STOP */
}
if (!private_output->regist_vblank_cb) {
vblank_handler = calloc(1, sizeof(tdm_private_vblank_handler));
if (!vblank_handler) {
+ /* LCOV_EXCL_START */
TDM_ERR("failed: alloc memory");
return TDM_ERROR_OUT_OF_MEMORY;
+ /* LCOV_EXCL_STOP */
}
if (tdm_debug_module & TDM_DEBUG_COMMIT)
return ret;
wait_failed:
+ /* LCOV_EXCL_START */
if (vblank_handler) {
LIST_DEL(&vblank_handler->link);
free(vblank_handler);
}
return ret;
+ /* LCOV_EXCL_STOP */
}
EXTERN tdm_error
return ret;
}
+/* LCOV_EXCL_START */
EXTERN tdm_error
tdm_output_wait_vblank_add_front(tdm_output *output, int interval, int sync,
tdm_output_vblank_handler func, void *user_data)
return ret;
}
+/* LCOV_EXCL_STOP */
INTERN void
tdm_output_remove_vblank_handler_internal(tdm_output *output, tdm_output_vblank_handler func, void *user_data)
func_output = &private_display->func_output;
if (!func_output->output_commit) {
+ /* LCOV_EXCL_START */
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
+ /* LCOV_EXCL_STOP */
}
ret = tdm_output_get_dpms_internal(output, &dpms_value);
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);
return ret;
commit_failed:
+ /* LCOV_EXCL_START */
if (output_commit_handler) {
LIST_DEL(&output_commit_handler->link);
free(output_commit_handler);
}
return ret;
+ /* LCOV_EXCL_STOP */
}
EXTERN tdm_error
func_output = &private_display->func_output;
if (!func_output->output_set_mode) {
+ /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
+ /* LCOV_EXCL_STOP */
}
ret = func_output->output_set_mode(private_output->output_backend, mode);
return TDM_ERROR_NONE;
}
+/* LCOV_EXCL_START */
INTERN void
tdm_output_cb_dpms(tdm_output *output_backend, tdm_output_dpms dpms, void *user_data)
{
TDM_OUTPUT_CHANGE_DPMS,
value, 0);
}
+/* LCOV_EXCL_STOP */
EXTERN tdm_error
tdm_output_set_dpms(tdm_output *output, tdm_output_dpms dpms_value)
tdm_event_loop_add_timer_handler(private_output->private_display,
_tdm_output_dpms_changed_timeout, private_output, NULL);
if (!private_output->dpms_changed_timer) {
+ /* LCOV_EXCL_START */
TDM_ERR("can't create dpms timer!!");
_pthread_mutex_unlock(&private_display->lock);
return TDM_ERROR_OUT_OF_MEMORY;
+ /* LCOV_EXCL_STOP */
}
}
if (func_output->output_set_dpms)
ret = func_output->output_set_dpms(private_output->output_backend, dpms_value);
else {
+ /* LCOV_EXCL_START */
ret = TDM_ERROR_NONE;
TDM_WRN("not implemented!!");
goto done;
+ /* LCOV_EXCL_STOP */
}
done:
return ret;
}
+/* LCOV_EXCL_START */
EXTERN tdm_error
tdm_output_set_dpms_async(tdm_output *output, tdm_output_dpms dpms_value)
{
return ret;
}
+/* LCOV_EXCL_STOP */
INTERN tdm_error
tdm_output_get_dpms_internal(tdm_output *output, tdm_output_dpms *dpms_value)
func_output = &private_display->func_output;
if (!func_output->output_get_dpms) {
+ /* LCOV_EXCL_START */
*dpms_value = private_output->current_dpms_value;
TDM_WRN("not implemented!!");
return TDM_ERROR_NONE;
+ /* LCOV_EXCL_STOP */
}
ret = func_output->output_get_dpms(private_output->output_backend, dpms_value);
if (ret != TDM_ERROR_NONE) {
+ /* LCOV_EXCL_START */
TDM_ERR("output_get_dpms failed");
*dpms_value = TDM_OUTPUT_DPMS_OFF;
+ /* LCOV_EXCL_STOP */
}
/* TODO: this is ugly. But we have to check if all backends's DPMS operation has no problem. */
if (private_output->caps.capabilities & TDM_OUTPUT_CAPABILITY_HWC)
hwc_window = (tdm_hwc_window *)tdm_hwc_window_create_internal(private_output, error);
else {
+ /* LCOV_EXCL_START */
TDM_ERR("output(%p) not support HWC", private_output);
if (error)
*error = TDM_ERROR_BAD_REQUEST;
+ /* LCOV_EXCL_STOP */
}
_pthread_mutex_unlock(&private_display->lock);
func_output = &private_display->func_output;
if (!func_output->output_hwc_validate) {
+ /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
+ /* LCOV_EXCL_STOP */
}
ret = func_output->output_hwc_validate(private_output->output_backend, num_types);
func_output = &private_display->func_output;
if (!func_output->output_hwc_get_changed_composition_types) {
+ /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
+ /* LCOV_EXCL_STOP */
}
ret = func_output->output_hwc_get_changed_composition_types(private_output->output_backend,
num_elements, hwc_window, composition_types);
if (ret != TDM_ERROR_NONE) {
+ /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
return ret;
+ /* LCOV_EXCL_STOP */
}
if (hwc_window == NULL || composition_types == NULL) {
private_hwc_window = _tdm_output_find_private_hwc_window(private_output, hwc_window[i]);
if (private_hwc_window == NULL) {
+ /* LCOV_EXCL_START */
TDM_ERR("failed! This should never happen!");
func_output->output_hwc_destroy_window(private_output->output_backend, hwc_window[i]);
*num_elements = 0;
_pthread_mutex_unlock(&private_display->lock);
return TDM_ERROR_OPERATION_FAILED;
+ /* LCOV_EXCL_STOP */
}
hwc_window[i] = (tdm_hwc_window*)private_hwc_window;
func_output = &private_display->func_output;
if (!func_output->output_hwc_validate) {
+ /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
+ /* LCOV_EXCL_STOP */
}
ret = func_output->output_hwc_accept_changes(private_output->output_backend);
func_output = &private_display->func_output;
if (!func_output->output_hwc_get_target_buffer_queue) {
+ /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return NULL;
+ /* LCOV_EXCL_STOP */
}
queue = func_output->output_hwc_get_target_buffer_queue(private_output->output_backend, error);
return queue;
}
+/* LCOV_EXCL_START */
static void
_tdm_target_window_dump_buffer(tdm_private_output *private_output, tbm_surface_h buffer)
{
return;
}
+/* LCOV_EXCL_STOP */
EXTERN tdm_error
tdm_output_hwc_set_client_target_buffer(tdm_output *output, tbm_surface_h target_buffer,
}
if (tdm_debug_dump & TDM_DUMP_FLAG_WINDOW) {
+ /* LCOV_EXCL_START */
char str[TDM_PATH_LEN];
static int i;
snprintf(str, TDM_PATH_LEN, "target_window_%d_%03d",
private_output->index, i++);
tdm_helper_dump_buffer_str(target_buffer, tdm_debug_dump_dir, str);
+ /* LCOV_EXCL_STOP */
}
func_output = &private_display->func_output;
if (!func_output->output_hwc_set_client_target_buffer) {
+ /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
+ /* LCOV_EXCL_STOP */
}
/* dump buffer */
if (tdm_dump_enable)
+ /* LCOV_EXCL_START */
_tdm_target_window_dump_buffer((tdm_private_output *)output, target_buffer);
+ /* LCOV_EXCL_STOP */
ret = func_output->output_hwc_set_client_target_buffer(private_output->output_backend, target_buffer, damage);