Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+3
+3
arch/x86/pci/fixup.c
··· 7 7 #include <linux/pci.h> 8 8 #include <linux/init.h> 9 9 #include <asm/pci_x86.h> 10 + #include <asm/vga.h> 10 11 11 12 static void __devinit pci_fixup_i450nx(struct pci_dev *d) 12 13 { ··· 349 348 if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { 350 349 pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; 351 350 dev_printk(KERN_DEBUG, &pdev->dev, "Boot video device\n"); 351 + if (!vga_default_device()) 352 + vga_set_default_device(pdev); 352 353 } 353 354 } 354 355 DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,