display: Change DPMS init and exit fucntion name 20/288320/3
authorTaeminYeom <taemin.yeom@samsung.com>
Wed, 15 Feb 2023 03:00:27 +0000 (12:00 +0900)
committerTaeminYeom <taemin.yeom@samsung.com>
Fri, 17 Feb 2023 05:31:30 +0000 (14:31 +0900)
For consistent naming rule with other DPMS function,
change the names.

init_dpms -> dpms_init
exit_dpms -> dpms_exit
add_timer_for_init_dpms -> add_timer_for_dpms_init
delayed_init_done_dpms -> delayed_dpms_init_done

Change-Id: I1de2c9741526238d33c03e815f2ff73fa2a13f9f
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
plugins/iot-headed/display/core.c
plugins/iot-headed/display/device-interface.c
plugins/mobile/display/core.c
plugins/mobile/display/device-interface.c
plugins/tv/display/core.c
plugins/tv/display/device-interface.c
plugins/wearable/display/core.c
plugins/wearable/display/device-interface.c
src/display/display-dpms.c
src/display/display-dpms.h

index 47e7e01..6952ccc 100644 (file)
@@ -1940,11 +1940,11 @@ static int battery_health_changed(void *data)
        return 0;
 }
 
        return 0;
 }
 
-static gboolean delayed_init_done_dpms(gpointer data)
+static gboolean delayed_dpms_init_done(gpointer data)
 {
        int timeout;
 
 {
        int timeout;
 
-       if (!init_dpms())
+       if (!dpms_init())
                return G_SOURCE_CONTINUE;
 
        switch (get_pm_cur_state()) {
                return G_SOURCE_CONTINUE;
 
        switch (get_pm_cur_state()) {
@@ -1971,11 +1971,11 @@ static gboolean delayed_init_done_dpms(gpointer data)
        return G_SOURCE_REMOVE;
 }
 
        return G_SOURCE_REMOVE;
 }
 
-static void add_timer_for_init_dpms(void)
+static void add_timer_for_dpms_init(void)
 {
 {
-       guint id = g_timeout_add(500/* milliseconds */, delayed_init_done_dpms, NULL);
+       guint id = g_timeout_add(500/* milliseconds */, delayed_dpms_init_done, NULL);
        if (id == 0)
        if (id == 0)
-               _E("Failed to add init_dpms timeout.");
+               _E("Failed to add dpms_init timeout.");
 }
 
 /**
 }
 
 /**
@@ -2167,13 +2167,13 @@ static void display_init(void *data)
                 * since display manager can be launched later than deviced.
                 * In the case, display cannot be turned on at the first booting */
                // wm_ready = check_wm_ready();
                 * since display manager can be launched later than deviced.
                 * In the case, display cannot be turned on at the first booting */
                // wm_ready = check_wm_ready();
-               if (init_dpms()) {
+               if (dpms_init()) {
                        if (is_lcdon_blocked() != LCDON_BLOCK_NONE)
                                lcd_off_procedure(LCD_OFF_BY_EVENT);
                        else
                                lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT);
                } else {
                        if (is_lcdon_blocked() != LCDON_BLOCK_NONE)
                                lcd_off_procedure(LCD_OFF_BY_EVENT);
                        else
                                lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT);
                } else {
-                       add_timer_for_init_dpms();
+                       add_timer_for_dpms_init();
                }
 
                if (display_conf.lcd_always_on) {
                }
 
                if (display_conf.lcd_always_on) {
index 188f583..1d716b7 100644 (file)
@@ -823,7 +823,7 @@ int exit_sysfs(void)
 
        backlight_update();
 
 
        backlight_update();
 
-       exit_dpms();
+       dpms_exit();
 
        ops = find_device("touchscreen");
        if (!check_default(ops))
 
        ops = find_device("touchscreen");
        if (!check_default(ops))
index 4927f70..61e5d41 100644 (file)
@@ -1950,11 +1950,11 @@ static int battery_health_changed(void *data)
        return 0;
 }
 
        return 0;
 }
 
-static gboolean delayed_init_done_dpms(gpointer data)
+static gboolean delayed_dpms_init_done(gpointer data)
 {
        int timeout;
 
 {
        int timeout;
 
-       if (!init_dpms())
+       if (!dpms_init())
                return G_SOURCE_CONTINUE;
 
        switch (get_pm_cur_state()) {
                return G_SOURCE_CONTINUE;
 
        switch (get_pm_cur_state()) {
@@ -1981,11 +1981,11 @@ static gboolean delayed_init_done_dpms(gpointer data)
        return G_SOURCE_REMOVE;
 }
 
        return G_SOURCE_REMOVE;
 }
 
-static void add_timer_for_init_dpms(void)
+static void add_timer_for_dpms_init(void)
 {
 {
-       guint id = g_timeout_add(500/* milliseconds */, delayed_init_done_dpms, NULL);
+       guint id = g_timeout_add(500/* milliseconds */, delayed_dpms_init_done, NULL);
        if (id == 0)
        if (id == 0)
-               _E("Failed to add init_dpms timeout.");
+               _E("Failed to add dpms_init timeout.");
 }
 
 /**
 }
 
 /**
@@ -2173,13 +2173,13 @@ static void display_init(void *data)
                 * since display manager can be launched later than deviced.
                 * In the case, display cannot be turned on at the first booting */
                // wm_ready = check_wm_ready();
                 * since display manager can be launched later than deviced.
                 * In the case, display cannot be turned on at the first booting */
                // wm_ready = check_wm_ready();
-               if (init_dpms()) {
+               if (dpms_init()) {
                        if (is_lcdon_blocked() != LCDON_BLOCK_NONE)
                                lcd_off_procedure(LCD_OFF_BY_EVENT);
                        else
                                lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT);
                } else {
                        if (is_lcdon_blocked() != LCDON_BLOCK_NONE)
                                lcd_off_procedure(LCD_OFF_BY_EVENT);
                        else
                                lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT);
                } else {
-                       add_timer_for_init_dpms();
+                       add_timer_for_dpms_init();
                }
 
                if (display_conf.lcd_always_on) {
                }
 
                if (display_conf.lcd_always_on) {
index d7d79db..f35f24d 100644 (file)
@@ -838,7 +838,7 @@ int exit_sysfs(void)
 
        backlight_update();
 
 
        backlight_update();
 
-       exit_dpms();
+       dpms_exit();
 
        ops = find_device("touchscreen");
        if (!check_default(ops))
 
        ops = find_device("touchscreen");
        if (!check_default(ops))
index a596b62..e6d22a3 100644 (file)
@@ -1940,11 +1940,11 @@ static int battery_health_changed(void *data)
        return 0;
 }
 
        return 0;
 }
 
-static gboolean delayed_init_done_dpms(gpointer data)
+static gboolean delayed_dpms_init_done(gpointer data)
 {
        int timeout;
 
 {
        int timeout;
 
-       if (!init_dpms())
+       if (!dpms_init())
                return G_SOURCE_CONTINUE;
 
        switch (get_pm_cur_state()) {
                return G_SOURCE_CONTINUE;
 
        switch (get_pm_cur_state()) {
@@ -1971,11 +1971,11 @@ static gboolean delayed_init_done_dpms(gpointer data)
        return G_SOURCE_REMOVE;
 }
 
        return G_SOURCE_REMOVE;
 }
 
-static void add_timer_for_init_dpms(void)
+static void add_timer_for_dpms_init(void)
 {
 {
-       guint id = g_timeout_add(500/* milliseconds */, delayed_init_done_dpms, NULL);
+       guint id = g_timeout_add(500/* milliseconds */, delayed_dpms_init_done, NULL);
        if (id == 0)
        if (id == 0)
-               _E("Failed to add init_dpms timeout.");
+               _E("Failed to add dpms_init timeout.");
 }
 
 /**
 }
 
 /**
@@ -2164,13 +2164,13 @@ static void display_init(void *data)
                 * since display manager can be launched later than deviced.
                 * In the case, display cannot be turned on at the first booting */
                // wm_ready = check_wm_ready();
                 * since display manager can be launched later than deviced.
                 * In the case, display cannot be turned on at the first booting */
                // wm_ready = check_wm_ready();
-               if (init_dpms()) {
+               if (dpms_init()) {
                        if (is_lcdon_blocked() != LCDON_BLOCK_NONE)
                                lcd_off_procedure(LCD_OFF_BY_EVENT);
                        else
                                lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT);
                } else {
                        if (is_lcdon_blocked() != LCDON_BLOCK_NONE)
                                lcd_off_procedure(LCD_OFF_BY_EVENT);
                        else
                                lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT);
                } else {
-                       add_timer_for_init_dpms();
+                       add_timer_for_dpms_init();
                }
 
                if (display_conf.lcd_always_on) {
                }
 
                if (display_conf.lcd_always_on) {
index 128b637..a136a0e 100644 (file)
@@ -823,7 +823,7 @@ int exit_sysfs(void)
 
        backlight_update();
 
 
        backlight_update();
 
-       exit_dpms();
+       dpms_exit();
 
        ops = find_device("touchscreen");
        if (!check_default(ops))
 
        ops = find_device("touchscreen");
        if (!check_default(ops))
index de4d504..406c2dc 100644 (file)
@@ -2228,11 +2228,11 @@ static int powerlock_load_config(struct parse_result *result, void *user_data)
        return 0;
 }
 
        return 0;
 }
 
-static gboolean delayed_init_done_dpms(gpointer data)
+static gboolean delayed_dpms_init_done(gpointer data)
 {
        int timeout;
 
 {
        int timeout;
 
-       if (!init_dpms())
+       if (!dpms_init())
                return G_SOURCE_CONTINUE;
 
        switch (get_pm_cur_state()) {
                return G_SOURCE_CONTINUE;
 
        switch (get_pm_cur_state()) {
@@ -2259,11 +2259,11 @@ static gboolean delayed_init_done_dpms(gpointer data)
        return G_SOURCE_REMOVE;
 }
 
        return G_SOURCE_REMOVE;
 }
 
-static void add_timer_for_init_dpms(void)
+static void add_timer_for_dpms_init(void)
 {
 {
-       guint id = g_timeout_add(500/* milliseconds */, delayed_init_done_dpms, NULL);
+       guint id = g_timeout_add(500/* milliseconds */, delayed_dpms_init_done, NULL);
        if (id == 0)
        if (id == 0)
-               _E("Failed to add init_dpms timeout.");
+               _E("Failed to add dpms_init timeout.");
 }
 
 /**
 }
 
 /**
@@ -2489,13 +2489,13 @@ static void display_init(void *data)
                 * since display manager can be launched later than deviced.
                 * In the case, display cannot be turned on at the first booting */
                // wm_ready = check_wm_ready();
                 * since display manager can be launched later than deviced.
                 * In the case, display cannot be turned on at the first booting */
                // wm_ready = check_wm_ready();
-               if (init_dpms()) {
+               if (dpms_init()) {
                        if (is_lcdon_blocked() != LCDON_BLOCK_NONE)
                                lcd_off_procedure(LCD_OFF_BY_EVENT);
                        else
                                lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT);
                } else {
                        if (is_lcdon_blocked() != LCDON_BLOCK_NONE)
                                lcd_off_procedure(LCD_OFF_BY_EVENT);
                        else
                                lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT);
                } else {
-                       add_timer_for_init_dpms();
+                       add_timer_for_dpms_init();
                }
 
                if (display_conf.lcd_always_on) {
                }
 
                if (display_conf.lcd_always_on) {
index 4683490..e859f29 100644 (file)
@@ -905,7 +905,7 @@ int exit_sysfs(void)
 
        backlight_update();
 
 
        backlight_update();
 
-       exit_dpms();
+       dpms_exit();
 
        ops = find_device("touchscreen");
        if (!check_default(ops))
 
        ops = find_device("touchscreen");
        if (!check_default(ops))
index 2b1b156..e995905 100644 (file)
@@ -126,7 +126,7 @@ static void handle_global(void *data, struct wl_registry *registry,
                info->wl_output= wl_registry_bind(registry, name, &wl_output_interface, 2);
                if (!info->wl_output) {
                        _E("Failed to bind registry.");
                info->wl_output= wl_registry_bind(registry, name, &wl_output_interface, 2);
                if (!info->wl_output) {
                        _E("Failed to bind registry.");
-                       exit_dpms();
+                       dpms_exit();
                        return;
                }
                _D("Get wl_output.");
                        return;
                }
                _D("Get wl_output.");
@@ -134,7 +134,7 @@ static void handle_global(void *data, struct wl_registry *registry,
                info->tz_dpms_mng = wl_registry_bind(registry, name, &tizen_dpms_manager_interface, 1);
                if (!info->tz_dpms_mng) {
                        _E("Failed to bind registry.");
                info->tz_dpms_mng = wl_registry_bind(registry, name, &tizen_dpms_manager_interface, 1);
                if (!info->tz_dpms_mng) {
                        _E("Failed to bind registry.");
-                       exit_dpms();
+                       dpms_exit();
                        return;
                }
 
                        return;
                }
 
@@ -562,7 +562,7 @@ int dpms_get_cached_state(void)
        return dpms_cache;
 }
 
        return dpms_cache;
 }
 
-bool init_dpms(void)
+bool dpms_init(void)
 {
        if (dpms_client)
                return true;
 {
        if (dpms_client)
                return true;
@@ -579,7 +579,7 @@ bool init_dpms(void)
 
                if (!dpms_client) {
                        _E("Failed to init dpms client.");
 
                if (!dpms_client) {
                        _E("Failed to init dpms client.");
-                       exit_dpms();
+                       dpms_exit();
                        return false;
                }
                _I("Successfully initialized dpms client.");
                        return false;
                }
                _I("Successfully initialized dpms client.");
@@ -590,7 +590,7 @@ bool init_dpms(void)
        return true;
 }
 
        return true;
 }
 
-void exit_dpms(void)
+void dpms_exit(void)
 {
        _I("Exit dpms.");
        if (dpms_loop) {
 {
        _I("Exit dpms.");
        if (dpms_loop) {
index b9ac040..f1bbe2f 100644 (file)
@@ -22,8 +22,8 @@
 void dpms_set_state(int on);
 int dpms_get_state(void);
 int dpms_get_cached_state(void);
 void dpms_set_state(int on);
 int dpms_get_state(void);
 int dpms_get_cached_state(void);
-bool init_dpms(void);
-void exit_dpms(void);
+bool dpms_init(void);
+void dpms_exit(void);
 void __register_dpms_checklist(int mode, void (*checker)(void), const char *caller);
 #define register_dpms_checklist(mode, checker) __register_dpms_checklist(mode, checker, __func__)
 #endif /* __DISPLAY_DPMS_H__ */
 void __register_dpms_checklist(int mode, void (*checker)(void), const char *caller);
 #define register_dpms_checklist(mode, checker) __register_dpms_checklist(mode, checker, __func__)
 #endif /* __DISPLAY_DPMS_H__ */