plymouth-0.9.5 ver. bump

This commit is contained in:
Rmys
2021-02-13 15:33:35 +03:00
committed by GitHub
parent ba37fced1c
commit 0f80b86ca8
13 changed files with 472 additions and 37 deletions
@@ -0,0 +1,28 @@
diff -Nuar a/src/libply-splash-core/ply-boot-splash-plugin.h b/src/libply-splash-core/ply-boot-splash-plugin.h
--- a/src/libply-splash-core/ply-boot-splash-plugin.h 2020-06-15 17:16:47.000000000 +0300
+++ b/src/libply-splash-core/ply-boot-splash-plugin.h 2021-01-25 13:40:38.576859689 +0300
@@ -38,6 +38,8 @@
{
PLY_BOOT_SPLASH_MODE_BOOT_UP,
PLY_BOOT_SPLASH_MODE_SHUTDOWN,
+ PLY_BOOT_SPLASH_MODE_SUSPEND,
+ PLY_BOOT_SPLASH_MODE_RESUME,
PLY_BOOT_SPLASH_MODE_REBOOT,
PLY_BOOT_SPLASH_MODE_UPDATES,
PLY_BOOT_SPLASH_MODE_SYSTEM_UPGRADE,
diff -Nuar a/src/plugins/splash/script/script-lib-plymouth.c b/src/plugins/splash/script/script-lib-plymouth.c
--- a/src/plugins/splash/script/script-lib-plymouth.c 2020-06-15 17:16:47.000000000 +0300
+++ b/src/plugins/splash/script/script-lib-plymouth.c 2021-01-25 13:43:12.694848568 +0300
@@ -70,6 +70,12 @@
case PLY_BOOT_SPLASH_MODE_SHUTDOWN:
obj = script_obj_new_string ("shutdown");
break;
+ case PLY_BOOT_SPLASH_MODE_SUSPEND:
+ obj = script_obj_new_string ("suspend");
+ break;
+ case PLY_BOOT_SPLASH_MODE_RESUME:
+ obj = script_obj_new_string ("resume");
+ break;
case PLY_BOOT_SPLASH_MODE_REBOOT:
obj = script_obj_new_string ("reboot");
break;
@@ -0,0 +1,76 @@
Index: plymouth-0.9.5/src/main.c
===================================================================
--- plymouth-0.9.5/src/main.c
+++ plymouth-0.9.5/src/main.c 2020-10-01 21:11:15.353670757 +0200
@@ -2263,6 +2263,11 @@
(getenv ("DISPLAY") != NULL))
device_manager_flags |= PLY_DEVICE_MANAGER_FLAGS_IGNORE_UDEV;
+ if (ply_kernel_command_line_has_argument ("nokmsboot") ||
+ ply_kernel_command_line_has_argument ("nomodeset"))
+ device_manager_flags |= PLY_DEVICE_MANAGER_FLAGS_KMS_DISABLED;
+
+
if (!plymouth_should_show_default_splash (&state)) {
/* don't bother listening for udev events or setting up a graphical renderer
* if we're forcing details */
Index: plymouth-0.9.5/src/libply-splash-core/ply-device-manager.c
===================================================================
--- plymouth-0.9.5/src/libply-splash-core/ply-device-manager.c
+++ plymouth-0.9.5/src/libply-splash-core/ply-device-manager.c 2020-10-01 21:09:30.090117000 +0200
@@ -219,6 +219,9 @@
const char *id_path;
bool has_drm_device = false;
+ if (manager->flags & PLY_DEVICE_MANAGER_FLAGS_KMS_DISABLED)
+ return false;
+
/* We want to see if the framebuffer is associated with a DRM-capable
* graphics card, if it is, we'll use the DRM device */
card_matches = udev_enumerate_new (manager->udev_context);
@@ -276,7 +279,11 @@
if (subsystem != NULL && strcmp (subsystem, SUBSYSTEM_DRM) == 0) {
ply_trace ("found DRM device %s", device_path);
- renderer_type = PLY_RENDERER_TYPE_DRM;
+ if (!(manager->flags & PLY_DEVICE_MANAGER_FLAGS_KMS_DISABLED))
+ renderer_type = PLY_RENDERER_TYPE_DRM;
+ else
+ ply_trace ("ignoring, since kernel modesetting is disabled");
+
} else if (strcmp (subsystem, SUBSYSTEM_FRAME_BUFFER) == 0) {
ply_trace ("found frame buffer device %s", device_path);
if (!fb_device_has_drm_device (manager, device))
@@ -433,11 +440,17 @@
return;
if (strcmp (action, "add") == 0 || strcmp (action, "change") == 0) {
+ const char *preferred_subsystem;
const char *subsystem;
+ if (manager->flags & PLY_DEVICE_MANAGER_FLAGS_KMS_DISABLED)
+ preferred_subsystem = SUBSYSTEM_FRAME_BUFFER;
+ else
+ preferred_subsystem = SUBSYSTEM_DRM;
+
subsystem = udev_device_get_subsystem (device);
- if (strcmp (subsystem, SUBSYSTEM_DRM) == 0) {
+ if (strcmp (subsystem, preferred_subsystem) == 0) {
if (manager->local_console_managed && manager->local_console_is_text)
ply_trace ("ignoring since we're already using text splash for local console");
else
Index: plymouth-0.9.5/src/libply-splash-core/ply-device-manager.h
===================================================================
--- plymouth-0.9.5/src/libply-splash-core/ply-device-manager.h
+++ plymouth-0.9.5/src/libply-splash-core/ply-device-manager.h 2020-10-01 21:10:10.643535253 +0200
@@ -32,7 +32,8 @@
PLY_DEVICE_MANAGER_FLAGS_NONE = 0,
PLY_DEVICE_MANAGER_FLAGS_IGNORE_SERIAL_CONSOLES = 1 << 0,
PLY_DEVICE_MANAGER_FLAGS_IGNORE_UDEV = 1 << 1,
- PLY_DEVICE_MANAGER_FLAGS_SKIP_RENDERERS = 1 << 2
+ PLY_DEVICE_MANAGER_FLAGS_SKIP_RENDERERS = 1 << 2,
+ PLY_DEVICE_MANAGER_FLAGS_KMS_DISABLED = 1 << 3
} ply_device_manager_flags_t;
typedef struct _ply_device_manager ply_device_manager_t;
@@ -0,0 +1,29 @@
From 3149d7e8a76ce69e57c13de9ce261c5820d19125 Mon Sep 17 00:00:00 2001
From: Martin Whitaker <freedesktop@martin-whitaker.me.uk>
Date: Sun, 19 Mar 2017 19:12:53 +0000
Subject: [PATCH 2/2] main: allow the device timeout to be overridden on the
kernel command line.
diff --git a/src/main.c b/src/main.c
index 4c4f3f8..de381e0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -438,6 +438,14 @@ find_override_splash (state_t *state)
if (delay_string != NULL)
state->splash_delay = atof (delay_string);
}
+ if (isnan (state->device_timeout)) {
+ const char *delay_string;
+
+ delay_string = ply_kernel_command_line_get_string_after_prefix ("plymouth.device-timeout=");
+
+ if (delay_string != NULL)
+ state->device_timeout = atof (delay_string);
+ }
}
static void
--
2.10.2