Bruno Prémont 20cde69402 x86, ia64: Move EFI_FB vga_default_device() initialization to pci_vga_fixup()
Commit b4aa0163056b ("efifb: Implement vga_default_device() (v2)") added
efifb vga_default_device() so EFI systems that do not load shadow VBIOS or
setup VGA get proper value for boot_vga PCI sysfs attribute on the
corresponding PCI device.

Xorg doesn't detect devices when boot_vga=0, e.g., on some EFI systems such
as MacBookAir2,1.  Xorg detects the GPU and finds the DRI device but then
bails out with "no devices detected".

Note: When vga_default_device() is set boot_vga PCI sysfs attribute
reflects its state.  When unset this attribute is 1 whenever
IORESOURCE_ROM_SHADOW flag is set.

With introduction of sysfb/simplefb/simpledrm efifb is getting obsolete
while having native drivers for the GPU also makes selecting sysfb/efifb
optional.

Remove the efifb implementation of vga_default_device() and initialize
vgaarb's vga_default_device() with the PCI GPU that matches boot
screen_info in pci_fixup_video().

[bhelgaas: remove unused "dev" in efifb_setup()]
Fixes: b4aa0163056b ("efifb: Implement vga_default_device() (v2)")
Tested-by: Anibal Francisco Martinez Cortina <linuxkid.zeuz@gmail.com>
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Matthew Garrett <matthew.garrett@nebula.com>
CC: stable@vger.kernel.org	# v3.5+
2014-07-10 16:48:48 -06:00
..
2014-04-18 14:20:46 +02:00
2014-04-18 14:20:46 +02:00
2014-04-18 14:20:46 +02:00
2012-03-28 18:11:12 +01:00
2013-04-25 10:39:04 +02:00
2011-05-02 17:24:48 +02:00
2014-05-02 11:34:17 -07:00
2012-03-28 18:11:12 +01:00
2010-02-16 21:22:26 -08:00
2014-03-04 21:47:51 +01:00
2011-04-18 09:26:48 -07:00
2012-03-20 21:48:30 +08:00
2014-05-08 08:15:34 +02:00
2013-08-05 06:35:33 -07:00
2013-02-03 18:16:27 -05:00
2014-05-16 14:05:19 +02:00
2014-04-07 16:36:15 -07:00
2010-10-26 16:52:08 -07:00
2012-06-25 13:48:30 +02:00
2014-04-07 16:36:15 -07:00
2014-05-22 17:47:17 +02:00
2011-07-22 14:39:50 +09:30
2013-04-22 15:45:03 +09:30
2010-06-09 11:12:36 +02:00
2014-02-27 08:07:39 -08:00
2014-02-27 08:07:39 -08:00
2014-04-07 16:36:13 -07:00
2014-04-07 16:36:13 -07:00
2011-03-15 15:34:15 -07:00
2013-10-09 20:04:08 -05:00
2012-02-20 12:52:05 -08:00
2014-06-06 16:08:11 -07:00
2014-06-04 16:53:57 -07:00
2014-04-18 14:20:46 +02:00
2012-03-28 18:11:12 +01:00
2014-02-24 12:14:00 +01:00