mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:58:13 +00:00
Kernel/PCI: Cache more details about PCI devices when enumerating them
There's no good reason to fetch these values each time we need them.
This commit is contained in:
parent
e22d9dc360
commit
82bb08a15c
14 changed files with 85 additions and 41 deletions
|
@ -179,13 +179,13 @@ UNMAP_AFTER_INIT bool GraphicsManagement::initialize()
|
|||
dbgln("Forcing no initialization of framebuffer devices");
|
||||
}
|
||||
|
||||
PCI::enumerate([&](const PCI::Address& address, PCI::ID id) {
|
||||
PCI::enumerate([&](const PCI::Address& address, PCI::PhysicalID const& physical_id) {
|
||||
// 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(address) && !is_display_controller_pci_device(address))
|
||||
return;
|
||||
determine_and_initialize_graphics_device(address, id);
|
||||
determine_and_initialize_graphics_device(address, physical_id.id());
|
||||
});
|
||||
|
||||
if (m_graphics_devices.is_empty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue