linux/arch/x86/pci
Bruno Prémont 86fd887b7f vgaarb: Don't default exclusively to first video device with mem+io
Commit 20cde69402 ("x86, ia64: Move EFI_FB vga_default_device()
initialization to pci_vga_fixup()") moved boot video device detection from
efifb to x86 and ia64 pci/fixup.c.

For dual-GPU Apple computers above change represents a regression as code
in efifb did forcefully override vga_default_device while the merge did not
(vgaarb happens prior to PCI fixup).

To improve on initial device selection by vgaarb (it cannot know if PCI
device not behind bridges see/decode legacy VGA I/O or not), move the
screen_info based check from pci_video_fixup() to vgaarb's init function and
use it to refine/override decision taken while adding the individual PCI
VGA devices.  This way PCI fixup has no reason to adjust vga_default_device
anymore but can depend on its value for flagging shadowed VBIOS.

This has the nice benefit of removing duplicated code but does introduce a
#if defined() block in vgaarb.  Not all architectures have screen_info and
would cause compile to fail without it.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=84461
Reported-and-Tested-By: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Matthew Garrett <matthew.garrett@nebula.com>
CC: stable@vger.kernel.org # v3.5+
2014-09-16 13:06:18 -06:00
..
acpi.c x86, PCI, ACPI: Use kmalloc_node() to optimize for performance 2014-06-21 23:05:40 +02:00
amd_bus.c x86/PCI: Clean up and mark early_root_info_init() as deprecated 2014-05-27 10:47:49 -06:00
broadcom_bus.c x86/PCI: Fix Broadcom CNB20LE unintended sign extension 2014-04-25 11:01:08 -06:00
bus_numa.c x86/PCI: Remove unnecessary list_empty(&pci_root_infos) check 2014-02-03 10:38:52 -07:00
bus_numa.h x86/PCI: put busn resource in pci_root_info for native host bridge drivers 2012-06-13 15:42:24 -06:00
ce4100.c x86/ce4100: Fix PCI configuration register access for devices without interrupts 2012-10-30 10:16:47 +01:00
common.c Merge branch 'x86-nuke-platforms-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-02 13:15:58 -07:00
direct.c x86: constify PCI raw ops structures 2011-10-14 09:05:28 -07:00
early.c x86/PCI: remove early PCI pr_debug statements 2009-11-24 15:25:19 -08:00
fixup.c vgaarb: Don't default exclusively to first video device with mem+io 2014-09-16 13:06:18 -06:00
i386.c x86: don't exclude low BIOS area when allocating address space for non-PCI cards 2014-07-16 12:29:36 -06:00
init.c x86, olpc: Use pci subarch init for OLPC 2010-02-25 19:26:23 -08:00
intel_mid_pci.c x86, irq, PCI: Keep IRQ assignment for PCI devices during suspend/hibernation 2014-08-08 11:14:45 +02:00
irq.c x86, irq, PCI: Keep IRQ assignment for PCI devices during suspend/hibernation 2014-08-08 11:14:45 +02:00
legacy.c x86/PCI: Use pcibios_scan_root() instead of pci_scan_bus_on_node() 2014-02-03 10:38:18 -07:00
Makefile x86, platforms: Remove NUMAQ 2014-02-27 08:07:39 -08:00
mmconfig_32.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
mmconfig_64.c X86: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mmconfig-shared.c SFI / ACPI: Fix warnings reported during builds with W=1 2013-12-07 01:24:33 +01:00
numachip.c x86/PCI: Add NumaChip remote PCI support 2012-12-07 14:24:32 -07:00
olpc.c x86: constify PCI raw ops structures 2011-10-14 09:05:28 -07:00
pcbios.c X86: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
sta2x11-fixup.c x86: enable DMA CMA with swiotlb 2014-06-04 16:53:57 -07:00
xen.c x86, irq: Count legacy IRQs by legacy_pic->nr_legacy_irqs instead of NR_IRQS_LEGACY 2014-06-21 23:05:42 +02:00