]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
main: move ply_device_manager_deactivate_renderers() into hide_splash()
authorHans de Goede <hdegoede@redhat.com>
Mon, 25 Jun 2018 14:55:39 +0000 (16:55 +0200)
committerRay Strode <rstrode@redhat.com>
Fri, 29 Jun 2018 20:25:42 +0000 (16:25 -0400)
hide_splash() should be the counter-part of show_splash(). show_splash()
calls ply_device_manager_activate_renderers() (through show_theme()).

2 of the 3 callers of hide_splash() are already calling
ply_device_manager_deactivate_renderers() directly before calling
hide_splash(). This commit moves the deactivate call into hide_splash()
so that it also gets called from the 3th code-path, which is when
the user hits the escape to key to toggle from the splash to details.

It's important that plymouth deactivates its renderers before going
to details, because those renderers can block the kernel from
initializing fbcon, which the kernel will start doing lazily in the
future:

https://lkml.org/lkml/2018/6/26/489.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
https://bugs.freedesktop.org/show_bug.cgi?id=107047

src/main.c

index 841fe6b21f2d58afef556c45183f7ffd280a3cfd..ff02ea6b52fed08f340e79862e3caf412845bcde 100644 (file)
@@ -1174,6 +1174,8 @@ quit_splash (state_t *state)
 static void
 hide_splash (state_t *state)
 {
+        ply_device_manager_deactivate_renderers (state->device_manager);
+
         state->is_shown = false;
 
         cancel_pending_delayed_show (state);
@@ -1193,7 +1195,6 @@ dump_details_and_quit_splash (state_t *state)
         state->showing_details = false;
         toggle_between_splash_and_details (state);
 
-        ply_device_manager_deactivate_renderers (state->device_manager);
         hide_splash (state);
         quit_splash (state);
 }
@@ -1291,7 +1292,6 @@ on_boot_splash_idle (state_t *state)
         if (state->quit_trigger != NULL) {
                 if (!state->should_retain_splash) {
                         ply_trace ("hiding splash");
-                        ply_device_manager_deactivate_renderers (state->device_manager);
                         hide_splash (state);
                 }