From 82b4ff6cb6b74199ac424d7b12e92d6d914ca49b Mon Sep 17 00:00:00 2001 From: Boram Park Date: Fri, 23 Mar 2018 13:43:31 +0900 Subject: [PATCH 01/16] output: print out the missed log Change-Id: I862e3710709fbdad2a56902c263746e35589fc3d --- src/tdm_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tdm_output.c b/src/tdm_output.c index 0669b08..e37f9c5 100644 --- a/src/tdm_output.c +++ b/src/tdm_output.c @@ -1362,8 +1362,8 @@ done: 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; -- 2.7.4 From 23ee1596262f465156893904abd900747112b326 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Fri, 23 Mar 2018 13:52:30 +0900 Subject: [PATCH 02/16] rename to tdm_log_printf Change-Id: I3e44a3e79c1e788d4a0c0d0c1f626f45c0a041a8 --- common/tdm_log.c | 2 +- include/tdm_log.h | 2 +- utests/src/ut_tdm.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/tdm_log.c b/common/tdm_log.c index 94aebc3..40a846a 100644 --- a/common/tdm_log.c +++ b/common/tdm_log.c @@ -182,7 +182,7 @@ _tdm_log_vprint_stdout(int level, const char *fmt, va_list ap) EXTERN void -tdm_log_print_stdout(int level, const char *fmt, ...) +tdm_log_printf(int level, const char *fmt, ...) { va_list arg; va_start(arg, fmt); diff --git a/include/tdm_log.h b/include/tdm_log.h index e25f685..3d0ea62 100644 --- a/include/tdm_log.h +++ b/include/tdm_log.h @@ -69,7 +69,7 @@ void tdm_log_enable_dlog(unsigned int enable); void tdm_log_set_debug_level(int level); void tdm_log_set_assert_level(int level); void tdm_log_set_path(const char *path); -void tdm_log_print_stdout(int level, const char *fmt, ...); +void tdm_log_printf(int level, const char *fmt, ...); void tdm_log_print(int level, const char *fmt, ...); void tdm_log_reset(void); diff --git a/utests/src/ut_tdm.h b/utests/src/ut_tdm.h index d4d1f34..4f899e1 100644 --- a/utests/src/ut_tdm.h +++ b/utests/src/ut_tdm.h @@ -38,9 +38,9 @@ extern bool enable_porting_debug; #define TDM_WRN(fmt, args...) tdm_log_print(TDM_LOG_LEVEL_WRN, fmt, ##args) #define TDM_ERR(fmt, args...) tdm_log_print(TDM_LOG_LEVEL_ERR, fmt, ##args) -#define TDM_UT_INFO(fmt, args...) tdm_log_print_stdout(TDM_LOG_LEVEL_INFO, fmt, ##args) -#define TDM_UT_WRN(fmt, args...) tdm_log_print_stdout(TDM_LOG_LEVEL_WRN, fmt, ##args) -#define TDM_UT_ERR(fmt, args...) tdm_log_print_stdout(TDM_LOG_LEVEL_ERR, fmt, ##args) +#define TDM_UT_INFO(fmt, args...) tdm_log_printf(TDM_LOG_LEVEL_INFO, fmt, ##args) +#define TDM_UT_WRN(fmt, args...) tdm_log_printf(TDM_LOG_LEVEL_WRN, fmt, ##args) +#define TDM_UT_ERR(fmt, args...) tdm_log_printf(TDM_LOG_LEVEL_ERR, fmt, ##args) #define TDM_UT_ENTRY() \ TDM_ERR("--------------------------------------------- %s", typeid(*this).name()) -- 2.7.4 From 2cb6415e16317a940a843c26151095993d8ef0ac Mon Sep 17 00:00:00 2001 From: Boram Park Date: Fri, 23 Mar 2018 14:11:07 +0900 Subject: [PATCH 03/16] package version up to 1.16.9 Change-Id: Icab648436c08d43e6d7bdf9592329b8a4aa84087 --- packaging/libtdm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/libtdm.spec b/packaging/libtdm.spec index 7d1e8d3..15233e2 100644 --- a/packaging/libtdm.spec +++ b/packaging/libtdm.spec @@ -2,7 +2,7 @@ %define UTEST_GCOV 0 Name: libtdm -Version: 1.16.8 +Version: 1.16.9 Release: 0 Summary: User Library of Tizen Display Manager Group: Development/Libraries -- 2.7.4 From 5097c66df44e1e41331707672c2409a3a5cc7e46 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Mon, 26 Mar 2018 10:16:34 +0900 Subject: [PATCH 04/16] event_loop: ensure freeing sources when deinit Change-Id: I1eca94d1e572e7b6ce4d799c18f5d3d61a48e252 --- src/tdm_event_loop.c | 37 ++++++++++++++++++++++++++++--------- src/tdm_private_types.h | 2 ++ 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/tdm_event_loop.c b/src/tdm_event_loop.c index 32b7674..e5e4ba2 100644 --- a/src/tdm_event_loop.c +++ b/src/tdm_event_loop.c @@ -40,23 +40,25 @@ #include "tdm_private.h" typedef struct _tdm_event_loop_source_base { + struct list_head link; + tdm_private_display *private_display; struct wl_event_source *wl_source; } tdm_event_loop_source_base; typedef struct _tdm_event_loop_source_fd { tdm_event_loop_source_base base; - tdm_private_display *private_display; tdm_event_loop_fd_handler func; void *user_data; } tdm_event_loop_source_fd; typedef struct _tdm_event_loop_source_timer { tdm_event_loop_source_base base; - tdm_private_display *private_display; tdm_event_loop_timer_handler func; void *user_data; } tdm_event_loop_source_timer; +static tdm_private_loop *keep_private_loop; + static tdm_error _tdm_event_loop_main_fd_handler(int fd, tdm_event_loop_mask mask, void *user_data) { @@ -112,6 +114,8 @@ tdm_event_loop_init(tdm_private_display *private_display) return TDM_ERROR_OPERATION_FAILED; } + LIST_INITHEAD(&private_loop->source_list); + private_loop->dpy = private_display; private_display->private_loop = private_loop; @@ -124,6 +128,8 @@ tdm_event_loop_init(tdm_private_display *private_display) return TDM_ERROR_OPERATION_FAILED; } + keep_private_loop = private_loop; + TDM_INFO("event loop fd(%d)", wl_event_loop_get_fd(private_loop->wl_loop)); return TDM_ERROR_NONE; @@ -133,6 +139,7 @@ INTERN void tdm_event_loop_deinit(tdm_private_display *private_display) { tdm_private_module *private_module = NULL; + tdm_event_loop_source_base *source = NULL, *ss = NULL; TDM_RETURN_IF_FAIL(TDM_MUTEX_IS_LOCKED()); @@ -151,11 +158,17 @@ tdm_event_loop_deinit(tdm_private_display *private_display) private_module->fd = -1; } - if (private_display->private_loop->wl_display) - wl_display_destroy(private_display->private_loop->wl_display); + LIST_FOR_EACH_ENTRY_SAFE(source, ss, &private_display->private_loop->source_list, link) { + tdm_event_loop_source_remove(source); + } + + wl_display_destroy(private_display->private_loop->wl_display); free(private_display->private_loop); private_display->private_loop = NULL; + keep_private_loop = NULL; + + TDM_INFO("event loop deinit done"); } INTERN void @@ -282,7 +295,7 @@ _tdm_event_loop_fd_func(int fd, uint32_t wl_mask, void *data) TDM_RETURN_VAL_IF_FAIL(fd_source, 1); TDM_RETURN_VAL_IF_FAIL(fd_source->func, 1); - private_display = fd_source->private_display; + private_display = fd_source->base.private_display; if (wl_mask & WL_EVENT_READABLE) mask |= TDM_EVENT_LOOP_READABLE; @@ -329,10 +342,10 @@ tdm_event_loop_add_fd_handler(tdm_display *dpy, int fd, tdm_event_loop_mask mask if (mask & TDM_EVENT_LOOP_WRITABLE) wl_mask |= WL_EVENT_WRITABLE; - fd_source->private_display = private_display; fd_source->func = func; fd_source->user_data = user_data; + fd_source->base.private_display = private_display; fd_source->base.wl_source = wl_event_loop_add_fd(private_loop->wl_loop, fd, wl_mask, _tdm_event_loop_fd_func, fd_source); @@ -343,6 +356,8 @@ tdm_event_loop_add_fd_handler(tdm_display *dpy, int fd, tdm_event_loop_mask mask return NULL; } + LIST_ADDTAIL(&fd_source->base.link, &private_loop->source_list); + if (error) *error = TDM_ERROR_NONE; @@ -382,7 +397,7 @@ _tdm_event_loop_timer_func(void *data) TDM_RETURN_VAL_IF_FAIL(timer_source, 1); TDM_RETURN_VAL_IF_FAIL(timer_source->func, 1); - private_display = timer_source->private_display; + private_display = timer_source->base.private_display; /* TDM event_loop function is actually for TDM backend module. When we call the * backend's functions, we have to lock the mutex. TDM backend shouldn't consider @@ -416,10 +431,10 @@ tdm_event_loop_add_timer_handler(tdm_display *dpy, tdm_event_loop_timer_handler timer_source = calloc(1, sizeof(tdm_event_loop_source_timer)); TDM_RETURN_VAL_IF_FAIL_WITH_ERROR(timer_source, TDM_ERROR_OUT_OF_MEMORY, NULL); - timer_source->private_display = private_display; timer_source->func = func; timer_source->user_data = user_data; + timer_source->base.private_display = private_display; timer_source->base.wl_source = wl_event_loop_add_timer(private_loop->wl_loop, _tdm_event_loop_timer_func, timer_source); @@ -430,6 +445,8 @@ tdm_event_loop_add_timer_handler(tdm_display *dpy, tdm_event_loop_timer_handler return NULL; } + LIST_ADDTAIL(&timer_source->base.link, &private_loop->source_list); + if (error) *error = TDM_ERROR_NONE; @@ -459,9 +476,11 @@ tdm_event_loop_source_remove(tdm_event_loop_source *source) TDM_RETURN_IF_FAIL(TDM_MUTEX_IS_LOCKED()); - if (!base) + if (!base || !keep_private_loop) return; + LIST_DEL(&base->link); + wl_event_source_remove(base->wl_source); free(source); diff --git a/src/tdm_private_types.h b/src/tdm_private_types.h index d71664a..24045f1 100644 --- a/src/tdm_private_types.h +++ b/src/tdm_private_types.h @@ -356,6 +356,8 @@ struct _tdm_private_loop { * private_thread is NULL. */ tdm_private_thread *private_thread; + + struct list_head source_list; }; struct _tdm_private_output_vblank_handler { -- 2.7.4 From ee943142766fa6c3af53e44700c416e8cbbdf665 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Mon, 26 Mar 2018 12:00:27 +0900 Subject: [PATCH 05/16] utests: fix getchar issue Change-Id: I1e217b2594be0b46564626d8fe103a49fb3f6349 --- utests/src/ut_tdm.h | 57 +++++++++++------------------------ utests/src/ut_tdm_backend_display.cpp | 17 +++++++++++ 2 files changed, 34 insertions(+), 40 deletions(-) diff --git a/utests/src/ut_tdm.h b/utests/src/ut_tdm.h index 4f899e1..63662e1 100644 --- a/utests/src/ut_tdm.h +++ b/utests/src/ut_tdm.h @@ -105,46 +105,6 @@ extern bool enable_porting_debug; } \ } while(0) -#define TDM_UT_ASK_YNR(fmt, ...) \ - do { \ - if (enable_porting_debug) { \ - char ch; \ - printf(fmt" [Y]es, [n]o, [r]etry: ", ##__VA_ARGS__); \ - do { \ - ch = getchar(); \ - if (ch == '\n') \ - ch = 'y'; \ - else { \ - char tch; \ - while ((tch = getchar()) != '\n' && tch != EOF); \ - } \ - } while (ch != 'y' && ch != 'Y' && ch != 'n' && ch != 'N' && ch != 'r' && ch != 'R'); \ - if (ch == 'n' || ch == 'N') \ - GTEST_FATAL_FAILURE_("tc failed"); \ - if (ch == 'r' || ch == 'R') \ - goto retry; \ - } \ - } while (0) - -#define TDM_UT_ASK_YN(fmt, ...) \ - do { \ - if (enable_porting_debug) { \ - char ch; \ - printf(fmt" [Y]es, [n]o: ", ##__VA_ARGS__); \ - do { \ - ch = getchar(); \ - if (ch == '\n') \ - ch = 'y'; \ - else { \ - char tch; \ - while ((tch = getchar()) != '\n' && tch != EOF); \ - } \ - } while (ch != 'y' && ch != 'Y' && ch != 'n' && ch != 'N'); \ - if (ch == 'n' || ch == 'N') \ - GTEST_FATAL_FAILURE_("tc failed"); \ - } \ - } while (0) - #define TDM_UT_SIZE_ALIGN(value, base) (((value) + ((base) - 1)) & ~((base) - 1)) #define TDM_UT_DUMP_DIR "/tmp/tdm_dump" @@ -278,4 +238,21 @@ public: void TearDown(void) { TDMBackendBasic::TearDown(); } }; +char ut_tdm_backend_getchar(void); + +#define TDM_UT_ASK_YNR(fmt, ...) \ + do { \ + if (enable_porting_debug) { \ + char ch; \ + do { \ + printf(fmt" [Y]es, [n]o, [r]etry): ", ##__VA_ARGS__); \ + ch = ut_tdm_backend_getchar(); \ + } while(ch != 'y' && ch != 'n' && ch != 'r'); \ + if (ch == 'n') \ + GTEST_FATAL_FAILURE_("tc failed"); \ + if (ch == 'r') \ + goto retry; \ + } \ + } while (0) + #endif // _UT_TDM_H_ diff --git a/utests/src/ut_tdm_backend_display.cpp b/utests/src/ut_tdm_backend_display.cpp index 69d7022..58127a8 100644 --- a/utests/src/ut_tdm_backend_display.cpp +++ b/utests/src/ut_tdm_backend_display.cpp @@ -122,6 +122,23 @@ void TDMBackendBasic::DestroyBuffers(void) } } +char +ut_tdm_backend_getchar(void) +{ + int c = getchar(); + int ch = c; + + if (ch == '\n' || ch == '\r') + ch = 'y'; + else if (ch < 'a') + ch += ('a' - 'A'); + + while (c != '\n' && c != EOF) + c = getchar(); + + return ch; +} + TEST_P(TDMBackendBasic, VerifyOutputObject) { tdm_error ret; -- 2.7.4 From 128c190a9a880f7af3b472b2e53546b56b8a1df2 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Mon, 26 Mar 2018 14:11:32 +0900 Subject: [PATCH 06/16] utests: fix warning message Change-Id: Ied96807659fdc9189064edf1a6e2c1eaad20df36 --- utests/src/ut_tdm_backend_display.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utests/src/ut_tdm_backend_display.cpp b/utests/src/ut_tdm_backend_display.cpp index 58127a8..e836407 100644 --- a/utests/src/ut_tdm_backend_display.cpp +++ b/utests/src/ut_tdm_backend_display.cpp @@ -81,7 +81,7 @@ void TDMBackendBasic::SetUp(void) ASSERT_GT(count, 0); layer_count += count; - layers = (tdm_layer**)realloc((void*)layers, sizeof(tdm_layer*) * layer_count); + layers = realloc(layers, layer_count * sizeof(tdm_layer*)); ASSERT_NE(layers, NULL); for (int l = 0; l < count; l++) { -- 2.7.4 From baa55bfdbc3876a956816e46ef996fdffd7b8248 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Mon, 26 Mar 2018 14:16:46 +0900 Subject: [PATCH 07/16] package version up to 1.16.10 Change-Id: I1029cb73e838a998f046f5987b97c9c6c2486139 --- packaging/libtdm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/libtdm.spec b/packaging/libtdm.spec index 15233e2..bc608fb 100644 --- a/packaging/libtdm.spec +++ b/packaging/libtdm.spec @@ -2,7 +2,7 @@ %define UTEST_GCOV 0 Name: libtdm -Version: 1.16.9 +Version: 1.16.10 Release: 0 Summary: User Library of Tizen Display Manager Group: Development/Libraries -- 2.7.4 From f288cdff9b430931cfbbbcee0b9578286f44baa2 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Mon, 26 Mar 2018 14:29:53 +0900 Subject: [PATCH 08/16] utests: fix build-error Change-Id: Id0f1188f4ebbf46af4549151a33dfef63c043c54 --- utests/src/ut_tdm_backend_display.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utests/src/ut_tdm_backend_display.cpp b/utests/src/ut_tdm_backend_display.cpp index e836407..b0afa59 100644 --- a/utests/src/ut_tdm_backend_display.cpp +++ b/utests/src/ut_tdm_backend_display.cpp @@ -81,7 +81,7 @@ void TDMBackendBasic::SetUp(void) ASSERT_GT(count, 0); layer_count += count; - layers = realloc(layers, layer_count * sizeof(tdm_layer*)); + layers = (tdm_layer**)realloc(layers, layer_count * sizeof(tdm_layer*)); ASSERT_NE(layers, NULL); for (int l = 0; l < count; l++) { -- 2.7.4 From 2adc0c96b4af5f88b3560e8ebd0b595a3f483578 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Mon, 26 Mar 2018 15:23:30 +0900 Subject: [PATCH 09/16] correct email address Change-Id: I75c8d8e7b4937d5812021890d7f47e34bb219fec --- client/tdm_client.c | 2 +- client/tdm_client.h | 2 +- client/tdm_client_types.h | 2 +- client/tdm_monitor.c | 2 +- common/tdm_log.c | 2 +- doc/tdm_doc.h | 2 +- include/tdm.h | 2 +- include/tdm_backend.h | 2 +- include/tdm_common.h | 2 +- include/tdm_config.h | 2 +- include/tdm_deprecated.h | 2 +- include/tdm_helper.h | 2 +- include/tdm_log.h | 2 +- include/tdm_types.h | 2 +- src/tdm.c | 2 +- src/tdm_backend.c | 2 +- src/tdm_buffer.c | 2 +- src/tdm_capture.c | 2 +- src/tdm_config.c | 2 +- src/tdm_display.c | 2 +- src/tdm_event_loop.c | 2 +- src/tdm_helper.c | 4 ++-- src/tdm_hwc_window.c | 2 +- src/tdm_layer.c | 2 +- src/tdm_macro.h | 2 +- src/tdm_monitor_server.c | 2 +- src/tdm_output.c | 2 +- src/tdm_pp.c | 2 +- src/tdm_private.h | 2 +- src/tdm_private_types.h | 2 +- src/tdm_server.c | 2 +- src/tdm_thread.c | 2 +- src/tdm_thread.h | 2 +- src/tdm_vblank.c | 2 +- tools/tdm_test_client.c | 2 +- tools/tdm_test_server.c | 2 +- 36 files changed, 37 insertions(+), 37 deletions(-) diff --git a/client/tdm_client.c b/client/tdm_client.c index 1d78e39..4023208 100644 --- a/client/tdm_client.c +++ b/client/tdm_client.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/client/tdm_client.h b/client/tdm_client.h index 2b9dc1e..a13bf2a 100644 --- a/client/tdm_client.h +++ b/client/tdm_client.h @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/client/tdm_client_types.h b/client/tdm_client_types.h index f799c0b..bd7e8a5 100644 --- a/client/tdm_client_types.h +++ b/client/tdm_client_types.h @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/client/tdm_monitor.c b/client/tdm_monitor.c index 30a1a12..b4ab390 100644 --- a/client/tdm_monitor.c +++ b/client/tdm_monitor.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/common/tdm_log.c b/common/tdm_log.c index 40a846a..ac7666d 100644 --- a/common/tdm_log.c +++ b/common/tdm_log.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/doc/tdm_doc.h b/doc/tdm_doc.h index b7e3529..1d83a7d 100644 --- a/doc/tdm_doc.h +++ b/doc/tdm_doc.h @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/include/tdm.h b/include/tdm.h index 0340142..0f9bf5d 100644 --- a/include/tdm.h +++ b/include/tdm.h @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/include/tdm_backend.h b/include/tdm_backend.h index 4e8aee3..970cbc4 100644 --- a/include/tdm_backend.h +++ b/include/tdm_backend.h @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/include/tdm_common.h b/include/tdm_common.h index 35d5c91..ef5ee15 100644 --- a/include/tdm_common.h +++ b/include/tdm_common.h @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/include/tdm_config.h b/include/tdm_config.h index 0428b56..1b1e36a 100644 --- a/include/tdm_config.h +++ b/include/tdm_config.h @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/include/tdm_deprecated.h b/include/tdm_deprecated.h index b52eaf3..e6af2ca 100644 --- a/include/tdm_deprecated.h +++ b/include/tdm_deprecated.h @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/include/tdm_helper.h b/include/tdm_helper.h index f1f305b..62f3cb3 100644 --- a/include/tdm_helper.h +++ b/include/tdm_helper.h @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/include/tdm_log.h b/include/tdm_log.h index 3d0ea62..f1b3cdc 100644 --- a/include/tdm_log.h +++ b/include/tdm_log.h @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/include/tdm_types.h b/include/tdm_types.h index a718f9a..68f3096 100644 --- a/include/tdm_types.h +++ b/include/tdm_types.h @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm.c b/src/tdm.c index bb630d5..5d9e04d 100644 --- a/src/tdm.c +++ b/src/tdm.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_backend.c b/src/tdm_backend.c index d2488d3..238d085 100644 --- a/src/tdm_backend.c +++ b/src/tdm_backend.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_buffer.c b/src/tdm_buffer.c index 72d9d17..81716b5 100644 --- a/src/tdm_buffer.c +++ b/src/tdm_buffer.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_capture.c b/src/tdm_capture.c index c3da6b7..4b58fbd 100644 --- a/src/tdm_capture.c +++ b/src/tdm_capture.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_config.c b/src/tdm_config.c index fb361d2..9918fa4 100644 --- a/src/tdm_config.c +++ b/src/tdm_config.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_display.c b/src/tdm_display.c index ff605e2..57e5a11 100644 --- a/src/tdm_display.c +++ b/src/tdm_display.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_event_loop.c b/src/tdm_event_loop.c index e5e4ba2..2e7fbbd 100644 --- a/src/tdm_event_loop.c +++ b/src/tdm_event_loop.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_helper.c b/src/tdm_helper.c index 2e00648..61971e5 100644 --- a/src/tdm_helper.c +++ b/src/tdm_helper.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the @@ -1077,4 +1077,4 @@ tdm_helper_output_vblank_timer_expired(tdm_output *output) TDM_RETURN_VAL_IF_FAIL(private_output != NULL, -1); return private_output->vblank_timeout_timer_expired; -} \ No newline at end of file +} diff --git a/src/tdm_hwc_window.c b/src/tdm_hwc_window.c index 97169e1..c3619ed 100644 --- a/src/tdm_hwc_window.c +++ b/src/tdm_hwc_window.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_layer.c b/src/tdm_layer.c index daefb98..d8503a5 100644 --- a/src/tdm_layer.c +++ b/src/tdm_layer.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_macro.h b/src/tdm_macro.h index 14c0f7a..00af3ef 100644 --- a/src/tdm_macro.h +++ b/src/tdm_macro.h @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_monitor_server.c b/src/tdm_monitor_server.c index e566681..a68ce21 100644 --- a/src/tdm_monitor_server.c +++ b/src/tdm_monitor_server.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_output.c b/src/tdm_output.c index e37f9c5..a8b5065 100644 --- a/src/tdm_output.c +++ b/src/tdm_output.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_pp.c b/src/tdm_pp.c index bca4cd8..1a0e91e 100644 --- a/src/tdm_pp.c +++ b/src/tdm_pp.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_private.h b/src/tdm_private.h index 43c639c..2d60eb7 100644 --- a/src/tdm_private.h +++ b/src/tdm_private.h @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_private_types.h b/src/tdm_private_types.h index 24045f1..980ebfe 100644 --- a/src/tdm_private_types.h +++ b/src/tdm_private_types.h @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_server.c b/src/tdm_server.c index 13a7867..30bb475 100644 --- a/src/tdm_server.c +++ b/src/tdm_server.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_thread.c b/src/tdm_thread.c index 20e995f..2ca90a0 100644 --- a/src/tdm_thread.c +++ b/src/tdm_thread.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_thread.h b/src/tdm_thread.h index 57c4c6f..84ad930 100644 --- a/src/tdm_thread.h +++ b/src/tdm_thread.h @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/src/tdm_vblank.c b/src/tdm_vblank.c index cbedea7..4bfa556 100644 --- a/src/tdm_vblank.c +++ b/src/tdm_vblank.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/tools/tdm_test_client.c b/tools/tdm_test_client.c index 11976fb..1031685 100644 --- a/tools/tdm_test_client.c +++ b/tools/tdm_test_client.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/tools/tdm_test_server.c b/tools/tdm_test_server.c index 17c0121..535462f 100644 --- a/tools/tdm_test_server.c +++ b/tools/tdm_test_server.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the -- 2.7.4 From c312230a89afa92bf752c17d658c3b310178e523 Mon Sep 17 00:00:00 2001 From: Junkyeong Kim Date: Mon, 26 Mar 2018 18:56:57 +0900 Subject: [PATCH 10/16] utests: change pp scale test src buffer size Change-Id: Ia80d1fea3d626132b4ff6ee7b638a58048d53a17 Signed-off-by: Junkyeong Kim --- utests/src/ut_tdm_backend_pp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utests/src/ut_tdm_backend_pp.cpp b/utests/src/ut_tdm_backend_pp.cpp index e65de76..78b268f 100644 --- a/utests/src/ut_tdm_backend_pp.cpp +++ b/utests/src/ut_tdm_backend_pp.cpp @@ -626,7 +626,7 @@ TEST_P(TDMBackendPP, PPConvertScale) ASSERT_EQ(PreparePP(), true); - ASSERT_EQ(PrepareBuffers(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE / 2, dst_formats[f], + ASSERT_EQ(PrepareBuffers(mode->hdisplay / 2, mode->vdisplay / 4, dst_formats[f], mode->hdisplay, mode->vdisplay / 2, dst_formats[f], TDM_TRANSFORM_NORMAL), true); -- 2.7.4 From fea25ace45feadad465b8b3a65233315ca66bc22 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Mon, 26 Mar 2018 20:19:10 +0900 Subject: [PATCH 11/16] display: move function position Change-Id: Icccd42165bd5b19f97ebb2b0e358318004ab346b --- src/tdm.c | 302 -------------------------------------------------- src/tdm_display.c | 321 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 311 insertions(+), 312 deletions(-) diff --git a/src/tdm.c b/src/tdm.c index 5d9e04d..b2e2c35 100644 --- a/src/tdm.c +++ b/src/tdm.c @@ -1213,305 +1213,3 @@ tdm_output_is_valid(tdm_output *output) return 0; } - -/* LCOV_EXCL_START */ -INTERN int -tdm_module_check_abi(tdm_private_module *private_module, int abimaj, int abimin) -{ - tdm_backend_module *module = private_module->module_data; - - if (TDM_BACKEND_GET_ABI_MAJOR(module->abi_version) < abimaj) - return 0; - - if (TDM_BACKEND_GET_ABI_MINOR(module->abi_version) < abimin) - return 0; - - return 1; -} - -INTERN tdm_error -tdm_display_enable_debug_module(const char*modules) -{ - char temp[TDM_PATH_LEN]; - char *arg; - char *end; - - snprintf(temp, TDM_PATH_LEN, "%s", modules); - - tdm_debug_module = 0; - - arg = strtok_r(temp, TDM_CONFIG_DELIM, &end); - while (arg) { - if (!strncmp(arg, "none", 4)) { - tdm_debug_module = 0; - return TDM_ERROR_NONE; - } - if (!strncmp(arg, "all", 3)) { - tdm_debug_module = 0xFFFFFFFF; - return TDM_ERROR_NONE; - } - if (!strncmp(arg, "buffer", 6)) - tdm_debug_module |= TDM_DEBUG_BUFFER; - else if (!strncmp(arg, "event", 5)) - tdm_debug_module |= TDM_DEBUG_EVENT; - else if (!strncmp(arg, "thread", 6)) - tdm_debug_module |= TDM_DEBUG_THREAD; - else if (!strncmp(arg, "mutex", 5)) - tdm_debug_module |= TDM_DEBUG_MUTEX; - else if (!strncmp(arg, "vblank", 6)) - tdm_debug_module |= TDM_DEBUG_VBLANK; - else if (!strncmp(arg, "commit", 6)) - tdm_debug_module |= TDM_DEBUG_COMMIT; - - arg = strtok_r(NULL, TDM_CONFIG_DELIM, &end); - } - - TDM_INFO("module debugging... '%s'", modules); - - return TDM_ERROR_NONE; -} - -INTERN tdm_error -tdm_display_enable_dump(tdm_private_display *private_display, const char *dump_str, char *reply, int *len) -{ - char temp[TDM_PATH_LEN] = {0,}, temp2[TDM_PATH_LEN] = {0,}; - char *path = NULL, *path2; - char *arg; - char *end; - - snprintf(temp2, TDM_PATH_LEN, "%s", dump_str); - path2 = strtostr(temp, TDM_PATH_LEN, temp2, "@"); - if (!path2 || path2[0] == '\0') - path2 = TDM_DUMP_DIR; - else - path2++; - - tdm_debug_dump = 0; - - snprintf(temp, sizeof(temp), "%s", dump_str); - arg = strtok_r(temp, ",", &end); - TDM_GOTO_IF_FAIL(arg != NULL, done); - - if (!strncmp(arg, "none", 4)) { - tdm_debug_dump = 0; - TDM_SNPRINTF(reply, len, "path: %s\n", (tdm_debug_dump_dir) ? : "unknown"); - if (tdm_debug_dump_dir) { - free(tdm_debug_dump_dir); - tdm_debug_dump_dir = NULL; - } - goto done; - } - - path = tdm_helper_dump_make_directory(path2, reply, len); - TDM_GOTO_IF_FAIL(path != NULL, done); - - if (!strncmp(arg, "current", 7)) { - tdm_private_module *b = NULL; - tdm_private_output *o = NULL; - - if (!private_display) { - TDM_WRN("no private_display"); - goto done; - } - - LIST_FOR_EACH_ENTRY(b, &private_display->module_list, link) { - LIST_FOR_EACH_ENTRY(o, &b->output_list, link) { - tdm_private_layer *l = NULL; - LIST_FOR_EACH_ENTRY(l, &o->layer_list, link) { - char str[TDM_PATH_LEN]; - if (l->usable || l->caps.capabilities & TDM_LAYER_CAPABILITY_VIDEO) - continue; - if (!l->showing_buffer) - continue; - snprintf(str, TDM_PATH_LEN, "layer_%d_%d", o->index, l->index); - tdm_helper_dump_buffer_str(l->showing_buffer->buffer, path, str); - } - } - } - - TDM_SNPRINTF(reply, len, "path: %s\n", path); - goto done; - } - - TDM_SNPRINTF(reply, len, "dump: %s\n", arg); - - while (arg) { - if (!strncmp(arg, "all", 3)) { - tdm_debug_dump = 0xFFFFFFFF; - goto done; - } else if (!strncmp(arg, "layer", 5)) { - tdm_debug_dump |= TDM_DUMP_FLAG_LAYER; - } else if (!strncmp(arg, "pp", 2)) { - tdm_debug_dump |= TDM_DUMP_FLAG_PP; - } else if (!strncmp(arg, "capture", 7)) { - tdm_debug_dump |= TDM_DUMP_FLAG_CAPTURE; - } else if (!strncmp(arg, "window", 6)) { - tdm_debug_dump |= TDM_DUMP_FLAG_WINDOW; - } else - goto done; - - arg = strtok_r(NULL, ",", &end); - } - - if (tdm_debug_dump_dir) - free(tdm_debug_dump_dir); - - tdm_debug_dump_dir = strndup(path, TDM_PATH_LEN); - - TDM_INFO("dump... '%s'", dump_str); - -done: - if (path) - free(path); - - return TDM_ERROR_NONE; -} - -static void -_tdm_display_ttrace_vblank_cb(tdm_vblank *vblank, tdm_error error, unsigned int sequence, - unsigned int tv_sec, unsigned int tv_usec, void *user_data) -{ - tdm_error ret = TDM_ERROR_NONE; - - TDM_TRACE_MARK("VSYNC"); - - ret = tdm_vblank_wait(vblank, 0, 0, 1, _tdm_display_ttrace_vblank_cb, NULL); - TDM_RETURN_IF_FAIL(ret == TDM_ERROR_NONE); -} - -INTERN tdm_error -tdm_display_enable_ttrace_vblank(tdm_display *dpy, tdm_output *output, int enable) -{ - tdm_private_display *private_display = dpy; - tdm_private_module *private_module = NULL; - tdm_private_output *private_output = NULL; - const tdm_output_mode *mode = NULL; - tdm_vblank *vblank = NULL; - tdm_error ret = TDM_ERROR_NONE; - - if (!enable) { - LIST_FOR_EACH_ENTRY(private_module, &private_display->module_list, link) { - LIST_FOR_EACH_ENTRY(private_output, &private_module->output_list, link) { - if (private_output->ttrace_vblank) - tdm_vblank_destroy(private_output->ttrace_vblank); - private_output->ttrace_vblank = NULL; - } - } - return TDM_ERROR_NONE; - } - - private_output = output; - TDM_RETURN_VAL_IF_FAIL(private_output != NULL, TDM_ERROR_INVALID_PARAMETER); - - if (private_output->ttrace_vblank) - return TDM_ERROR_NONE; - - vblank = tdm_vblank_create(private_display, output, &ret); - TDM_RETURN_VAL_IF_FAIL(vblank != NULL, ret); - - ret = tdm_output_get_mode(output, &mode); - TDM_GOTO_IF_FAIL(mode != NULL, enable_fail); - - ret = tdm_vblank_set_fps(vblank, mode->vrefresh); - TDM_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, enable_fail); - - ret = tdm_vblank_set_enable_fake(vblank, 1); - TDM_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, enable_fail); - - ret = tdm_vblank_wait(vblank, 0, 0, 1, _tdm_display_ttrace_vblank_cb, NULL); - TDM_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, enable_fail); - - private_output->ttrace_vblank = vblank; - - return TDM_ERROR_NONE; - -enable_fail: - if (vblank) - tdm_vblank_destroy(vblank); - - return ret; -} - -INTERN tdm_error -tdm_display_enable_ttrace(tdm_private_display *private_display, const char *ttrace, int output_id, char *reply, int *len) -{ - char temp[TDM_PATH_LEN]; - char *arg; - char *end; - tdm_output *output; - tdm_error ret; - tdm_output_type type; - - snprintf(temp, TDM_PATH_LEN, "%s", ttrace); - - tdm_ttrace_output = output_id; - tdm_ttrace_module = 0; - - output = tdm_display_get_output(private_display, output_id, &ret); - if (!output) { - TDM_SNPRINTF(reply, len, "can't find the output_id(%d)\n", output_id); - return ret; - } - - ret = tdm_output_get_output_type(output, &type); - if (ret != TDM_ERROR_NONE) { - TDM_SNPRINTF(reply, len, "can't find the type of output_id(%d)\n", output_id); - return ret; - } - - arg = strtok_r(temp, TDM_CONFIG_DELIM, &end); - while (arg) { - if (!strncmp(arg, "none", 4)) - tdm_ttrace_module = 0; - else if (!strncmp(arg, "all", 3)) - tdm_ttrace_module = 0xFFFFFFFF; - else if (!strncmp(arg, "vsync", 5)) - tdm_ttrace_module |= TDM_TTRACE_VSYNC; - else if (!strncmp(arg, "client_vblank", 13)) - tdm_ttrace_module |= TDM_TTRACE_CLIENT_VBLANK; - else if (!strncmp(arg, "server_vblank", 13)) - tdm_ttrace_module |= TDM_TTRACE_SERVER_VBLANK; - else if (!strncmp(arg, "vblank", 6)) - tdm_ttrace_module |= TDM_TTRACE_VBLANK; - else if (!strncmp(arg, "layer", 5)) - tdm_ttrace_module |= TDM_TTRACE_LAYER; - else if (!strncmp(arg, "pp", 2)) - tdm_ttrace_module |= TDM_TTRACE_PP; - else if (!strncmp(arg, "capture", 7)) - tdm_ttrace_module |= TDM_TTRACE_CAPTURE; - else { - tdm_ttrace_module = 0; - tdm_display_enable_ttrace_vblank(private_display, NULL, 0); - tdm_server_enable_ttrace_client_vblank(private_display, NULL, 0); - TDM_SNPRINTF(reply, len, "unknown option: '%s'\n", arg); - return TDM_ERROR_NONE; - } - - arg = strtok_r(NULL, TDM_CONFIG_DELIM, &end); - } - - TDM_SNPRINTF(reply, len, "ttrace debugging... '%s' %x\n", ttrace, tdm_ttrace_module); - - if (tdm_ttrace_module & TDM_TTRACE_VSYNC) - tdm_display_enable_ttrace_vblank(private_display, output, 1); - else - tdm_display_enable_ttrace_vblank(private_display, NULL, 0); - - if (tdm_ttrace_module & TDM_TTRACE_CLIENT_VBLANK) - tdm_server_enable_ttrace_client_vblank(private_display, output, 1); - else - tdm_server_enable_ttrace_client_vblank(private_display, NULL, 0); - - return TDM_ERROR_NONE; -} - -INTERN tdm_error -tdm_display_enable_fps(tdm_private_display *private_display, int enable) -{ - private_display->print_fps = enable; - - TDM_INFO("print fps: %s", (enable) ? "enable" : "disable"); - - return TDM_ERROR_NONE; -} -/* LCOV_EXCL_STOP */ diff --git a/src/tdm_display.c b/src/tdm_display.c index 57e5a11..d9741a4 100644 --- a/src/tdm_display.c +++ b/src/tdm_display.c @@ -63,6 +63,292 @@ private_module = (tdm_private_module*)module; \ private_display = private_module->private_display; +INTERN tdm_error +tdm_display_enable_debug_module(const char*modules) +{ + char temp[TDM_PATH_LEN]; + char *arg; + char *end; + + snprintf(temp, TDM_PATH_LEN, "%s", modules); + + tdm_debug_module = 0; + + arg = strtok_r(temp, TDM_CONFIG_DELIM, &end); + while (arg) { + if (!strncmp(arg, "none", 4)) { + tdm_debug_module = 0; + return TDM_ERROR_NONE; + } + if (!strncmp(arg, "all", 3)) { + tdm_debug_module = 0xFFFFFFFF; + return TDM_ERROR_NONE; + } + if (!strncmp(arg, "buffer", 6)) + tdm_debug_module |= TDM_DEBUG_BUFFER; + else if (!strncmp(arg, "event", 5)) + tdm_debug_module |= TDM_DEBUG_EVENT; + else if (!strncmp(arg, "thread", 6)) + tdm_debug_module |= TDM_DEBUG_THREAD; + else if (!strncmp(arg, "mutex", 5)) + tdm_debug_module |= TDM_DEBUG_MUTEX; + else if (!strncmp(arg, "vblank", 6)) + tdm_debug_module |= TDM_DEBUG_VBLANK; + else if (!strncmp(arg, "commit", 6)) + tdm_debug_module |= TDM_DEBUG_COMMIT; + + arg = strtok_r(NULL, TDM_CONFIG_DELIM, &end); + } + + TDM_INFO("module debugging... '%s'", modules); + + return TDM_ERROR_NONE; +} + +INTERN tdm_error +tdm_display_enable_dump(tdm_private_display *private_display, const char *dump_str, char *reply, int *len) +{ + char temp[TDM_PATH_LEN] = {0,}, temp2[TDM_PATH_LEN] = {0,}; + char *path = NULL, *path2; + char *arg; + char *end; + + snprintf(temp2, TDM_PATH_LEN, "%s", dump_str); + path2 = strtostr(temp, TDM_PATH_LEN, temp2, "@"); + if (!path2 || path2[0] == '\0') + path2 = TDM_DUMP_DIR; + else + path2++; + + tdm_debug_dump = 0; + + snprintf(temp, sizeof(temp), "%s", dump_str); + arg = strtok_r(temp, ",", &end); + TDM_GOTO_IF_FAIL(arg != NULL, done); + + if (!strncmp(arg, "none", 4)) { + tdm_debug_dump = 0; + TDM_SNPRINTF(reply, len, "path: %s\n", (tdm_debug_dump_dir) ? : "unknown"); + if (tdm_debug_dump_dir) { + free(tdm_debug_dump_dir); + tdm_debug_dump_dir = NULL; + } + goto done; + } + + path = tdm_helper_dump_make_directory(path2, reply, len); + TDM_GOTO_IF_FAIL(path != NULL, done); + + if (!strncmp(arg, "current", 7)) { + tdm_private_module *b = NULL; + tdm_private_output *o = NULL; + + if (!private_display) { + TDM_WRN("no private_display"); + goto done; + } + + LIST_FOR_EACH_ENTRY(b, &private_display->module_list, link) { + LIST_FOR_EACH_ENTRY(o, &b->output_list, link) { + tdm_private_layer *l = NULL; + LIST_FOR_EACH_ENTRY(l, &o->layer_list, link) { + char str[TDM_PATH_LEN]; + if (l->usable || l->caps.capabilities & TDM_LAYER_CAPABILITY_VIDEO) + continue; + if (!l->showing_buffer) + continue; + snprintf(str, TDM_PATH_LEN, "layer_%d_%d", o->index, l->index); + tdm_helper_dump_buffer_str(l->showing_buffer->buffer, path, str); + } + } + } + + TDM_SNPRINTF(reply, len, "path: %s\n", path); + goto done; + } + + TDM_SNPRINTF(reply, len, "dump: %s\n", arg); + + while (arg) { + if (!strncmp(arg, "all", 3)) { + tdm_debug_dump = 0xFFFFFFFF; + goto done; + } else if (!strncmp(arg, "layer", 5)) { + tdm_debug_dump |= TDM_DUMP_FLAG_LAYER; + } else if (!strncmp(arg, "pp", 2)) { + tdm_debug_dump |= TDM_DUMP_FLAG_PP; + } else if (!strncmp(arg, "capture", 7)) { + tdm_debug_dump |= TDM_DUMP_FLAG_CAPTURE; + } else if (!strncmp(arg, "window", 6)) { + tdm_debug_dump |= TDM_DUMP_FLAG_WINDOW; + } else + goto done; + + arg = strtok_r(NULL, ",", &end); + } + + if (tdm_debug_dump_dir) + free(tdm_debug_dump_dir); + + tdm_debug_dump_dir = strndup(path, TDM_PATH_LEN); + + TDM_INFO("dump... '%s'", dump_str); + +done: + if (path) + free(path); + + return TDM_ERROR_NONE; +} + +static void +_tdm_display_ttrace_vblank_cb(tdm_vblank *vblank, tdm_error error, unsigned int sequence, + unsigned int tv_sec, unsigned int tv_usec, void *user_data) +{ + tdm_error ret = TDM_ERROR_NONE; + + TDM_TRACE_MARK("VSYNC"); + + ret = tdm_vblank_wait(vblank, 0, 0, 1, _tdm_display_ttrace_vblank_cb, NULL); + TDM_RETURN_IF_FAIL(ret == TDM_ERROR_NONE); +} + +INTERN tdm_error +tdm_display_enable_ttrace_vblank(tdm_display *dpy, tdm_output *output, int enable) +{ + tdm_private_display *private_display = dpy; + tdm_private_module *private_module = NULL; + tdm_private_output *private_output = NULL; + const tdm_output_mode *mode = NULL; + tdm_vblank *vblank = NULL; + tdm_error ret = TDM_ERROR_NONE; + + if (!enable) { + LIST_FOR_EACH_ENTRY(private_module, &private_display->module_list, link) { + LIST_FOR_EACH_ENTRY(private_output, &private_module->output_list, link) { + if (private_output->ttrace_vblank) + tdm_vblank_destroy(private_output->ttrace_vblank); + private_output->ttrace_vblank = NULL; + } + } + return TDM_ERROR_NONE; + } + + private_output = output; + TDM_RETURN_VAL_IF_FAIL(private_output != NULL, TDM_ERROR_INVALID_PARAMETER); + + if (private_output->ttrace_vblank) + return TDM_ERROR_NONE; + + vblank = tdm_vblank_create(private_display, output, &ret); + TDM_RETURN_VAL_IF_FAIL(vblank != NULL, ret); + + ret = tdm_output_get_mode(output, &mode); + TDM_GOTO_IF_FAIL(mode != NULL, enable_fail); + + ret = tdm_vblank_set_fps(vblank, mode->vrefresh); + TDM_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, enable_fail); + + ret = tdm_vblank_set_enable_fake(vblank, 1); + TDM_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, enable_fail); + + ret = tdm_vblank_wait(vblank, 0, 0, 1, _tdm_display_ttrace_vblank_cb, NULL); + TDM_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, enable_fail); + + private_output->ttrace_vblank = vblank; + + return TDM_ERROR_NONE; + +enable_fail: + if (vblank) + tdm_vblank_destroy(vblank); + + return ret; +} + +INTERN tdm_error +tdm_display_enable_ttrace(tdm_private_display *private_display, const char *ttrace, int output_id, char *reply, int *len) +{ + char temp[TDM_PATH_LEN]; + char *arg; + char *end; + tdm_output *output; + tdm_error ret; + tdm_output_type type; + + snprintf(temp, TDM_PATH_LEN, "%s", ttrace); + + tdm_ttrace_output = output_id; + tdm_ttrace_module = 0; + + output = tdm_display_get_output(private_display, output_id, &ret); + if (!output) { + TDM_SNPRINTF(reply, len, "can't find the output_id(%d)\n", output_id); + return ret; + } + + ret = tdm_output_get_output_type(output, &type); + if (ret != TDM_ERROR_NONE) { + TDM_SNPRINTF(reply, len, "can't find the type of output_id(%d)\n", output_id); + return ret; + } + + arg = strtok_r(temp, TDM_CONFIG_DELIM, &end); + while (arg) { + if (!strncmp(arg, "none", 4)) + tdm_ttrace_module = 0; + else if (!strncmp(arg, "all", 3)) + tdm_ttrace_module = 0xFFFFFFFF; + else if (!strncmp(arg, "vsync", 5)) + tdm_ttrace_module |= TDM_TTRACE_VSYNC; + else if (!strncmp(arg, "client_vblank", 13)) + tdm_ttrace_module |= TDM_TTRACE_CLIENT_VBLANK; + else if (!strncmp(arg, "server_vblank", 13)) + tdm_ttrace_module |= TDM_TTRACE_SERVER_VBLANK; + else if (!strncmp(arg, "vblank", 6)) + tdm_ttrace_module |= TDM_TTRACE_VBLANK; + else if (!strncmp(arg, "layer", 5)) + tdm_ttrace_module |= TDM_TTRACE_LAYER; + else if (!strncmp(arg, "pp", 2)) + tdm_ttrace_module |= TDM_TTRACE_PP; + else if (!strncmp(arg, "capture", 7)) + tdm_ttrace_module |= TDM_TTRACE_CAPTURE; + else { + tdm_ttrace_module = 0; + tdm_display_enable_ttrace_vblank(private_display, NULL, 0); + tdm_server_enable_ttrace_client_vblank(private_display, NULL, 0); + TDM_SNPRINTF(reply, len, "unknown option: '%s'\n", arg); + return TDM_ERROR_NONE; + } + + arg = strtok_r(NULL, TDM_CONFIG_DELIM, &end); + } + + TDM_SNPRINTF(reply, len, "ttrace debugging... '%s' %x\n", ttrace, tdm_ttrace_module); + + if (tdm_ttrace_module & TDM_TTRACE_VSYNC) + tdm_display_enable_ttrace_vblank(private_display, output, 1); + else + tdm_display_enable_ttrace_vblank(private_display, NULL, 0); + + if (tdm_ttrace_module & TDM_TTRACE_CLIENT_VBLANK) + tdm_server_enable_ttrace_client_vblank(private_display, output, 1); + else + tdm_server_enable_ttrace_client_vblank(private_display, NULL, 0); + + return TDM_ERROR_NONE; +} + +INTERN tdm_error +tdm_display_enable_fps(tdm_private_display *private_display, int enable) +{ + private_display->print_fps = enable; + + TDM_INFO("print fps: %s", (enable) ? "enable" : "disable"); + + return TDM_ERROR_NONE; +} + EXTERN tdm_error tdm_display_get_capabilities(tdm_display *dpy, tdm_display_capability *capabilities) @@ -485,6 +771,22 @@ tdm_display_get_backend_info(tdm_display *dpy, const char **name, return ret; } +EXTERN tdm_pp * +tdm_display_create_pp(tdm_display *dpy, tdm_error *error) +{ + tdm_pp *pp; + + DISPLAY_FUNC_ENTRY_ERROR(); + + _pthread_mutex_lock(&private_display->lock); + + pp = (tdm_pp *)tdm_pp_create_internal(private_display->pp_module, error); + + _pthread_mutex_unlock(&private_display->lock); + + return pp; +} + EXTERN tdm_error tdm_module_get_info(tdm_module *module, const char **name, const char **vendor, int *major, int *minor) @@ -511,18 +813,17 @@ tdm_module_get_info(tdm_module *module, const char **name, return ret; } -EXTERN tdm_pp * -tdm_display_create_pp(tdm_display *dpy, tdm_error *error) +INTERN int +tdm_module_check_abi(tdm_private_module *private_module, int abimaj, int abimin) { - tdm_pp *pp; - - DISPLAY_FUNC_ENTRY_ERROR(); + tdm_backend_module *module = private_module->module_data; - _pthread_mutex_lock(&private_display->lock); + if (TDM_BACKEND_GET_ABI_MAJOR(module->abi_version) < abimaj) + return 0; - pp = (tdm_pp *)tdm_pp_create_internal(private_display->pp_module, error); + if (TDM_BACKEND_GET_ABI_MINOR(module->abi_version) < abimin) + return 0; - _pthread_mutex_unlock(&private_display->lock); - - return pp; + return 1; } + -- 2.7.4 From d5c10eca115610d5b5b85152bccbc22c96e47267 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Mon, 26 Mar 2018 20:22:46 +0900 Subject: [PATCH 12/16] common: remove unuseful functions Change-Id: I47dd2ac0cde4a5acb2d0d6a2ac4bf39c9af00aa2 --- src/tdm.c | 28 ---------------------------- src/tdm_display.c | 2 -- src/tdm_output.c | 10 +++++----- src/tdm_private.h | 4 ---- src/tdm_vblank.c | 4 ++-- 5 files changed, 7 insertions(+), 41 deletions(-) diff --git a/src/tdm.c b/src/tdm.c index b2e2c35..bdb2a87 100644 --- a/src/tdm.c +++ b/src/tdm.c @@ -658,7 +658,6 @@ EXTERN tdm_error tdm_display_update(tdm_display *dpy) { TDM_RETURN_VAL_IF_FAIL(dpy != NULL, TDM_ERROR_INVALID_PARAMETER); - TDM_RETURN_VAL_IF_FAIL(tdm_display_is_valid(dpy), TDM_ERROR_INVALID_PARAMETER); TDM_DEPRECATED(NULL); @@ -1130,8 +1129,6 @@ tdm_display_deinit(tdm_display *dpy) if (!private_display) return; - TDM_RETURN_IF_FAIL(tdm_display_is_valid(dpy)); - pthread_mutex_lock(&gLock); private_display->init_count--; @@ -1188,28 +1185,3 @@ tdm_display_get(void) return g_private_display; } -INTERN int -tdm_display_is_valid(tdm_display *dpy) -{ - if (dpy != NULL && dpy == g_private_display) - return 1; - return 0; -} - -INTERN int -tdm_output_is_valid(tdm_output *output) -{ - tdm_private_module *b = NULL; - tdm_private_output *o = NULL; - - if (!output || !g_private_display) - return 0; - - LIST_FOR_EACH_ENTRY(b, &g_private_display->module_list, link) { - LIST_FOR_EACH_ENTRY(o, &b->output_list, link) - if (o == output) - return 1; - } - - return 0; -} diff --git a/src/tdm_display.c b/src/tdm_display.c index d9741a4..d2fcde4 100644 --- a/src/tdm_display.c +++ b/src/tdm_display.c @@ -45,14 +45,12 @@ tdm_private_display *private_display; \ tdm_error ret = TDM_ERROR_NONE; /* default TDM_ERROR_NONE */\ TDM_RETURN_VAL_IF_FAIL(dpy != NULL, TDM_ERROR_INVALID_PARAMETER); \ - TDM_RETURN_VAL_IF_FAIL(tdm_display_is_valid(dpy), TDM_ERROR_INVALID_PARAMETER); \ private_display = (tdm_private_display*)dpy; #define DISPLAY_FUNC_ENTRY_ERROR() \ tdm_private_display *private_display; \ tdm_error ret = TDM_ERROR_NONE; /* default TDM_ERROR_NONE */\ TDM_RETURN_VAL_IF_FAIL_WITH_ERROR(dpy != NULL, TDM_ERROR_INVALID_PARAMETER, NULL); \ - TDM_RETURN_VAL_IF_FAIL_WITH_ERROR(tdm_display_is_valid(dpy), TDM_ERROR_INVALID_PARAMETER, NULL); \ private_display = (tdm_private_display*)dpy; #define BACKEND_FUNC_ENTRY() \ diff --git a/src/tdm_output.c b/src/tdm_output.c index a8b5065..b66c27b 100644 --- a/src/tdm_output.c +++ b/src/tdm_output.c @@ -45,7 +45,7 @@ tdm_private_display *private_display; \ tdm_private_output *private_output; \ tdm_error ret = TDM_ERROR_NONE; /* default TDM_ERROR_NONE */\ - TDM_RETURN_VAL_IF_FAIL(tdm_output_is_valid(output), TDM_ERROR_INVALID_PARAMETER); \ + TDM_RETURN_VAL_IF_FAIL(output != NULL, TDM_ERROR_INVALID_PARAMETER); \ private_output = (tdm_private_output*)output; \ private_display = private_output->private_display @@ -53,7 +53,7 @@ tdm_private_display *private_display; \ tdm_private_output *private_output; \ tdm_error ret = TDM_ERROR_NONE; /* default TDM_ERROR_NONE */\ - TDM_RETURN_VAL_IF_FAIL_WITH_ERROR(tdm_output_is_valid(output), TDM_ERROR_INVALID_PARAMETER, NULL); \ + TDM_RETURN_VAL_IF_FAIL_WITH_ERROR(output != NULL, TDM_ERROR_INVALID_PARAMETER, NULL); \ private_output = (tdm_private_output*)output; \ private_display = private_output->private_display @@ -404,7 +404,7 @@ tdm_output_remove_change_handler(tdm_output *output, tdm_private_output *private_output; tdm_private_output_change_handler *change_handler = NULL, *hh = NULL; - TDM_RETURN_IF_FAIL(tdm_output_is_valid(output)); + TDM_RETURN_IF_FAIL(output != NULL); TDM_RETURN_IF_FAIL(func != NULL); private_output = (tdm_private_output*)output; @@ -1112,7 +1112,7 @@ tdm_output_commit_internal(tdm_output *output, int sync, tdm_output_commit_handl tdm_output_dpms dpms_value = TDM_OUTPUT_DPMS_ON; tdm_error ret = TDM_ERROR_NONE; - TDM_RETURN_VAL_IF_FAIL(tdm_output_is_valid(output), TDM_ERROR_INVALID_PARAMETER); + TDM_RETURN_VAL_IF_FAIL(output != NULL, TDM_ERROR_INVALID_PARAMETER); private_output = (tdm_private_output*)output; private_module = private_output->private_module; @@ -1467,7 +1467,7 @@ tdm_output_get_dpms_internal(tdm_output *output, tdm_output_dpms *dpms_value) tdm_func_output *func_output; tdm_error ret = TDM_ERROR_NONE; - TDM_RETURN_VAL_IF_FAIL(tdm_output_is_valid(output), TDM_ERROR_INVALID_PARAMETER); + TDM_RETURN_VAL_IF_FAIL(output != NULL, TDM_ERROR_INVALID_PARAMETER); private_output = (tdm_private_output*)output; diff --git a/src/tdm_private.h b/src/tdm_private.h index 2d60eb7..9b1951d 100644 --- a/src/tdm_private.h +++ b/src/tdm_private.h @@ -82,8 +82,6 @@ extern int tdm_debug_dump; extern int tdm_ttrace_module; extern int tdm_ttrace_output; -int -tdm_display_is_valid(tdm_display *display); tdm_private_display * tdm_display_get(void); @@ -97,8 +95,6 @@ tdm_display_find_private_output(tdm_private_display *private_display, tdm_output tdm_error tdm_output_init(tdm_private_display *private_display); -int -tdm_output_is_valid(tdm_output *output); void tdm_output_thread_cb_change(tdm_private_display *private_display, void *object, tdm_thread_cb_base *cb_base, void *user_data); diff --git a/src/tdm_vblank.c b/src/tdm_vblank.c index 4bfa556..b461a5b 100644 --- a/src/tdm_vblank.c +++ b/src/tdm_vblank.c @@ -732,8 +732,8 @@ tdm_vblank_create(tdm_display *dpy, tdm_output *output, tdm_error *error) tdm_private_vblank *private_vblank; tdm_error ret; - TDM_RETURN_VAL_IF_FAIL_WITH_ERROR(tdm_display_is_valid(dpy), TDM_ERROR_INVALID_PARAMETER, NULL); - TDM_RETURN_VAL_IF_FAIL_WITH_ERROR(tdm_output_is_valid(output), TDM_ERROR_INVALID_PARAMETER, NULL); + TDM_RETURN_VAL_IF_FAIL_WITH_ERROR(dpy != NULL, TDM_ERROR_INVALID_PARAMETER, NULL); + TDM_RETURN_VAL_IF_FAIL_WITH_ERROR(output != NULL, TDM_ERROR_INVALID_PARAMETER, NULL); if (error) *error = TDM_ERROR_NONE; -- 2.7.4 From a22b592b92bceb3c87adc3f005e2f1a640e0b5da Mon Sep 17 00:00:00 2001 From: Boram Park Date: Mon, 26 Mar 2018 20:24:54 +0900 Subject: [PATCH 13/16] utests: remove unuseful tcs Change-Id: I5acfce9cc3ee9ef2f7d8b883c8e47d73f8ea5c22 --- utests/src/ut_tdm_display.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/utests/src/ut_tdm_display.cpp b/utests/src/ut_tdm_display.cpp index f6aaf2d..1548a5e 100644 --- a/utests/src/ut_tdm_display.cpp +++ b/utests/src/ut_tdm_display.cpp @@ -119,15 +119,6 @@ TEST_P(TDMDisplay, DisplayUpdate) ASSERT_EQ(tdm_display_update(dpy), TDM_ERROR_NONE); } -TEST_P(TDMDisplay, DisplayUpdateWrongDpy) -{ - EXPECT_EXIT({ - tdm_display *wrong_dpy = (tdm_display *)TDM_UT_INVALID_VALUE; - tdm_display_update(wrong_dpy); - exit(0); - }, ::testing::ExitedWithCode(0), ""); -} - TEST_P(TDMDisplay, DisplayUpdateNullObject) { ASSERT_EQ(tdm_display_update(NULL), TDM_ERROR_INVALID_PARAMETER); @@ -152,15 +143,6 @@ TEST_P(TDMDisplay, DisplayGetFDNullFD) ASSERT_EQ(tdm_display_get_fd(dpy, NULL), TDM_ERROR_INVALID_PARAMETER); } -TEST_P(TDMDisplay, DisplayGetFDWrongDpy) -{ - tdm_display *wrong_dpy = (tdm_display *)TDM_UT_INVALID_VALUE; - int fd = TDM_UT_INVALID_VALUE; - - ASSERT_EQ(tdm_display_get_fd(wrong_dpy, &fd), TDM_ERROR_INVALID_PARAMETER); - ASSERT_EQ(fd, TDM_UT_INVALID_VALUE); -} - /* DISABLED */ TEST_P(TDMDisplay, DISABLED_DisplayHandleEvents) { -- 2.7.4 From 5adeb9a774b05d820fceba93ef554cad9d7334c1 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Mon, 26 Mar 2018 21:00:53 +0900 Subject: [PATCH 14/16] utests: fix wrong input param Change-Id: I99d930aba8cdbc080a935e0734601dee77a5f3bd --- utests/src/ut_tdm_backend_pp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utests/src/ut_tdm_backend_pp.cpp b/utests/src/ut_tdm_backend_pp.cpp index 78b268f..4e40e82 100644 --- a/utests/src/ut_tdm_backend_pp.cpp +++ b/utests/src/ut_tdm_backend_pp.cpp @@ -391,7 +391,7 @@ TEST_P(TDMBackendPP, PPDispalyGetAvaiableSizeNullOther) { if (ut_tdm_display_has_pp_capability(dpy)) { ASSERT_EQ(PreparePP(), true); - ASSERT_EQ(tdm_display_get_pp_available_size(pp, NULL, NULL, NULL, NULL, NULL), TDM_ERROR_INVALID_PARAMETER); + ASSERT_EQ(tdm_display_get_pp_available_size(dpy, NULL, NULL, NULL, NULL, NULL), TDM_ERROR_NONE); } } -- 2.7.4 From 8ca7eda0b879649453e1b7d85fa6f67c53c78cab Mon Sep 17 00:00:00 2001 From: Boram Park Date: Mon, 26 Mar 2018 21:08:18 +0900 Subject: [PATCH 15/16] utests: change pp scale test src buffer size to test YUV buffers correctly Change-Id: I4ae8ac621df9da577caa10a32c787d0f3da4759e --- utests/src/ut_tdm_backend_pp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utests/src/ut_tdm_backend_pp.cpp b/utests/src/ut_tdm_backend_pp.cpp index 4e40e82..f1d4991 100644 --- a/utests/src/ut_tdm_backend_pp.cpp +++ b/utests/src/ut_tdm_backend_pp.cpp @@ -626,7 +626,7 @@ TEST_P(TDMBackendPP, PPConvertScale) ASSERT_EQ(PreparePP(), true); - ASSERT_EQ(PrepareBuffers(mode->hdisplay / 2, mode->vdisplay / 4, dst_formats[f], + ASSERT_EQ(PrepareBuffers(640, 480, dst_formats[f], mode->hdisplay, mode->vdisplay / 2, dst_formats[f], TDM_TRANSFORM_NORMAL), true); -- 2.7.4 From 5f5db38c60ac7e80131ba48a5804f3be5325a740 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Mon, 26 Mar 2018 20:37:58 +0900 Subject: [PATCH 16/16] display: rename to _tdm_display_setup Change-Id: I2cb9b73d98e6b337a2c1b1b7279db6cfd3e36b3a --- src/tdm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tdm.c b/src/tdm.c index bdb2a87..9f41287 100644 --- a/src/tdm.c +++ b/src/tdm.c @@ -611,7 +611,7 @@ failed_get_outputs: } static tdm_error -_tdm_display_update(tdm_private_display *private_display) +_tdm_display_setup(tdm_private_display *private_display) { tdm_private_module *private_module = NULL; tdm_error ret = TDM_ERROR_NONE; @@ -1049,7 +1049,7 @@ tdm_display_init(tdm_error *error) #endif TDM_TRACE_BEGIN("TDM_Update_Display"); - ret = _tdm_display_update(private_display); + ret = _tdm_display_setup(private_display); TDM_TRACE_END(); if (ret != TDM_ERROR_NONE) goto failed_update; -- 2.7.4