mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 22:25:07 +00:00
Kernel/Graphics: Use boot console if the subsystem is disabled
This lets us actually to initialize VirtualConsoles later on.
This commit is contained in:
parent
7ab51b6df2
commit
a0a1ac0656
1 changed files with 9 additions and 1 deletions
|
@ -250,8 +250,16 @@ UNMAP_AFTER_INIT bool GraphicsManagement::initialize()
|
|||
*/
|
||||
|
||||
auto graphics_subsystem_mode = kernel_command_line().graphics_subsystem_mode();
|
||||
if (graphics_subsystem_mode == CommandLine::GraphicsSubsystemMode::Disabled)
|
||||
if (graphics_subsystem_mode == CommandLine::GraphicsSubsystemMode::Disabled) {
|
||||
VERIFY(!m_console);
|
||||
// If no graphics driver was instantiated and we had a bootloader provided
|
||||
// framebuffer console we can simply re-use it.
|
||||
if (auto* boot_console = g_boot_console.load()) {
|
||||
m_console = *boot_console;
|
||||
boot_console->unref(); // Drop the leaked reference from Kernel::init()
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (graphics_subsystem_mode == CommandLine::GraphicsSubsystemMode::Limited && !multiboot_framebuffer_addr.is_null() && multiboot_framebuffer_type != MULTIBOOT_FRAMEBUFFER_TYPE_RGB) {
|
||||
dmesgln("Graphics: Using a preset resolution from the bootloader, without knowing the PCI device");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue