mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 00:35:08 +00:00
Kernel: Add option to force using only the bootloader framebuffer
This allows forcing the use of only the framebuffer set up by the bootloader and skips instantiating devices for any other graphics cards that may be present.
This commit is contained in:
parent
01b3666894
commit
785c10fda9
5 changed files with 84 additions and 54 deletions
|
@ -245,9 +245,14 @@ PanicMode CommandLine::panic_mode(Validate should_validate) const
|
|||
return PanicMode::Halt;
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT bool CommandLine::are_framebuffer_devices_enabled() const
|
||||
UNMAP_AFTER_INIT auto CommandLine::are_framebuffer_devices_enabled() const -> FrameBufferDevices
|
||||
{
|
||||
return lookup("fbdev"sv).value_or("on"sv) == "on"sv;
|
||||
const auto fbdev_value = lookup("fbdev"sv).value_or("on"sv);
|
||||
if (fbdev_value == "on"sv)
|
||||
return FrameBufferDevices::Enabled;
|
||||
if (fbdev_value == "bootloader"sv)
|
||||
return FrameBufferDevices::BootloaderOnly;
|
||||
return FrameBufferDevices::ConsoleOnly;
|
||||
}
|
||||
|
||||
StringView CommandLine::userspace_init() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue