diff options
author | Dave Airlie <airlied@redhat.com> | 2012-05-14 12:00:40 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-16 05:22:16 -0400 |
commit | 6cf20beec4b91c240cf759b4db72669e251f1fc4 (patch) | |
tree | 9a856d630cad0885f697de8d5b118aa94c7b69a7 | |
parent | f3b7e17c4bdc0b6675729ece8dd55ed94785f744 (diff) |
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 <mjg@redhat.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | arch/x86/pci/fixup.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 @@ | |||
7 | #include <linux/pci.h> | 7 | #include <linux/pci.h> |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <asm/pci_x86.h> | 9 | #include <asm/pci_x86.h> |
10 | #include <asm/vga.h> | ||
10 | 11 | ||
11 | static void __devinit pci_fixup_i450nx(struct pci_dev *d) | 12 | static void __devinit pci_fixup_i450nx(struct pci_dev *d) |
12 | { | 13 | { |
@@ -348,6 +349,8 @@ static void __devinit pci_fixup_video(struct pci_dev *pdev) | |||
348 | if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { | 349 | if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { |
349 | pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; | 350 | pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; |
350 | dev_printk(KERN_DEBUG, &pdev->dev, "Boot video device\n"); | 351 | dev_printk(KERN_DEBUG, &pdev->dev, "Boot video device\n"); |
352 | if (!vga_default_device()) | ||
353 | vga_set_default_device(pdev); | ||
351 | } | 354 | } |
352 | } | 355 | } |
353 | DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID, | 356 | DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID, |