From 6cf20beec4b91c240cf759b4db72669e251f1fc4 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 14 May 2012 17:00:40 +0100 Subject: x86/vga: set the default device from the fixup. Since Matthew's efi/vga changes on non-EFI machines we were failing to tell the vgaarb/switcheroo what the default device was, this sets the default device in the quirk if none has been set before. This fixes the switcheroo on my T410s. Cc: Matthew Garrett Acked-by: H. Peter Anvin Signed-off-by: Dave Airlie --- arch/x86/pci/fixup.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/x86/pci/fixup.c') diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index d0e6e403b4f6..01635537d72e 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c @@ -7,6 +7,7 @@ #include #include #include +#include static void __devinit pci_fixup_i450nx(struct pci_dev *d) { @@ -348,6 +349,8 @@ static void __devinit pci_fixup_video(struct pci_dev *pdev) if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; dev_printk(KERN_DEBUG, &pdev->dev, "Boot video device\n"); + if (!vga_default_device()) + vga_set_default_device(pdev); } } DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID, -- cgit v1.2.3-59-g8ed1b From db2e034d2c55e1f273ed820cc3edcdbc73d0292c Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 17 May 2012 08:31:29 +0100 Subject: x86/vga: fix build with efi disabled. Reported by sfr on -next merge. Signed-off-by: Dave Airlie --- arch/x86/pci/fixup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/x86/pci/fixup.c') diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index 01635537d72e..82487d3d5879 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c @@ -6,8 +6,8 @@ #include #include #include +#include #include -#include static void __devinit pci_fixup_i450nx(struct pci_dev *d) { -- cgit v1.2.3-59-g8ed1b