mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 17:35:08 +00:00
Kernel/Graphics: Probe PCI graphics adapters on all architectures
This commit is contained in:
parent
e54e2a5a4f
commit
ecf41e13ad
1 changed files with 12 additions and 12 deletions
|
@ -225,22 +225,22 @@ UNMAP_AFTER_INIT bool GraphicsManagement::initialize()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!PCI::Access::is_disabled()) {
|
||||||
|
MUST(PCI::enumerate([&](PCI::DeviceIdentifier const& device_identifier) {
|
||||||
|
// Note: Each graphics controller will try to set its native screen resolution
|
||||||
|
// upon creation. Later on, if we don't want to have framebuffer devices, a
|
||||||
|
// framebuffer console will take the control instead.
|
||||||
|
if (!is_vga_compatible_pci_device(device_identifier) && !is_display_controller_pci_device(device_identifier))
|
||||||
|
return;
|
||||||
|
if (auto result = determine_and_initialize_graphics_device(device_identifier); result.is_error())
|
||||||
|
dbgln("Failed to initialize device {}, due to {}", device_identifier.address(), result.error());
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
#if ARCH(X86_64)
|
#if ARCH(X86_64)
|
||||||
if (PCI::Access::is_disabled()) {
|
|
||||||
dmesgln("Graphics: Using an assumed-to-exist ISA VGA compatible generic adapter");
|
dmesgln("Graphics: Using an assumed-to-exist ISA VGA compatible generic adapter");
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
MUST(PCI::enumerate([&](PCI::DeviceIdentifier const& device_identifier) {
|
|
||||||
// Note: Each graphics controller will try to set its native screen resolution
|
|
||||||
// upon creation. Later on, if we don't want to have framebuffer devices, a
|
|
||||||
// framebuffer console will take the control instead.
|
|
||||||
if (!is_vga_compatible_pci_device(device_identifier) && !is_display_controller_pci_device(device_identifier))
|
|
||||||
return;
|
|
||||||
if (auto result = determine_and_initialize_graphics_device(device_identifier); result.is_error())
|
|
||||||
dbgln("Failed to initialize device {}, due to {}", device_identifier.address(), result.error());
|
|
||||||
}));
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// Note: If we failed to find any graphics device to be used natively, but the
|
// Note: If we failed to find any graphics device to be used natively, but the
|
||||||
// bootloader prepared a framebuffer for us to use, then just create a DisplayConnector
|
// bootloader prepared a framebuffer for us to use, then just create a DisplayConnector
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue