@@ -54,8 +54,10 @@ static void pci_fixup_video(struct pci_dev *pdev)
continue;
if (screen_info.lfb_base >= start &&
- (screen_info.lfb_base + screen_info.lfb_size) < end)
+ (screen_info.lfb_base + screen_info.lfb_size) < end) {
+ dev_printk(KERN_DEBUG, &pdev->dev, "Boot video device\n");
vga_set_default_device(pdev);
+ }
}
}
@@ -79,12 +81,11 @@ static void pci_fixup_video(struct pci_dev *pdev)
}
bus = bus->parent;
}
- if (!vga_default_device() || pdev == vga_default_device()) {
+ if (pdev == vga_default_device()) {
pci_read_config_word(pdev, PCI_COMMAND, &config);
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");
- vga_set_default_device(pdev);
+ dev_printk(KERN_DEBUG, &pdev->dev, "Video device with shadowed ROM\n");
}
}
}
@@ -342,8 +342,10 @@ static void pci_fixup_video(struct pci_dev *pdev)
continue;
if (screen_info.lfb_base >= start &&
- (screen_info.lfb_base + screen_info.lfb_size) < end)
+ (screen_info.lfb_base + screen_info.lfb_size) < end) {
+ dev_printk(KERN_DEBUG, &pdev->dev, "Boot video device\n");
vga_set_default_device(pdev);
+ }
}
}
@@ -367,12 +369,11 @@ static void pci_fixup_video(struct pci_dev *pdev)
}
bus = bus->parent;
}
- if (!vga_default_device() || pdev == vga_default_device()) {
+ if (pdev == vga_default_device()) {
pci_read_config_word(pdev, PCI_COMMAND, &config);
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");
- vga_set_default_device(pdev);
+ dev_printk(KERN_DEBUG, &pdev->dev, "Video device with shadowed ROM\n");
}
}
}
@@ -580,8 +580,10 @@ static bool vga_arbiter_add_pci_device(struct pci_dev *pdev)
* by default if arch doesn't have it's own hook
*/
if (vga_default == NULL &&
- ((vgadev->owns & VGA_RSRC_LEGACY_MASK) == VGA_RSRC_LEGACY_MASK))
+ ((vgadev->owns & VGA_RSRC_LEGACY_MASK) == VGA_RSRC_LEGACY_MASK)) {
+ pr_info("vgaarb: Boot video device: PCI:%s\n", pci_name(pdev));
vga_set_default_device(pdev);
+ }
vga_arbiter_check_bridge_sharing(vgadev);