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>
{
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);
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");
}
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;
(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 */