From 55936d7e3620ce0220a0df82316d41d02da482245512422f83d7958b21a15616 Mon Sep 17 00:00:00 2001 From: Cliff Zhao Date: Thu, 29 Apr 2021 03:54:16 +0000 Subject: [PATCH] Accepting request 889148 from home:qzhao:branches:Base:System Pickup plymouth-only_use_fb_for_cirrus_bochs.patch: Currently our kernel hardware support need this fix, and boo#1172028 will be fix seperately (bsc#1181913, boo#1172028). OBS-URL: https://build.opensuse.org/request/show/889148 OBS-URL: https://build.opensuse.org/package/show/Base:System/plymouth?expand=0&rev=296 --- plymouth-only_use_fb_for_cirrus_bochs.patch | 47 +++++++++++++++++++++ plymouth-systemd-KillMode-mixed.patch | 17 -------- plymouth.changes | 7 ++- plymouth.spec | 4 +- 4 files changed, 52 insertions(+), 23 deletions(-) create mode 100644 plymouth-only_use_fb_for_cirrus_bochs.patch delete mode 100644 plymouth-systemd-KillMode-mixed.patch diff --git a/plymouth-only_use_fb_for_cirrus_bochs.patch b/plymouth-only_use_fb_for_cirrus_bochs.patch new file mode 100644 index 0000000..e85dee2 --- /dev/null +++ b/plymouth-only_use_fb_for_cirrus_bochs.patch @@ -0,0 +1,47 @@ +From: Fabian Vogt +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. + +Index: plymouth-0.9.3+git20180807.7663b0c/src/libply-splash-core/ply-device-manager.c +=================================================================== +--- plymouth-0.9.3+git20180807.7663b0c.orig/src/libply-splash-core/ply-device-manager.c 2018-08-07 17:41:15.000000000 +0200 ++++ plymouth-0.9.3+git20180807.7663b0c/src/libply-splash-core/ply-device-manager.c 2018-08-17 19:58:41.178821647 +0200 +@@ -228,13 +228,33 @@ create_devices_for_udev_device (ply_devi + 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 (subsystem != NULL && strcmp (subsystem, SUBSYSTEM_DRM) == 0) { + 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 + ply_trace ("ignoring, since there's a DRM device associated with it"); + } diff --git a/plymouth-systemd-KillMode-mixed.patch b/plymouth-systemd-KillMode-mixed.patch deleted file mode 100644 index 2271ec5..0000000 --- a/plymouth-systemd-KillMode-mixed.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -Nura plymouth-0.9.5+git20201026+53c83cc/systemd-units/plymouth-start.service.in plymouth-0.9.5+git20201026+53c83cc_new/systemd-units/plymouth-start.service.in ---- plymouth-0.9.5+git20201026+53c83cc/systemd-units/plymouth-start.service.in 2021-03-18 09:26:05.723604182 +0800 -+++ plymouth-0.9.5+git20201026+53c83cc_new/systemd-units/plymouth-start.service.in 2021-03-18 09:31:18.479117212 +0800 -@@ -6,11 +6,12 @@ - Before=systemd-ask-password-plymouth.service - ConditionKernelCommandLine=!plymouth.enable=0 - ConditionVirtualization=!container -+IgnoreOnIsolate=true - - [Service] - ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=boot --pid-file=@plymouthruntimedir@/pid --attach-to-session - ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash - Type=forking - RemainAfterExit=yes --KillMode=none -+KillMode=mixed - SendSIGKILL=no diff --git a/plymouth.changes b/plymouth.changes index 8725ac3..46ffdd4 100644 --- a/plymouth.changes +++ b/plymouth.changes @@ -1,10 +1,9 @@ ------------------------------------------------------------------- Wed Feb 24 08:25:42 UTC 2021 - Cliff Zhao -- Add plymouth-systemd-KillMode-mixed.patch: Backport from upstream - change plymouth systemd plymouth-start.service KillMode=mixed, - the old method is unsafe and deprecated (bnc#1177082, - bnc#1182145). +- Pickup plymouth-only_use_fb_for_cirrus_bochs.patch: Currently our + kernel hardware support need this fix, and boo#1172028 will be + fix seperately (bsc#1181913, boo#1172028). ------------------------------------------------------------------- Sat Feb 13 14:25:36 UTC 2021 - Arjen de Korte diff --git a/plymouth.spec b/plymouth.spec index 701f362..c91b9b9 100644 --- a/plymouth.spec +++ b/plymouth.spec @@ -47,8 +47,8 @@ Patch3: plymouth-manpages.patch Patch4: plymouth-no-longer-modify-conf-to-drop-isopensuse-macro.patch # PATCH-FIX-OPENSUSE plymouth-disable-fedora-logo.patch qzhao@opensuse.org -- Disable the fedora logo reference which is not in openSUSE. Patch6: plymouth-disable-fedora-logo.patch -# PATCH-FIX-UPSTREAM plymouth-systemd-KillMode-mixed.patch bnc#1177082, bnc#1182145 qzhao@suse.com -- change plymouth systemd plymouth-start.service KillMode=mixed. -Patch7: plymouth-systemd-KillMode-mixed.patch +# PATCH-FIX-OPENSUSE plymouth-only_use_fb_for_cirrus_bochs.patch bnc#888590 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. +Patch7: plymouth-only_use_fb_for_cirrus_bochs.patch # PATCH-FIX-UPSTREAM 0001-Add-label-ft-plugin.patch boo#959986 fvogt@suse.com -- add ability to output text in initrd needed for encryption. Patch1000: 0001-Add-label-ft-plugin.patch # PATCH-FIX-UPSTREAM 0002-Install-label-ft-plugin-into-initrd-if-available.patch boo#959986 fvogt@suse.com -- add ability to output text in initrd needed for encryption.