display: change sleep reason to DISPLAY_OFF_TIMEOUT 45/288245/1
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:29:01 +0000 (05:29 +0000)
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>
(cherry picked from commit 918acdfef05bde8242672031c7c10430a1e6c165)

plugins/iot-headed/display/core.c
plugins/mobile/display/core.c
plugins/tv/display/core.c
plugins/wearable/display/core.c

index 2b7aa603000bd760a7aa8417f50baae49d2d3638..8e2fd1288e8dd46b6ae25ffff02ce5b638b8a861 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 11fe205ed82925ba7f2421d7af8c5e8f8ad46589..9078ff4cec9c6d3dd4baa9add7713c6a9e32ef2f 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 444f02c0ff0367b0aa189aa85543b84b5b8bf962..90f4e6764e573309771ea170a7b0bf0215861b93 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 958b19a541807db5e91367ecb939e35faa28d862..39474917fb8f50b55ce20d6e2e9dffb820452f0f 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: