summaryrefslogtreecommitdiff
path: root/Kernel/Graphics
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2021-09-23 09:05:34 +0300
committerAndreas Kling <kling@serenityos.org>2021-09-29 11:24:33 +0200
commit82bb08a15cbe447b5b0deeac16cccc22bf1c1c57 (patch)
treeecb5dc7c013c1f11516fb8c74561be10179fa7d2 /Kernel/Graphics
parente22d9dc360d123b5b3c847a9ec882da220dc8e66 (diff)
downloadserenity-82bb08a15cbe447b5b0deeac16cccc22bf1c1c57.zip
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.
Diffstat (limited to 'Kernel/Graphics')
-rw-r--r--Kernel/Graphics/GraphicsManagement.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Graphics/GraphicsManagement.cpp b/Kernel/Graphics/GraphicsManagement.cpp
index d90af78e5e..f27533fd03 100644
--- a/Kernel/Graphics/GraphicsManagement.cpp
+++ b/Kernel/Graphics/GraphicsManagement.cpp
@@ -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()) {