display: change sleep reason to DISPLAY_OFF_TIMEOUT 14/288214/2 accepted/tizen/unified/20230215.100730
authorYoungjae Cho <y0.cho@samsung.com>
Tue, 14 Feb 2023 01:11:34 +0000 (10:11 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Tue, 14 Feb 2023 05:14:58 +0000 (14:14 +0900)
Technically, the sleep request of display plugin is triggered by timer,
not by display off itself.
  1. Display off, display state is changed to S_LCDOFF.
  2. Start timer, 300ms.
  3. On expiring the timer, display state is changed to S_SLEEP.
  4. The display plugin requests power module to change its state to
     DEVICED_POWER_STATE_SLEEP.
Therefore, it is proper to use enum DISPLAY_OFF_TIMEOUT instead of
just DISPLAY_OFF.

Change-Id: I93e6d092ebcc23e09db61f65d8f0b7e4dc5aac7e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
plugins/iot-headed/display/core.c
plugins/mobile/display/core.c
plugins/tv/display/core.c
plugins/wearable/display/core.c

index 2b7aa60..8e2fd12 100644 (file)
@@ -1534,7 +1534,7 @@ go_suspend:
 #ifdef ENABLE_PM_LOG
        pm_history_save(PM_LOG_SLEEP, get_pm_cur_state());
 #endif
-       power_request_change_state(DEVICED_POWER_STATE_SLEEP, HAL_DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF);
+       power_request_change_state(DEVICED_POWER_STATE_SLEEP, HAL_DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF_TIMEOUT);
        return 0;
 
 go_lcd_off:
index 11fe205..9078ff4 100644 (file)
@@ -1544,7 +1544,7 @@ go_suspend:
 #ifdef ENABLE_PM_LOG
        pm_history_save(PM_LOG_SLEEP, get_pm_cur_state());
 #endif
-       power_request_change_state(DEVICED_POWER_STATE_SLEEP, HAL_DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF);
+       power_request_change_state(DEVICED_POWER_STATE_SLEEP, HAL_DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF_TIMEOUT);
        return 0;
 
 go_lcd_off:
index 444f02c..90f4e67 100644 (file)
@@ -1534,7 +1534,7 @@ go_suspend:
 #ifdef ENABLE_PM_LOG
        pm_history_save(PM_LOG_SLEEP, get_pm_cur_state());
 #endif
-       power_request_change_state(DEVICED_POWER_STATE_SLEEP, HAL_DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF);
+       power_request_change_state(DEVICED_POWER_STATE_SLEEP, HAL_DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF_TIMEOUT);
        return 0;
 
 go_lcd_off:
index 958b19a..3947491 100644 (file)
@@ -1805,7 +1805,7 @@ go_suspend:
 #ifdef ENABLE_PM_LOG
        pm_history_save(PM_LOG_SLEEP, get_pm_cur_state());
 #endif
-       power_request_change_state(DEVICED_POWER_STATE_SLEEP, HAL_DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF);
+       power_request_change_state(DEVICED_POWER_STATE_SLEEP, HAL_DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF_TIMEOUT);
        return 0;
 
 go_lcd_off: