1
0
Fork 0
alistair23-linux/drivers/gpu/vga
Bjorn Helgaas 505a1b5717 vgaarb: Factor out EFI and fallback default device selection
The default VGA device is normally set in vga_arbiter_add_pci_device() when
we call it for the first enabled device that can be accessed with the
legacy VGA resources ([mem 0xa0000-0xbffff], etc.)

That default device can be overridden by an EFI device that owns the boot
framebuffer.  As a fallback, we can also select a VGA device that can't be
accessed via legacy VGA resources, or a VGA device that isn't even enabled.

Factor out this EFI and fallback selection from vga_arb_device_init() into
a separate vga_arb_select_default_device() function.  This doesn't change
any behavior, but it untangles the "bridge control possible" checking and
messages from the default device selection.

Tested-by: Zhou Wang <wangzhou1@hisilicon.com>  # D05 Hisi Hip07, Hip08
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171013034729.14630.30419.stgit@bhelgaas-glaptop.roam.corp.google.com
2017-10-18 10:04:56 +02:00
..
Kconfig vga: compile fix, disable vga for s390 2012-11-30 17:47:28 +01:00
Makefile vga_switcheroo: initial implementation (v15) 2010-03-01 16:20:37 +10:00
vga_switcheroo.c drivers:gpu: vga :vga_switcheroo.c : Fixed some coding style issues 2017-03-01 09:45:28 +01:00
vgaarb.c vgaarb: Factor out EFI and fallback default device selection 2017-10-18 10:04:56 +02:00