mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-07 10:48:09 +02:00
ply-device-manager: Add plymouth.force-frame-buffer-on-boot parameter, allow to choose force framebuffer mode.
Some hardware vendor may not open source display driver. (Such as pangu M900). They load drm driver via kernel modules. On such devices, drm driver load more slowly then other devices, which may cause logo show later and no seem to get the Plymouth decryption screen to show. To avoid this problem, add a bootargs for people who want to forced use fb in plymouth. When found "plymouth.force-frame-buffer-on-boot flags" in kernel parameter, During the system start, PLY_DEVICE_MANAGER_FLAGS_FORCE_FRAM_BUFFER will be add to device_manager_flags. Then "force_fb" mode will enable, and the renderer_type set as framebuffer. Signed-off-by: shiptux <shiptux@gmail.com>
This commit is contained in:
parent
e3aab2748b
commit
f07ab522f4
3 changed files with 13 additions and 1 deletions
|
|
@ -302,6 +302,10 @@ create_devices_for_udev_device (ply_device_manager_t *manager,
|
|||
{
|
||||
const char *device_path;
|
||||
bool created = false;
|
||||
bool force_fb = false;
|
||||
|
||||
if (manager->flags & PLY_DEVICE_MANAGER_FLAGS_FORCE_FRAME_BUFFER)
|
||||
force_fb = true;
|
||||
|
||||
device_path = udev_device_get_devnode (device);
|
||||
|
||||
|
|
@ -323,6 +327,8 @@ create_devices_for_udev_device (ply_device_manager_t *manager,
|
|||
ply_trace ("found frame buffer device %s", device_path);
|
||||
if (!fb_device_has_drm_device (manager, device))
|
||||
renderer_type = PLY_RENDERER_TYPE_FRAME_BUFFER;
|
||||
else if (force_fb)
|
||||
renderer_type = PLY_RENDERER_TYPE_FRAME_BUFFER;
|
||||
else
|
||||
ply_trace ("ignoring, since there's a DRM device associated with it");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ typedef enum
|
|||
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_FORCE_FRAME_BUFFER = 1 << 3
|
||||
} ply_device_manager_flags_t;
|
||||
|
||||
typedef struct _ply_device_manager ply_device_manager_t;
|
||||
|
|
|
|||
|
|
@ -2358,6 +2358,11 @@ main (int argc,
|
|||
(getenv ("DISPLAY") != NULL))
|
||||
device_manager_flags |= PLY_DEVICE_MANAGER_FLAGS_IGNORE_UDEV;
|
||||
|
||||
if ((ply_kernel_command_line_has_argument ("plymouth.force-frame-buffer-on-boot")) &&
|
||||
state.mode != PLY_BOOT_SPLASH_MODE_SHUTDOWN &&
|
||||
state.mode != PLY_BOOT_SPLASH_MODE_REBOOT)
|
||||
device_manager_flags |= PLY_DEVICE_MANAGER_FLAGS_FORCE_FRAME_BUFFER;
|
||||
|
||||
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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue