freebsd-skq/sys
dumbbell d96320dc31 MFC r259679:
vga_pci: Improve boot display detection

The previous code was checking the "VGA Enable" bit on the video card's
parent PCI-to-PCI bridge only. This didn't work for the case where the
video card is attached to the root PCI bus (ie. the card has no parent
PCI-to-PCI bridge).

Now, the new code:
    1. checks the "VGA Enable" bit on the parent bridge only if it's a
       PCI-to-PCI bridge;
    2. always checks the "I/O" and "Memory address space decoding" bits
       on the video card itself.

However, vendor-specific bits are not used.

This fixes the use of many integrated Radeon cards: without this patch,
we fail to detect them as the boot display and, when radeonkms looks for
the Video BIOS, it skips the shadow copy made by the System BIOS. It
then fails to fully initialize the card, because the shadow copy is the
only way to read the Video BIOS in these situations. A workaround was to
force the boot display selection using the "hw.pci.default_vgapci_unit"
tunable.

A previous version of this patch added a new function doing the checks.
Now, the vga_pci_is_boot_display() function is used to perform the
checks (only until the boot display is found) and return if the given
device is the boot display or not.

Furthermore, vga_pci_attach() logs "Boot video device" if the card being
attached it the Chosen One:
    vgapci0: <VGA-compatible display> [...]
    vgapci0: Boot video device

Reviewed by:	kib@, jhb@ (both a previous version)
Tested by:	lunatic_ (#freebsd-xorg, integrated Radeon card,
		xmj (#freebsd-xorg, i915+NVIDIA cards)
2013-12-22 21:09:43 +00:00
..
amd64 Merge r256868,257276-257277,257515,257913 from head. These are fixes 2013-12-18 05:20:53 +00:00
arm MFC r257228: 2013-12-17 13:38:21 +00:00
boot MFC r257518, r257519: 2013-12-13 22:46:10 +00:00
bsm Change the cap_rights_t type from uint64_t to a structure that we can extend 2013-09-05 00:09:56 +00:00
cam MFC r259108: 2013-12-22 13:02:34 +00:00
cddl MFC r259576: 2013-12-22 19:36:08 +00:00
compat MFC: r258718: fix emulated jail_v0 byte order 2013-12-04 18:25:04 +00:00
conf MFC DMAR busdma implementation. 2013-12-17 13:49:35 +00:00
contrib MFC r256470: 2013-10-21 06:31:56 +00:00
crypto MFC r258399,258492: 2013-11-26 08:46:39 +00:00
ddb
dev MFC r259679: 2013-12-22 21:09:43 +00:00
fs MFC r258088: 2013-12-17 13:10:28 +00:00
gdb rename scheduler->swapper and SI_SUB_RUN_SCHEDULER->SI_SUB_LAST 2013-07-24 09:45:31 +00:00
geom MFC r257965: 2013-12-14 04:16:27 +00:00
gnu/fs/reiserfs
i386 MFC DMAR busdma implementation. 2013-12-17 13:49:35 +00:00
ia64 MFC r257228: 2013-12-17 13:38:21 +00:00
isa
kern MFC r257228: 2013-12-17 13:38:21 +00:00
kgssapi Add support for host-based (Kerberos 5 service principal) initiator 2013-07-09 01:05:28 +00:00
libkern Fix ixp425 boot2 with ARM EABI: 2013-09-29 15:19:34 +00:00
mips MFC r257228: 2013-12-17 13:38:21 +00:00
modules MFC r258948: 2013-12-06 23:40:50 +00:00
net MFC r258692 (gnn). 2013-12-11 00:17:13 +00:00
net80211 Merge r257065 (by adrian) from head: 2013-12-10 13:42:59 +00:00
netatalk Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
netgraph Merge from project branch via main. Uninteresting commits are trimmed. 2013-10-12 15:31:36 +00:00
netinet MFC r258574: 2013-12-03 20:55:37 +00:00
netinet6 MFC r256556: 2013-11-21 23:00:09 +00:00
netipsec MFC r257987: 2013-12-14 04:24:32 +00:00
netipx
netnatm Fix the length calculation for the final block of a sendfile(2) 2013-09-10 10:05:59 +00:00
netpfil MFC r258588 2013-12-04 07:50:18 +00:00
netsmb Merge r257841 from head: 2013-11-14 09:19:50 +00:00
nfs Changes to allow using BOOTP_NFSROOT and mounting an nfs root filesystem 2013-07-31 19:14:00 +00:00
nfsclient A problem with the old NFS client where large writes to large files 2013-07-04 00:54:23 +00:00
nfsserver Change the cap_rights_t type from uint64_t to a structure that we can extend 2013-09-05 00:09:56 +00:00
nlm Intermittent crashes in the NLM (rpc.lockd) code during system 2013-09-06 23:14:31 +00:00
ofed Defer start/stop port to workqueues. 2013-12-19 07:33:07 +00:00
opencrypto Make sendfile() a method in the struct fileops. Currently only 2013-08-15 07:54:31 +00:00
pc98 MFC r258135: x86: Allow users to change PSL_RF via ptrace(PT_SETREGS...) 2013-11-25 15:58:48 +00:00
pci MFC r257306: 2013-11-04 05:58:59 +00:00
powerpc MFC r257228: 2013-12-17 13:38:21 +00:00
rpc It was reported via email that the cu_sent field used by the 2013-09-06 02:34:34 +00:00
security Fix some typos that were causing probe argument types to show up as unknown. 2013-10-01 15:40:27 +00:00
sparc64 MFC r257228: 2013-12-17 13:38:21 +00:00
sys MFC r257228: 2013-12-17 13:38:21 +00:00
teken
tools
ufs MFC r256448, r257029; 2013-12-11 19:25:17 +00:00
vm MFC r258039: 2013-12-17 09:21:56 +00:00
x86 MFC DMAR busdma implementation. 2013-12-17 13:49:35 +00:00
xdr
xen MFC r256746: 2013-10-18 17:08:23 +00:00
Makefile