PCI/VGA: Log bridge control messages when adding devices
authorHuacai Chen <chenhuacai@loongson.cn>
Thu, 24 Feb 2022 22:47:51 +0000 (16:47 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 10 Mar 2022 00:31:28 +0000 (18:31 -0600)
commit4e6c91847a7fa94a6a0caeeb388718b8ae005d56
treed4f7cd8f995d0e4a27d932918641e8183727a08b
parentdc593fd48abbea1e840c847c464eabc9c6bca180
PCI/VGA: Log bridge control messages when adding devices

Previously vga_arb_device_init() iterated through all VGA devices and
indicated whether legacy VGA routing to each could be controlled by an
upstream bridge.

But we determine that information in vga_arbiter_add_pci_device(), which we
call for every device, so we can log it there without iterating through the
VGA devices again.

Note that we call vga_arbiter_check_bridge_sharing() before adding the
device to vga_list, so we have to handle the very first device separately.

Link: https://lore.kernel.org/r/20220224224753.297579-10-helgaas@kernel.org
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/vgaarb.c