correct email address
[platform/core/uifw/libtdm.git] / src / tdm.c
index fca53dd..5d9e04d 100644 (file)
--- a/src/tdm.c
+++ b/src/tdm.c
@@ -9,7 +9,7 @@
  *          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
@@ -46,6 +46,10 @@ int tdm_mutex_lock_line;
 const char *tdm_mutex_unlock_func;
 int tdm_mutex_unlock_line;
 
+pthread_mutex_t tdm_debug_mutex_check_lock = PTHREAD_MUTEX_INITIALIZER;
+const char *tdm_debug_mutex_lock_func;
+int tdm_debug_mutex_lock_line;
+
 /* LCOV_EXCL_START */
 static tdm_private_layer *
 _tdm_display_find_private_layer(tdm_private_output *private_output,
@@ -194,7 +198,8 @@ _tdm_display_destroy_private_output(tdm_private_output *private_output)
 
        LIST_FOR_EACH_ENTRY_SAFE(h, hh, &private_output->change_handler_list, link) {
                LIST_DEL(&h->link);
-               tdm_thread_cb_remove(h->private_output, TDM_THREAD_CB_OUTPUT_CHANGE, NULL, tdm_output_thread_cb_change, h);
+               tdm_thread_cb_remove(h->private_output, TDM_THREAD_CB_OUTPUT_DPMS, NULL, tdm_output_thread_cb_change, h);
+               tdm_thread_cb_remove(h->private_output, TDM_THREAD_CB_OUTPUT_STATUS, NULL, tdm_output_thread_cb_change, h);
                free(h);
        }
 
@@ -430,6 +435,8 @@ tdm_display_update_output(tdm_private_module *private_module,
                LIST_INITHEAD(&private_output->pending_commit_handler_list);
                LIST_INITHEAD(&private_output->change_handler_list);
 
+               private_output->need_validate.event_fd = -1;
+
                if (func_output->output_set_status_handler) {
                        func_output->output_set_status_handler(private_output->output_backend,
                                                                                                   tdm_output_cb_status,
@@ -806,7 +813,7 @@ _tdm_display_load_module_with_file(tdm_private_display *private_display,
        TDM_TRACE_BEGIN("TDM_Load_Backend");
        module = dlopen(path, RTLD_LAZY);
        if (!module) {
-               TDM_ERR("failed to load module: %s(%s)", dlerror(), file);
+               TDM_ERR("%s", dlerror());
                TDM_TRACE_END();
                ret = TDM_ERROR_BAD_MODULE;
                goto failed_load;
@@ -1139,9 +1146,10 @@ tdm_display_deinit(tdm_display *dpy)
         */
        _pthread_mutex_lock(&private_display->lock);
        tdm_event_loop_stop(private_display);
-       tdm_event_loop_deinit(private_display);
        _pthread_mutex_unlock(&private_display->lock);
 
+       tdm_event_loop_deinit(private_display);
+
        /* when private_output is destroyed, all vblank resources of client and server
         * are destroyed. Then we can call tdm_vblank_deinit. After destroying display,
         * we can unload backend modulues.