plugin: mobile: display: Remove proc_change_state() 66/312366/5
authorYunhee Seo <yuni.seo@samsung.com>
Fri, 7 Jun 2024 11:12:50 +0000 (20:12 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Fri, 14 Jun 2024 07:16:46 +0000 (16:16 +0900)
As removed unnecssary proximity dependency,
proc_change_state() can be removed from mobile plugin.

Change-Id: I7a492dfe9ee526df89cb9801f50b0b5bba1bcf82
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
plugins/mobile/display/core.c

index 946c7ff7c5530c6027e709f55c24cc9291aa2b92..a2bd0ef1d8cc9b99a9cd496efc29fc0d1967b3f1 100644 (file)
@@ -130,58 +130,6 @@ inline struct syscommon_deviced_display_state_info* state_st(enum syscommon_devi
        return &states[state];
 }
 
-static int default_proc_change_state(unsigned int cond, pid_t pid)
-{
-       enum syscommon_deviced_display_state next;
-
-       next = GET_COND_STATE(cond);
-       _I("Change process(%d) state to %s.", pid, states[next].name);
-
-       switch (next) {
-       case SYSCOMMON_DEVICED_DISPLAY_STATE_ON:
-               if (display_panel_get_dpms_cached_state() != SYSCOMMON_DEVICED_DPMS_ON)
-                       display_panel_lcd_on_direct(DEVICED_EVENT_UNKNOWN);
-               display_state_transition_update_lock_screen_timeout(LOCK_SCREEN_CONTROL_TIMEOUT);
-               display_state_transition_do_proc_change_state_action(next, -1);
-               break;
-       case SYSCOMMON_DEVICED_DISPLAY_STATE_DIM:
-               display_state_transition_do_proc_change_state_action(next, -1);
-               break;
-       case SYSCOMMON_DEVICED_DISPLAY_STATE_OFF:
-               if (display_panel_get_dpms_cached_state() == SYSCOMMON_DEVICED_DPMS_ON) {
-                       /**
-                        * FIXME: need to convey reason to this point
-                               *        from the top of this subroutine.
-                               */
-                       display_panel_lcd_off_procedure(DEVICED_EVENT_UNKNOWN);
-               }
-               if (set_custom_lcdon_timeout(0))
-                       display_state_transition_update_display_state_timeout_by_priority();
-               display_state_transition_do_proc_change_state_action(next, -1);
-               break;
-       case SYSCOMMON_DEVICED_DISPLAY_STATE_SLEEP:
-               _I("Dangerous requests.");
-               /* at first LCD_OFF and then goto sleep */
-               /* state transition */
-               display_state_transition_do_proc_change_state_action(SYSCOMMON_DEVICED_DISPLAY_STATE_OFF, TIMEOUT_NONE);
-               display_lock_release_lock_all(SYSCOMMON_DEVICED_DISPLAY_STATE_ON);
-               display_lock_release_lock_all(SYSCOMMON_DEVICED_DISPLAY_STATE_DIM);
-               display_lock_release_lock_all(SYSCOMMON_DEVICED_DISPLAY_STATE_OFF);
-               if (display_panel_is_lcd_on_state_broadcasted()) {
-                       _I("broadcast lcd off signal at non-lcd device");
-                       broadcast_lcd_off(SIGNAL_PRE, 0);
-                       broadcast_lcd_off(SIGNAL_POST, 0);
-               }
-               display_state_transition_do_proc_change_state_action(SYSCOMMON_DEVICED_DISPLAY_STATE_SLEEP, TIMEOUT_NONE);
-               break;
-
-       default:
-               return -EINVAL;
-       }
-
-       return 0;
-}
-
 static void init_display_states(void *data)
 {
        struct display_plugin *dp = (struct display_plugin *) data;
@@ -201,7 +149,7 @@ static int display_probe(void *data)
        init_display_states(dp);
        setup_display_plugin_backlight_ops(dp);
        dp->default_saving_mode = NULL;
-       dp->proc_change_state = default_proc_change_state;
+       dp->proc_change_state = NULL;
 
        return 0;
 }