diff options
author | Huacai Chen <chenhuacai@loongson.cn> | 2022-02-24 23:47:47 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2022-03-10 01:31:08 +0100 |
commit | f8d81df285a2fa2e739a9e4774e413ac778d282c (patch) | |
tree | 95ceecd550dce11aba828003c44ea07c7ce57733 /security/min_addr.c | |
parent | PCI/VGA: Factor out default VGA device selection (diff) | |
download | linux-f8d81df285a2fa2e739a9e4774e413ac778d282c.tar.xz linux-f8d81df285a2fa2e739a9e4774e413ac778d282c.zip |
PCI/VGA: Move firmware default device detection to ADD_DEVICE path
Previously we selected the firmware default device, i.e., one that owns the
boot framebuffer, as the default device in vga_arb_select_default_device().
This was only done in the vga_arb_device_init() subsys_initcall, so devices
enumerated later, e.g., by pcibios_init(), were not eligible.
Fix this by moving the firmware default device selection from
vga_arb_select_default_device() to vga_arbiter_add_pci_device(), which is
called after every PCI device is enumerated, either by the
vga_arb_device_init() subsys_initcall or as an ADD_DEVICE notifier.
Note that if vga_arb_select_default_device() previously found a device
owning the boot framebuffer, it unconditionally set it to be the default
VGA device, and no subsequent device could replace it.
[bhelgaas: commit log, restructure slightly]
Link: https://lore.kernel.org/r/20211015061512.2941859-7-chenhuacai@loongson.cn
Link: https://lore.kernel.org/r/20220224224753.297579-6-helgaas@kernel.org
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Bruno Prémont <bonbons@linux-vserver.org>
Diffstat (limited to 'security/min_addr.c')
0 files changed, 0 insertions, 0 deletions