forked from pool/plymouth
Compare commits
18 Commits
Author | SHA256 | Date | |
---|---|---|---|
|
91d09cc5d3 | ||
a464d4895c | |||
|
378477b979 | ||
179e960e65 | |||
|
41ebd9bf39 | ||
|
8a7daf1f54 | ||
|
b235f61381 | ||
|
15fffefb57 | ||
ee4245a9eb | |||
8225856315 | |||
be6c71ebf9 | |||
f66b57318b | |||
|
b77b9ae0ee | ||
7712c9cf48 | |||
|
438e57d945 | ||
4ad9b5295f | |||
ecb31274b6 | |||
|
99bc15d6bd |
@ -1,50 +0,0 @@
|
||||
From: Fabian Vogt <fvogt@suse.com>
|
||||
Subject: force fb for cirrus and bochs, force drm otherwise
|
||||
References: bsc#888590, bsc#980750
|
||||
|
||||
DRM does not work well with cirrus and bochs (no display) but the framebuffer driver
|
||||
prevents DRM drivers from loading.
|
||||
As we need to support cirrus for libvirt and bochs for QEMU, we cannot just remove support for frame-buffer.
|
||||
|
||||
diff -Nura plymouth-22.02.122+94.4bd41a3/src/libply-splash-core/ply-device-manager.c plymouth-22.02.122+94.4bd41a3_new/src/libply-splash-core/ply-device-manager.c
|
||||
--- plymouth-22.02.122+94.4bd41a3/src/libply-splash-core/ply-device-manager.c 2022-10-26 19:09:02.000000000 +0800
|
||||
+++ plymouth-22.02.122+94.4bd41a3_new/src/libply-splash-core/ply-device-manager.c 2022-10-27 00:07:06.605777003 +0800
|
||||
@@ -316,6 +316,18 @@
|
||||
subsystem = udev_device_get_subsystem (device);
|
||||
ply_trace ("device subsystem is %s", subsystem);
|
||||
|
||||
+ const char *card_vendor = udev_device_get_sysattr_value (device, "device/vendor");
|
||||
+ const char *card_device = udev_device_get_sysattr_value (device, "device/device");
|
||||
+ bool use_fb = false;
|
||||
+ if (card_vendor) {
|
||||
+ /* Cirrus */
|
||||
+ if (strcmp ("0x1013", card_vendor) == 0)
|
||||
+ use_fb = true;
|
||||
+ /* "Technical Corp", also used by bochs */
|
||||
+ else if (strcmp ("0x1234", card_vendor) == 0)
|
||||
+ use_fb = strcmp("0x1111", card_device) == 0;
|
||||
+ }
|
||||
+
|
||||
if (strcmp (subsystem, SUBSYSTEM_DRM) == 0) {
|
||||
if (!manager->device_timeout_elapsed && !verify_drm_device (device)) {
|
||||
ply_trace ("ignoring since we only handle SimpleDRM devices after timeout");
|
||||
@@ -323,10 +335,18 @@
|
||||
}
|
||||
ply_trace ("found DRM device %s", device_path);
|
||||
renderer_type = PLY_RENDERER_TYPE_DRM;
|
||||
+ if (use_fb) {
|
||||
+ ply_trace ("forcing use of framebuffer for cirrusdrmfb");
|
||||
+ renderer_type = PLY_RENDERER_TYPE_NONE;
|
||||
+ }
|
||||
} 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))
|
||||
+ if (use_fb) {
|
||||
renderer_type = PLY_RENDERER_TYPE_FRAME_BUFFER;
|
||||
+ }
|
||||
+ else if (!fb_device_has_drm_device (manager, device)) {
|
||||
+ ply_trace ("avoiding use of framebuffer to not block DRM drivers from working");
|
||||
+ }
|
||||
else if (force_fb)
|
||||
renderer_type = PLY_RENDERER_TYPE_FRAME_BUFFER;
|
||||
else
|
291
plymouth-support-multi-monitor-hotplugin.patch
Normal file
291
plymouth-support-multi-monitor-hotplugin.patch
Normal file
@ -0,0 +1,291 @@
|
||||
commit 1896ea7439457a33ad1d1cc72a5dceb564dd77ef
|
||||
Author: Timo Teräs <timo.teras@iki.fi>
|
||||
Date: Wed Mar 22 13:54:39 2023 +0200
|
||||
|
||||
script: handle display hotplug
|
||||
|
||||
- Fix script plugin to handle monitor hotplug events
|
||||
|
||||
- Expose Plymouth.SetDisplayHotplugFunction to set script callback
|
||||
after display hotplug
|
||||
|
||||
fixes #186
|
||||
|
||||
--- plymouth-22.02.122+94.4bd41a3/src/plugins/splash/script/plugin.c
|
||||
+++ plymouth-22.02.122+94.4bd41a3_new/src/plugins/splash/script/plugin.c
|
||||
@@ -392,13 +392,22 @@
|
||||
ply_pixel_display_t *display)
|
||||
{
|
||||
ply_list_append_data (plugin->displays, display);
|
||||
+
|
||||
+ if (plugin->script_sprite_lib != NULL) {
|
||||
+ script_lib_sprite_pixel_display_added (plugin->script_sprite_lib, display);
|
||||
+ script_lib_plymouth_on_display_hotplug (plugin->script_state, plugin->script_plymouth_lib);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void
|
||||
remove_pixel_display (ply_boot_splash_plugin_t *plugin,
|
||||
ply_pixel_display_t *display)
|
||||
{
|
||||
- script_lib_sprite_pixel_display_removed (plugin->script_sprite_lib, display);
|
||||
+ if (plugin->script_sprite_lib != NULL) {
|
||||
+ script_lib_sprite_pixel_display_removed (plugin->script_sprite_lib, display);
|
||||
+ script_lib_plymouth_on_display_hotplug (plugin->script_state, plugin->script_plymouth_lib);
|
||||
+ }
|
||||
+
|
||||
ply_list_remove_data (plugin->displays, display);
|
||||
}
|
||||
|
||||
--- plymouth-22.02.122+94.4bd41a3/src/plugins/splash/script/script-lib-plymouth.c
|
||||
+++ plymouth-22.02.122+94.4bd41a3_new/src/plugins/splash/script/script-lib-plymouth.c
|
||||
@@ -108,6 +108,7 @@
|
||||
data->script_display_prompt_func = script_obj_new_null ();
|
||||
data->script_validate_input_func = script_obj_new_null ();
|
||||
data->script_display_message_func = script_obj_new_null ();
|
||||
+ data->script_display_hotplug_func = script_obj_new_null ();
|
||||
data->script_hide_message_func = script_obj_new_null ();
|
||||
data->script_quit_func = script_obj_new_null ();
|
||||
data->script_system_update_func = script_obj_new_null ();
|
||||
@@ -177,6 +178,12 @@
|
||||
"function",
|
||||
NULL);
|
||||
+ script_add_native_function (plymouth_hash,
|
||||
+ "SetDisplayHotplugFunction",
|
||||
+ plymouth_set_function,
|
||||
+ &data->script_display_hotplug_func,
|
||||
+ "function",
|
||||
+ NULL);
|
||||
script_add_native_function (plymouth_hash,
|
||||
"SetValidateInputFunction",
|
||||
plymouth_set_function,
|
||||
&data->script_validate_input_func,
|
||||
@@ -233,6 +240,7 @@
|
||||
script_obj_unref (data->script_display_password_func);
|
||||
script_obj_unref (data->script_display_question_func);
|
||||
script_obj_unref (data->script_display_prompt_func);
|
||||
+ script_obj_unref (data->script_display_hotplug_func);
|
||||
script_obj_unref (data->script_validate_input_func);
|
||||
script_obj_unref (data->script_display_message_func);
|
||||
script_obj_unref (data->script_hide_message_func);
|
||||
@@ -384,6 +392,16 @@
|
||||
script_obj_unref (ret.object);
|
||||
}
|
||||
|
||||
+void script_lib_plymouth_on_display_hotplug (script_state_t *state,
|
||||
+ script_lib_plymouth_data_t *data)
|
||||
+{
|
||||
+ script_return_t ret = script_execute_object (state,
|
||||
+ data->script_display_hotplug_func,
|
||||
+ NULL,
|
||||
+ NULL);
|
||||
+ script_obj_unref (ret.object);
|
||||
+}
|
||||
+
|
||||
bool script_lib_plymouth_on_validate_input (script_state_t *state,
|
||||
script_lib_plymouth_data_t *data,
|
||||
const char *entry_text,
|
||||
--- plymouth-22.02.122+94.4bd41a3/src/plugins/splash/script/script-lib-plymouth.h
|
||||
+++ plymouth-22.02.122+94.4bd41a3_new/src/plugins/splash/script/script-lib-plymouth.h
|
||||
@@ -37,6 +37,7 @@
|
||||
script_obj_t *script_display_password_func;
|
||||
script_obj_t *script_display_question_func;
|
||||
script_obj_t *script_display_prompt_func;
|
||||
+ script_obj_t *script_display_hotplug_func;
|
||||
script_obj_t *script_validate_input_func;
|
||||
script_obj_t *script_display_message_func;
|
||||
script_obj_t *script_hide_message_func;
|
||||
@@ -80,6 +81,8 @@
|
||||
const char *prompt,
|
||||
const char *entry_text,
|
||||
bool is_secret);
|
||||
+void script_lib_plymouth_on_display_hotplug (script_state_t *state,
|
||||
+ script_lib_plymouth_data_t *data);
|
||||
bool script_lib_plymouth_on_validate_input (script_state_t *state,
|
||||
script_lib_plymouth_data_t *data,
|
||||
const char *entry_text,
|
||||
--- plymouth-22.02.122+94.4bd41a3/src/plugins/splash/script/script-lib-sprite.c
|
||||
+++ plymouth-22.02.122+94.4bd41a3_new/src/plugins/splash/script/script-lib-sprite.c
|
||||
@@ -223,17 +223,7 @@
|
||||
return script_return_obj (script_obj_new_number (width));
|
||||
}
|
||||
|
||||
- width = 0;
|
||||
- for (node = ply_list_get_first_node (data->displays);
|
||||
- node;
|
||||
- node = ply_list_get_next_node (data->displays, node)) {
|
||||
- display = ply_list_node_get_data (node);
|
||||
- if (width == 0)
|
||||
- width = ply_pixel_display_get_width (display->pixel_display);
|
||||
- else
|
||||
- width = MAX (width, ply_pixel_display_get_width (display->pixel_display));
|
||||
- }
|
||||
- return script_return_obj (script_obj_new_number (width));
|
||||
+ return script_return_obj (script_obj_new_number (data->max_width));
|
||||
}
|
||||
|
||||
static script_return_t sprite_window_get_height (script_state_t *state,
|
||||
@@ -261,17 +251,7 @@
|
||||
return script_return_obj (script_obj_new_number (height));
|
||||
}
|
||||
|
||||
- height = 0;
|
||||
- for (node = ply_list_get_first_node (data->displays);
|
||||
- node;
|
||||
- node = ply_list_get_next_node (data->displays, node)) {
|
||||
- display = ply_list_node_get_data (node);
|
||||
- if (height == 0)
|
||||
- height = ply_pixel_display_get_height (display->pixel_display);
|
||||
- else
|
||||
- height = MAX (height, ply_pixel_display_get_height (display->pixel_display));
|
||||
- }
|
||||
- return script_return_obj (script_obj_new_number (height));
|
||||
+ return script_return_obj (script_obj_new_number (data->max_height));
|
||||
}
|
||||
|
||||
static script_return_t sprite_window_get_x (script_state_t *state,
|
||||
@@ -519,45 +499,65 @@
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+update_displays (script_lib_sprite_data_t *data)
|
||||
+{
|
||||
+ ply_list_node_t *node;
|
||||
+ script_lib_display_t *script_display;
|
||||
+
|
||||
+ data->max_width = 0;
|
||||
+ data->max_height = 0;
|
||||
+ for (node = ply_list_get_first_node (data->displays);
|
||||
+ node;
|
||||
+ node = ply_list_get_next_node (data->displays, node)) {
|
||||
+ script_display = ply_list_node_get_data (node);
|
||||
+ data->max_width = MAX (data->max_width, ply_pixel_display_get_width (script_display->pixel_display));
|
||||
+ data->max_height = MAX (data->max_height, ply_pixel_display_get_height (script_display->pixel_display));
|
||||
+ }
|
||||
+
|
||||
+ for (node = ply_list_get_first_node (data->displays);
|
||||
+ node;
|
||||
+ node = ply_list_get_next_node (data->displays, node)) {
|
||||
+ script_display = ply_list_node_get_data (node);
|
||||
+ script_display->x = (data->max_width - ply_pixel_display_get_width (script_display->pixel_display)) / 2;
|
||||
+ script_display->y = (data->max_height - ply_pixel_display_get_height (script_display->pixel_display)) / 2;
|
||||
+ }
|
||||
+
|
||||
+ data->full_refresh = true;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+add_display (script_lib_sprite_data_t *data,
|
||||
+ ply_pixel_display_t *pixel_display)
|
||||
+{
|
||||
+ script_lib_display_t *script_display = malloc (sizeof(script_lib_display_t));
|
||||
+
|
||||
+ script_display->pixel_display = pixel_display;
|
||||
+ script_display->data = data;
|
||||
+ ply_pixel_display_set_draw_handler (pixel_display,
|
||||
+ (ply_pixel_display_draw_handler_t)
|
||||
+ script_lib_sprite_draw_area, script_display);
|
||||
+
|
||||
+ ply_list_append_data (data->displays, script_display);
|
||||
+}
|
||||
+
|
||||
script_lib_sprite_data_t *script_lib_sprite_setup (script_state_t *state,
|
||||
ply_list_t *pixel_displays)
|
||||
{
|
||||
ply_list_node_t *node;
|
||||
- unsigned int max_width, max_height;
|
||||
script_lib_sprite_data_t *data = malloc (sizeof(script_lib_sprite_data_t));
|
||||
|
||||
data->class = script_obj_native_class_new (sprite_free, "sprite", data);
|
||||
data->sprite_list = ply_list_new ();
|
||||
data->displays = ply_list_new ();
|
||||
|
||||
- max_width = 0;
|
||||
- max_height = 0;
|
||||
-
|
||||
for (node = ply_list_get_first_node (pixel_displays);
|
||||
node;
|
||||
node = ply_list_get_next_node (pixel_displays, node)) {
|
||||
ply_pixel_display_t *pixel_display = ply_list_node_get_data (node);
|
||||
- max_width = MAX (max_width, ply_pixel_display_get_width (pixel_display));
|
||||
- max_height = MAX (max_height, ply_pixel_display_get_height (pixel_display));
|
||||
- }
|
||||
-
|
||||
- for (node = ply_list_get_first_node (pixel_displays);
|
||||
- node;
|
||||
- node = ply_list_get_next_node (pixel_displays, node)) {
|
||||
- ply_pixel_display_t *pixel_display = ply_list_node_get_data (node);
|
||||
- script_lib_display_t *script_display = malloc (sizeof(script_lib_display_t));
|
||||
- script_display->pixel_display = pixel_display;
|
||||
-
|
||||
- script_display->x = (max_width - ply_pixel_display_get_width (pixel_display)) / 2;
|
||||
- script_display->y = (max_height - ply_pixel_display_get_height (pixel_display)) / 2;
|
||||
-
|
||||
- script_display->data = data;
|
||||
- ply_pixel_display_set_draw_handler (pixel_display,
|
||||
- (ply_pixel_display_draw_handler_t)
|
||||
- script_lib_sprite_draw_area, script_display);
|
||||
-
|
||||
- ply_list_append_data (data->displays, script_display);
|
||||
+ add_display (data, pixel_display);
|
||||
}
|
||||
+ update_displays (data);
|
||||
|
||||
script_obj_t *sprite_hash = script_obj_hash_get_element (state->global, "Sprite");
|
||||
|
||||
@@ -718,12 +718,20 @@
|
||||
ply_region_add_rectangle (region, &rectangle);
|
||||
}
|
||||
|
||||
+void script_lib_sprite_pixel_display_added (script_lib_sprite_data_t *data,
|
||||
+ ply_pixel_display_t *pixel_display)
|
||||
+{
|
||||
+ add_display (data, pixel_display);
|
||||
+ update_displays (data);
|
||||
+}
|
||||
+
|
||||
void script_lib_sprite_pixel_display_removed (script_lib_sprite_data_t *data,
|
||||
ply_pixel_display_t *pixel_display)
|
||||
{
|
||||
ply_list_node_t *node;
|
||||
ply_list_node_t *next_node;
|
||||
script_lib_display_t *display;
|
||||
+ bool update = false;
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
@@ -735,9 +743,13 @@
|
||||
|
||||
if (display->pixel_display == pixel_display) {
|
||||
ply_list_remove_node (data->displays, node);
|
||||
+ update = true;
|
||||
}
|
||||
node = next_node;
|
||||
}
|
||||
+
|
||||
+ if (update)
|
||||
+ update_displays (data);
|
||||
}
|
||||
|
||||
void
|
||||
--- plymouth-22.02.122+94.4bd41a3/src/plugins/splash/script/script-lib-sprite.h
|
||||
+++ plymouth-22.02.122+94.4bd41a3_new/src/plugins/splash/script/script-lib-sprite.h
|
||||
@@ -35,6 +35,8 @@
|
||||
uint32_t background_color_start;
|
||||
uint32_t background_color_end;
|
||||
bool full_refresh;
|
||||
+ unsigned int max_width;
|
||||
+ unsigned int max_height;
|
||||
} script_lib_sprite_data_t;
|
||||
|
||||
typedef struct
|
||||
@@ -65,6 +67,8 @@
|
||||
|
||||
script_lib_sprite_data_t *script_lib_sprite_setup (script_state_t *state,
|
||||
ply_list_t *displays);
|
||||
+void script_lib_sprite_pixel_display_added (script_lib_sprite_data_t *data,
|
||||
+ ply_pixel_display_t *pixel_display);
|
||||
void script_lib_sprite_pixel_display_removed (script_lib_sprite_data_t *data,
|
||||
ply_pixel_display_t *pixel_display);
|
||||
void script_lib_sprite_refresh (script_lib_sprite_data_t *data);
|
@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 4 14:03:31 UTC 2024 - Thomas Zimmermann <tzimmermann@suse.com>
|
||||
|
||||
- Remove plymouth-only_use_fb_for_cirrus_bochs.patch: Bochs and cirrus
|
||||
DRM drivers are fully compatible with plymouth. Remove the workaround
|
||||
that forces them to use fbdev. Resolves the blank screen when disabling
|
||||
fbdev interfaces.(bsc#1232727)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 1 13:17:39 UTC 2024 - Cliff Zhao <qzhao@suse.com>
|
||||
|
||||
- Add plymouth-support-multi-monitor-hotplugin.patch:
|
||||
To support the 2nd monitor hotplugin to the system in random
|
||||
order. Display the same content is fine.
|
||||
(bsc#1231214)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 28 03:33:51 UTC 2023 - Cliff Zhao <qzhao@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package plymouth
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -38,22 +38,22 @@ Patch1: plymouth-some-greenish-openSUSE-colors.patch
|
||||
Patch2: plymouth-manpages.patch
|
||||
# PATCH-FIX-OPENSUSE plymouth-disable-fedora-logo.patch qzhao@suse.com -- Disable the fedora logo reference which is not in openSUSE.
|
||||
Patch3: plymouth-disable-fedora-logo.patch
|
||||
# PATCH-FIX-OPENSUSE plymouth-only_use_fb_for_cirrus_bochs.patch bnc#888590 boo#1172028 bsc#1181913 fvogt@suse.com -- Force fb for cirrus and bochs, force drm otherwise. replace removal of framebuffer driver and plymouth-ignore-cirrusdrm.patch with single patch.
|
||||
Patch4: plymouth-only_use_fb_for_cirrus_bochs.patch
|
||||
# PATCH-FIX-OPENSUSE plymouth-keep-KillMode-none.patch bsc#1177082 bsc#1184087 boo#1182145 qzhao@suse.com -- Keep the plymouth-start.service KillMode=none.
|
||||
Patch5: plymouth-keep-KillMode-none.patch
|
||||
Patch4: plymouth-keep-KillMode-none.patch
|
||||
# PATCH-FIX-OPENSUSE plymouth-install-label-library-and-font-file-to-initrd.patch boo#1183425 boo#1184309 qzhao@suse.com -- Pack label plugin and font into initram to ensure notice info could successfully show when partition encrypted.
|
||||
Patch6: plymouth-install-label-library-and-font-file-to-initrd.patch
|
||||
Patch5: plymouth-install-label-library-and-font-file-to-initrd.patch
|
||||
# PATCH-FIX-OPENSUSE plymouth-quiet-dracut-build-info.patch bsc#1189613 qzhao@suse.com -- Hide unuseful output when re-generate initrd.
|
||||
Patch7: plymouth-quiet-dracut-build-info.patch
|
||||
Patch6: plymouth-quiet-dracut-build-info.patch
|
||||
# PATCH-FIX-OPENSUSE plymouth-watermark-config.patch bsc#1189613 qzhao@suse.com -- Add two-step water mark config support.
|
||||
Patch8: plymouth-watermark-config.patch
|
||||
Patch7: plymouth-watermark-config.patch
|
||||
# PATCH-FIX-OPENSUSE plymouth-log-on-default.patch bsc#1193736 qzhao@suse.com -- Enable plymouth log by default, help to resolve random appear problems.
|
||||
Patch9: plymouth-log-on-default.patch
|
||||
Patch8: plymouth-log-on-default.patch
|
||||
# PATCH-FIX-OPENSUSE plymouth-screen-twice-scale-on-160DPI-higher.patch boo#1183425 boo#1184309 qzhao@suse.com -- When DPI > 160, screen will scale output twice.
|
||||
Patch10: plymouth-screen-twice-scale-on-160DPI-higher.patch
|
||||
Patch9: plymouth-screen-twice-scale-on-160DPI-higher.patch
|
||||
# PATCH-FIX-OPENSUSE plymouth-crash-avoid-on-keyboard-remove-input-handler.patch bsc#1193736 qzhao@suse.com -- Confirm keyboard handler list not NULL before release memory to avoid crash.
|
||||
Patch11: plymouth-crash-avoid-on-keyboard-remove-input-handler.patch
|
||||
Patch10: plymouth-crash-avoid-on-keyboard-remove-input-handler.patch
|
||||
# PATCH-FIX-SLE plymouth-support-multi-monitor-hotplugin.patch bsc#1231214 qzhao@suse.com -- support the 2nd monitor hotplugin to the system to display the same content with the first monitor.
|
||||
Patch13: plymouth-support-multi-monitor-hotplugin.patch
|
||||
BuildRequires: automake
|
||||
BuildRequires: docbook-xsl-stylesheets
|
||||
BuildRequires: gcc
|
||||
@ -85,7 +85,7 @@ Requires: %{name}-branding
|
||||
Requires: systemd >= 186
|
||||
Requires(post): coreutils
|
||||
Requires(post): plymouth-scripts = %{version}
|
||||
Requires(postun):coreutils
|
||||
Requires(postun): coreutils
|
||||
Suggests: plymouth-plugin-label
|
||||
Provides: bootsplash = 3.5
|
||||
Obsoletes: bootsplash < 3.5
|
||||
|
Loading…
Reference in New Issue
Block a user