ccb48d1
From 778e0fb77a9dfb85270242f1238eba237488eb48 Mon Sep 17 00:00:00 2001
ccb48d1
From: Hans de Goede <hdegoede@redhat.com>
ccb48d1
Date: Mon, 25 Jun 2018 16:55:39 +0200
ccb48d1
Subject: [PATCH 2/3] main: move ply_device_manager_deactivate_renderers() into
ccb48d1
 hide_splash()
ccb48d1
ccb48d1
hide_splash() should be the counter-part of show_splash(). show_splash()
ccb48d1
calls ply_device_manager_activate_renderers() (through show_theme()).
ccb48d1
ccb48d1
2 of the 3 callers of hide_splash() are already calling
ccb48d1
ply_device_manager_deactivate_renderers() directly before calling
ccb48d1
hide_splash(). This commit moves the deactivate call into hide_splash()
ccb48d1
so that it also gets called from the 3th code-path, which is when
ccb48d1
the user hits the escape to key to toggle from the splash to details.
ccb48d1
ccb48d1
It's important that plymouth deactivates its renderers before going
ccb48d1
to details, because those renderers can block the kernel from
ccb48d1
initializing fbcon, which the kernel will start doing lazily in the
ccb48d1
future:
ccb48d1
ccb48d1
https://lkml.org/lkml/2018/6/26/489.
ccb48d1
ccb48d1
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ccb48d1
ccb48d1
https://bugs.freedesktop.org/show_bug.cgi?id=107047
ccb48d1
---
ccb48d1
 src/main.c | 4 ++--
ccb48d1
 1 file changed, 2 insertions(+), 2 deletions(-)
ccb48d1
ccb48d1
diff --git a/src/main.c b/src/main.c
ccb48d1
index 841fe6b..ff02ea6 100644
ccb48d1
--- a/src/main.c
ccb48d1
+++ b/src/main.c
ccb48d1
@@ -1174,6 +1174,8 @@ quit_splash (state_t *state)
ccb48d1
 static void
ccb48d1
 hide_splash (state_t *state)
ccb48d1
 {
ccb48d1
+        ply_device_manager_deactivate_renderers (state->device_manager);
ccb48d1
+
ccb48d1
         state->is_shown = false;
ccb48d1
 
ccb48d1
         cancel_pending_delayed_show (state);
ccb48d1
@@ -1193,7 +1195,6 @@ dump_details_and_quit_splash (state_t *state)
ccb48d1
         state->showing_details = false;
ccb48d1
         toggle_between_splash_and_details (state);
ccb48d1
 
ccb48d1
-        ply_device_manager_deactivate_renderers (state->device_manager);
ccb48d1
         hide_splash (state);
ccb48d1
         quit_splash (state);
ccb48d1
 }
ccb48d1
@@ -1291,7 +1292,6 @@ on_boot_splash_idle (state_t *state)
ccb48d1
         if (state->quit_trigger != NULL) {
ccb48d1
                 if (!state->should_retain_splash) {
ccb48d1
                         ply_trace ("hiding splash");
ccb48d1
-                        ply_device_manager_deactivate_renderers (state->device_manager);
ccb48d1
                         hide_splash (state);
ccb48d1
                 }
ccb48d1
 
ccb48d1
-- 
ccb48d1
2.17.1
ccb48d1