summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoungjae Cho <y0.cho@samsung.com>2020-12-14 17:06:06 +0900
committerHyotaek Shim <hyotaek.shim@samsung.com>2020-12-15 05:57:08 +0000
commit68bd1b341f76e1fc1cf51e4fbea5970d0a4d9519 (patch)
treeb2f6c4ea3a3935b226710cae3bb4305a95c61706
parent00c0c2fe6dee1e09ecb4ae785b459311d6cd245c (diff)
downloaddeviced-tizen_5.5.tar.gz
deviced-tizen_5.5.tar.bz2
deviced-tizen_5.5.zip
Change-Id: Ia3545287bbf3d408b07e48e2f8a6588f9ab3fa21 Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
-rw-r--r--plugins/iot/display/core.c6
-rw-r--r--plugins/mobile/display/core.c6
-rw-r--r--plugins/tv/display/core.c6
-rw-r--r--plugins/wearable/display/core.c6
4 files changed, 20 insertions, 4 deletions
diff --git a/plugins/iot/display/core.c b/plugins/iot/display/core.c
index ea59e445..36ad29a2 100644
--- a/plugins/iot/display/core.c
+++ b/plugins/iot/display/core.c
@@ -819,7 +819,11 @@ static void del_state_cond(void *data, enum state_t state)
del_node(state, tmp);
set_unlock_time(pid, state);
- if (!timeout_src_id)
+ /* Change state only when the two conditions below are satisfied.
+ * 1. There should be no running state-transition timer
+ * 2. Released lock is one of the pm_cur_state's lock
+ * This emulates already expired transition timer */
+ if (!timeout_src_id && pm_cur_state == state)
states[pm_cur_state].trans(EVENT_TIMEOUT);
if (state == S_LCDOFF)
diff --git a/plugins/mobile/display/core.c b/plugins/mobile/display/core.c
index b6f59733..b3defc96 100644
--- a/plugins/mobile/display/core.c
+++ b/plugins/mobile/display/core.c
@@ -828,7 +828,11 @@ static void del_state_cond(void *data, enum state_t state)
del_node(state, tmp);
set_unlock_time(pid, state);
- if (!timeout_src_id)
+ /* Change state only when the two conditions below are satisfied.
+ * 1. There should be no running state-transition timer
+ * 2. Released lock is one of the pm_cur_state's lock
+ * This emulates already expired transition timer */
+ if (!timeout_src_id && pm_cur_state == state)
states[pm_cur_state].trans(EVENT_TIMEOUT);
if (state == S_LCDOFF)
diff --git a/plugins/tv/display/core.c b/plugins/tv/display/core.c
index 4cc0c462..7728cff2 100644
--- a/plugins/tv/display/core.c
+++ b/plugins/tv/display/core.c
@@ -819,7 +819,11 @@ static void del_state_cond(void *data, enum state_t state)
del_node(state, tmp);
set_unlock_time(pid, state);
- if (!timeout_src_id)
+ /* Change state only when the two conditions below are satisfied.
+ * 1. There should be no running state-transition timer
+ * 2. Released lock is one of the pm_cur_state's lock
+ * This emulates already expired transition timer */
+ if (!timeout_src_id && pm_cur_state == state)
states[pm_cur_state].trans(EVENT_TIMEOUT);
if (state == S_LCDOFF)
diff --git a/plugins/wearable/display/core.c b/plugins/wearable/display/core.c
index 1c06532c..f66d41ed 100644
--- a/plugins/wearable/display/core.c
+++ b/plugins/wearable/display/core.c
@@ -900,7 +900,11 @@ static void del_state_cond(void *data, enum state_t state)
del_node(state, tmp);
set_unlock_time(pid, state);
- if (!timeout_src_id)
+ /* Change state only when the two conditions below are satisfied.
+ * 1. There should be no running state-transition timer
+ * 2. Released lock is one of the pm_cur_state's lock
+ * This emulates already expired transition timer */
+ if (!timeout_src_id && pm_cur_state == state)
states[pm_cur_state].trans(EVENT_TIMEOUT);
if (state == S_LCDOFF)