Skip to content

Commit

Permalink
[display] Handle compositor exit during setUpdatesEnabled call. JB#47846
Browse files Browse the repository at this point in the history
Once mce has issued a setUpdatesEnabled method call, it expects to get a
reply even if compositor service drops from SystemBus. While the situation
does self correct when a fresh compositor instance shows up, hiccups like
unwarranted ipc panic led pattern triggering can occur before that.

Explicitly wake up display state machine also when compositor service
drops from system bus.

Do not treat compositor service stopped state as "ipc pending".

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Oct 23, 2019
1 parent 6a9d6e1 commit f2f8b1a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion modules/display.c
Expand Up @@ -6973,7 +6973,11 @@ compositor_stm_enter_state(compositor_stm_t *self)
case COMPOSITOR_STATE_STOPPED:
compositor_stm_forget_pid_query(self);
compositor_stm_cancel_killer(self);
compositor_stm_cancel_panic(self);
// leave via compositor_stm_set_service_owner()

/* Wake display state machine */
mdy_stm_schedule_rethink();
break;

case COMPOSITOR_STATE_STARTED:
Expand Down Expand Up @@ -7156,7 +7160,18 @@ compositor_stm_set_granted(compositor_stm_t *self, renderer_state_t state)
static bool
compositor_stm_is_pending(const compositor_stm_t *self)
{
return compositor_stm_get_state(self) != COMPOSITOR_STATE_GRANTED;
bool pending = true;

switch( compositor_stm_get_state(self) ) {
case COMPOSITOR_STATE_GRANTED:
case COMPOSITOR_STATE_STOPPED:
pending = false;
break;
default:
break;
}

return pending;
}

/** Predicate for: compositor side is in setUpdatesEnabled(true) state
Expand Down

0 comments on commit f2f8b1a

Please sign in to comment.