summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2014-07-12 23:16:24 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2014-07-12 23:16:24 +0000
commit39ba5aaf8b5185dba439b447169202b06adab619 (patch)
tree6958569dbbfa1760f261d25fda6689b76b45a39c /sys
parent315d950a1731cf68ed9d394f2190b9411186ff54 (diff)
Print a line in dmesg to indicate if the aperture driver is
required to run X. This will be used by the installer to decide what value to set machdep.allowaperture to. For devices supported by i915 and radeon kms machdep.allowaperture will be set to 0. Systems that have a graphics device commonly found in servers (g200e*/aspeed/es1000 etc) will also not have the aperture enabled as they generally don't need to run X. ok deraadt@ kettenis@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/i915/Makefile7
-rw-r--r--sys/dev/pci/drm/i915/devlist.awk11
-rw-r--r--sys/dev/pci/drm/i915/i915_devlist.h107
-rw-r--r--sys/dev/pci/drm/radeon/Makefile7
-rw-r--r--sys/dev/pci/drm/radeon/devlist.awk11
-rw-r--r--sys/dev/pci/drm/radeon/radeon_devlist.h602
-rw-r--r--sys/dev/pci/vga_pci.c45
7 files changed, 788 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/i915/Makefile b/sys/dev/pci/drm/i915/Makefile
new file mode 100644
index 00000000000..04fcb527b6a
--- /dev/null
+++ b/sys/dev/pci/drm/i915/Makefile
@@ -0,0 +1,7 @@
+# $OpenBSD: Makefile,v 1.1 2014/07/12 23:16:23 jsg Exp $
+
+AWK= awk
+
+i915_devlist.h: i915_drv.c devlist.awk
+ /bin/rm -f i915_devlist.h
+ ${AWK} -f devlist.awk i915_drv.c > i915_devlist.h
diff --git a/sys/dev/pci/drm/i915/devlist.awk b/sys/dev/pci/drm/i915/devlist.awk
new file mode 100644
index 00000000000..fd05f021e48
--- /dev/null
+++ b/sys/dev/pci/drm/i915/devlist.awk
@@ -0,0 +1,11 @@
+BEGIN {
+ print("/* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. */");
+ print("static const struct pci_matchid i915_devices[] = {");
+}
+/INTEL_VGA_DEVICE\(0x/ {
+ val = substr($0, 19, 5);
+ print "\t{ 0x8086,", val " },";
+}
+END {
+ print("};");
+}
diff --git a/sys/dev/pci/drm/i915/i915_devlist.h b/sys/dev/pci/drm/i915/i915_devlist.h
new file mode 100644
index 00000000000..44d5c6097be
--- /dev/null
+++ b/sys/dev/pci/drm/i915/i915_devlist.h
@@ -0,0 +1,107 @@
+/* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. */
+static const struct pci_matchid i915_devices[] = {
+ { 0x8086, 0x357 },
+ { 0x8086, 0x256 },
+ { 0x8086, 0x358 },
+ { 0x8086, 0x358 },
+ { 0x8086, 0x257 },
+ { 0x8086, 0x258 },
+ { 0x8086, 0x258 },
+ { 0x8086, 0x259 },
+ { 0x8086, 0x277 },
+ { 0x8086, 0x27a },
+ { 0x8086, 0x27a },
+ { 0x8086, 0x297 },
+ { 0x8086, 0x298 },
+ { 0x8086, 0x299 },
+ { 0x8086, 0x29a },
+ { 0x8086, 0x29b },
+ { 0x8086, 0x29c },
+ { 0x8086, 0x29d },
+ { 0x8086, 0x2a0 },
+ { 0x8086, 0x2a1 },
+ { 0x8086, 0x2a4 },
+ { 0x8086, 0x2e0 },
+ { 0x8086, 0x2e1 },
+ { 0x8086, 0x2e2 },
+ { 0x8086, 0x2e3 },
+ { 0x8086, 0x2e4 },
+ { 0x8086, 0x2e9 },
+ { 0x8086, 0xa00 },
+ { 0x8086, 0xa01 },
+ { 0x8086, 0x004 },
+ { 0x8086, 0x004 },
+ { 0x8086, 0x010 },
+ { 0x8086, 0x011 },
+ { 0x8086, 0x012 },
+ { 0x8086, 0x010 },
+ { 0x8086, 0x011 },
+ { 0x8086, 0x012 },
+ { 0x8086, 0x010 },
+ { 0x8086, 0x015 },
+ { 0x8086, 0x016 },
+ { 0x8086, 0x015 },
+ { 0x8086, 0x016 },
+ { 0x8086, 0x015 },
+ { 0x8086, 0x016 },
+ { 0x8086, 0x040 },
+ { 0x8086, 0x041 },
+ { 0x8086, 0x042 },
+ { 0x8086, 0x040 },
+ { 0x8086, 0x041 },
+ { 0x8086, 0x042 },
+ { 0x8086, 0x040 },
+ { 0x8086, 0x041 },
+ { 0x8086, 0x042 },
+ { 0x8086, 0x040 },
+ { 0x8086, 0x041 },
+ { 0x8086, 0x042 },
+ { 0x8086, 0x040 },
+ { 0x8086, 0x041 },
+ { 0x8086, 0x042 },
+ { 0x8086, 0x0C0 },
+ { 0x8086, 0x0C1 },
+ { 0x8086, 0x0C2 },
+ { 0x8086, 0x0C0 },
+ { 0x8086, 0x0C1 },
+ { 0x8086, 0x0C2 },
+ { 0x8086, 0x0C0 },
+ { 0x8086, 0x0C1 },
+ { 0x8086, 0x0C2 },
+ { 0x8086, 0x0C0 },
+ { 0x8086, 0x0C1 },
+ { 0x8086, 0x0C2 },
+ { 0x8086, 0x0C0 },
+ { 0x8086, 0x0C1 },
+ { 0x8086, 0x0C2 },
+ { 0x8086, 0x0A0 },
+ { 0x8086, 0x0A1 },
+ { 0x8086, 0x0A2 },
+ { 0x8086, 0x0A0 },
+ { 0x8086, 0x0A1 },
+ { 0x8086, 0x0A2 },
+ { 0x8086, 0x0A0 },
+ { 0x8086, 0x0A1 },
+ { 0x8086, 0x0A2 },
+ { 0x8086, 0x0A0 },
+ { 0x8086, 0x0A1 },
+ { 0x8086, 0x0A2 },
+ { 0x8086, 0x0A0 },
+ { 0x8086, 0x0A1 },
+ { 0x8086, 0x0A2 },
+ { 0x8086, 0x0D0 },
+ { 0x8086, 0x0D1 },
+ { 0x8086, 0x0D2 },
+ { 0x8086, 0x0D0 },
+ { 0x8086, 0x0D1 },
+ { 0x8086, 0x0D2 },
+ { 0x8086, 0x0D0 },
+ { 0x8086, 0x0D1 },
+ { 0x8086, 0x0D2 },
+ { 0x8086, 0x0D0 },
+ { 0x8086, 0x0D1 },
+ { 0x8086, 0x0D2 },
+ { 0x8086, 0x0D0 },
+ { 0x8086, 0x0D1 },
+ { 0x8086, 0x0D2 },
+};
diff --git a/sys/dev/pci/drm/radeon/Makefile b/sys/dev/pci/drm/radeon/Makefile
new file mode 100644
index 00000000000..7f51c265398
--- /dev/null
+++ b/sys/dev/pci/drm/radeon/Makefile
@@ -0,0 +1,7 @@
+# $OpenBSD: Makefile,v 1.1 2014/07/12 23:16:23 jsg Exp $
+
+AWK= awk
+
+radeon_devlist.h: ../drm_pciids.h devlist.awk
+ /bin/rm -f radeon_devlist.h
+ ${AWK} -f devlist.awk ../drm_pciids.h > radeon_devlist.h
diff --git a/sys/dev/pci/drm/radeon/devlist.awk b/sys/dev/pci/drm/radeon/devlist.awk
new file mode 100644
index 00000000000..ab21768bdfb
--- /dev/null
+++ b/sys/dev/pci/drm/radeon/devlist.awk
@@ -0,0 +1,11 @@
+BEGIN {
+ print("/* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. */");
+ print("static const struct pci_matchid radeon_devices[] = {");
+}
+/0, CHIP/ {
+ val = substr($0, 3, 14);
+ printf("\t{ " val " },\n");
+}
+END {
+ print("};");
+}
diff --git a/sys/dev/pci/drm/radeon/radeon_devlist.h b/sys/dev/pci/drm/radeon/radeon_devlist.h
new file mode 100644
index 00000000000..67edd716f53
--- /dev/null
+++ b/sys/dev/pci/drm/radeon/radeon_devlist.h
@@ -0,0 +1,602 @@
+/* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. */
+static const struct pci_matchid radeon_devices[] = {
+ { 0x1002, 0x3150 },
+ { 0x1002, 0x3151 },
+ { 0x1002, 0x3152 },
+ { 0x1002, 0x3154 },
+ { 0x1002, 0x3155 },
+ { 0x1002, 0x3E50 },
+ { 0x1002, 0x3E54 },
+ { 0x1002, 0x4136 },
+ { 0x1002, 0x4137 },
+ { 0x1002, 0x4144 },
+ { 0x1002, 0x4145 },
+ { 0x1002, 0x4146 },
+ { 0x1002, 0x4147 },
+ { 0x1002, 0x4148 },
+ { 0x1002, 0x4149 },
+ { 0x1002, 0x414A },
+ { 0x1002, 0x414B },
+ { 0x1002, 0x4150 },
+ { 0x1002, 0x4151 },
+ { 0x1002, 0x4152 },
+ { 0x1002, 0x4153 },
+ { 0x1002, 0x4154 },
+ { 0x1002, 0x4155 },
+ { 0x1002, 0x4156 },
+ { 0x1002, 0x4237 },
+ { 0x1002, 0x4242 },
+ { 0x1002, 0x4336 },
+ { 0x1002, 0x4337 },
+ { 0x1002, 0x4437 },
+ { 0x1002, 0x4966 },
+ { 0x1002, 0x4967 },
+ { 0x1002, 0x4A48 },
+ { 0x1002, 0x4A49 },
+ { 0x1002, 0x4A4A },
+ { 0x1002, 0x4A4B },
+ { 0x1002, 0x4A4C },
+ { 0x1002, 0x4A4D },
+ { 0x1002, 0x4A4E },
+ { 0x1002, 0x4A4F },
+ { 0x1002, 0x4A50 },
+ { 0x1002, 0x4A54 },
+ { 0x1002, 0x4B48 },
+ { 0x1002, 0x4B49 },
+ { 0x1002, 0x4B4A },
+ { 0x1002, 0x4B4B },
+ { 0x1002, 0x4B4C },
+ { 0x1002, 0x4C57 },
+ { 0x1002, 0x4C58 },
+ { 0x1002, 0x4C59 },
+ { 0x1002, 0x4C5A },
+ { 0x1002, 0x4C64 },
+ { 0x1002, 0x4C66 },
+ { 0x1002, 0x4C67 },
+ { 0x1002, 0x4C6E },
+ { 0x1002, 0x4E44 },
+ { 0x1002, 0x4E45 },
+ { 0x1002, 0x4E46 },
+ { 0x1002, 0x4E47 },
+ { 0x1002, 0x4E48 },
+ { 0x1002, 0x4E49 },
+ { 0x1002, 0x4E4A },
+ { 0x1002, 0x4E4B },
+ { 0x1002, 0x4E50 },
+ { 0x1002, 0x4E51 },
+ { 0x1002, 0x4E52 },
+ { 0x1002, 0x4E53 },
+ { 0x1002, 0x4E54 },
+ { 0x1002, 0x4E56 },
+ { 0x1002, 0x5144 },
+ { 0x1002, 0x5145 },
+ { 0x1002, 0x5146 },
+ { 0x1002, 0x5147 },
+ { 0x1002, 0x5148 },
+ { 0x1002, 0x514C },
+ { 0x1002, 0x514D },
+ { 0x1002, 0x5157 },
+ { 0x1002, 0x5158 },
+ { 0x1002, 0x5159 },
+ { 0x1002, 0x515A },
+ { 0x1002, 0x515E },
+ { 0x1002, 0x5460 },
+ { 0x1002, 0x5462 },
+ { 0x1002, 0x5464 },
+ { 0x1002, 0x5548 },
+ { 0x1002, 0x5549 },
+ { 0x1002, 0x554A },
+ { 0x1002, 0x554B },
+ { 0x1002, 0x554C },
+ { 0x1002, 0x554D },
+ { 0x1002, 0x554E },
+ { 0x1002, 0x554F },
+ { 0x1002, 0x5550 },
+ { 0x1002, 0x5551 },
+ { 0x1002, 0x5552 },
+ { 0x1002, 0x5554 },
+ { 0x1002, 0x564A },
+ { 0x1002, 0x564B },
+ { 0x1002, 0x564F },
+ { 0x1002, 0x5652 },
+ { 0x1002, 0x5653 },
+ { 0x1002, 0x5657 },
+ { 0x1002, 0x5834 },
+ { 0x1002, 0x5835 },
+ { 0x1002, 0x5954 },
+ { 0x1002, 0x5955 },
+ { 0x1002, 0x5974 },
+ { 0x1002, 0x5975 },
+ { 0x1002, 0x5960 },
+ { 0x1002, 0x5961 },
+ { 0x1002, 0x5962 },
+ { 0x1002, 0x5964 },
+ { 0x1002, 0x5965 },
+ { 0x1002, 0x5969 },
+ { 0x1002, 0x5a41 },
+ { 0x1002, 0x5a42 },
+ { 0x1002, 0x5a61 },
+ { 0x1002, 0x5a62 },
+ { 0x1002, 0x5b60 },
+ { 0x1002, 0x5b62 },
+ { 0x1002, 0x5b63 },
+ { 0x1002, 0x5b64 },
+ { 0x1002, 0x5b65 },
+ { 0x1002, 0x5c61 },
+ { 0x1002, 0x5c63 },
+ { 0x1002, 0x5d48 },
+ { 0x1002, 0x5d49 },
+ { 0x1002, 0x5d4a },
+ { 0x1002, 0x5d4c },
+ { 0x1002, 0x5d4d },
+ { 0x1002, 0x5d4e },
+ { 0x1002, 0x5d4f },
+ { 0x1002, 0x5d50 },
+ { 0x1002, 0x5d52 },
+ { 0x1002, 0x5d57 },
+ { 0x1002, 0x5e48 },
+ { 0x1002, 0x5e4a },
+ { 0x1002, 0x5e4b },
+ { 0x1002, 0x5e4c },
+ { 0x1002, 0x5e4d },
+ { 0x1002, 0x5e4f },
+ { 0x1002, 0x6700 },
+ { 0x1002, 0x6701 },
+ { 0x1002, 0x6702 },
+ { 0x1002, 0x6703 },
+ { 0x1002, 0x6704 },
+ { 0x1002, 0x6705 },
+ { 0x1002, 0x6706 },
+ { 0x1002, 0x6707 },
+ { 0x1002, 0x6708 },
+ { 0x1002, 0x6709 },
+ { 0x1002, 0x6718 },
+ { 0x1002, 0x6719 },
+ { 0x1002, 0x671c },
+ { 0x1002, 0x671d },
+ { 0x1002, 0x671f },
+ { 0x1002, 0x6720 },
+ { 0x1002, 0x6721 },
+ { 0x1002, 0x6722 },
+ { 0x1002, 0x6723 },
+ { 0x1002, 0x6724 },
+ { 0x1002, 0x6725 },
+ { 0x1002, 0x6726 },
+ { 0x1002, 0x6727 },
+ { 0x1002, 0x6728 },
+ { 0x1002, 0x6729 },
+ { 0x1002, 0x6738 },
+ { 0x1002, 0x6739 },
+ { 0x1002, 0x673e },
+ { 0x1002, 0x6740 },
+ { 0x1002, 0x6741 },
+ { 0x1002, 0x6742 },
+ { 0x1002, 0x6743 },
+ { 0x1002, 0x6744 },
+ { 0x1002, 0x6745 },
+ { 0x1002, 0x6746 },
+ { 0x1002, 0x6747 },
+ { 0x1002, 0x6748 },
+ { 0x1002, 0x6749 },
+ { 0x1002, 0x674A },
+ { 0x1002, 0x6750 },
+ { 0x1002, 0x6751 },
+ { 0x1002, 0x6758 },
+ { 0x1002, 0x6759 },
+ { 0x1002, 0x675B },
+ { 0x1002, 0x675D },
+ { 0x1002, 0x675F },
+ { 0x1002, 0x6760 },
+ { 0x1002, 0x6761 },
+ { 0x1002, 0x6762 },
+ { 0x1002, 0x6763 },
+ { 0x1002, 0x6764 },
+ { 0x1002, 0x6765 },
+ { 0x1002, 0x6766 },
+ { 0x1002, 0x6767 },
+ { 0x1002, 0x6768 },
+ { 0x1002, 0x6770 },
+ { 0x1002, 0x6771 },
+ { 0x1002, 0x6772 },
+ { 0x1002, 0x6778 },
+ { 0x1002, 0x6779 },
+ { 0x1002, 0x677B },
+ { 0x1002, 0x6780 },
+ { 0x1002, 0x6784 },
+ { 0x1002, 0x6788 },
+ { 0x1002, 0x678A },
+ { 0x1002, 0x6790 },
+ { 0x1002, 0x6791 },
+ { 0x1002, 0x6792 },
+ { 0x1002, 0x6798 },
+ { 0x1002, 0x6799 },
+ { 0x1002, 0x679A },
+ { 0x1002, 0x679B },
+ { 0x1002, 0x679E },
+ { 0x1002, 0x679F },
+ { 0x1002, 0x6800 },
+ { 0x1002, 0x6801 },
+ { 0x1002, 0x6802 },
+ { 0x1002, 0x6806 },
+ { 0x1002, 0x6808 },
+ { 0x1002, 0x6809 },
+ { 0x1002, 0x6810 },
+ { 0x1002, 0x6811 },
+ { 0x1002, 0x6816 },
+ { 0x1002, 0x6817 },
+ { 0x1002, 0x6818 },
+ { 0x1002, 0x6819 },
+ { 0x1002, 0x6820 },
+ { 0x1002, 0x6821 },
+ { 0x1002, 0x6822 },
+ { 0x1002, 0x6823 },
+ { 0x1002, 0x6824 },
+ { 0x1002, 0x6825 },
+ { 0x1002, 0x6826 },
+ { 0x1002, 0x6827 },
+ { 0x1002, 0x6828 },
+ { 0x1002, 0x6829 },
+ { 0x1002, 0x682A },
+ { 0x1002, 0x682B },
+ { 0x1002, 0x682D },
+ { 0x1002, 0x682F },
+ { 0x1002, 0x6830 },
+ { 0x1002, 0x6831 },
+ { 0x1002, 0x6835 },
+ { 0x1002, 0x6837 },
+ { 0x1002, 0x6838 },
+ { 0x1002, 0x6839 },
+ { 0x1002, 0x683B },
+ { 0x1002, 0x683D },
+ { 0x1002, 0x683F },
+ { 0x1002, 0x6840 },
+ { 0x1002, 0x6841 },
+ { 0x1002, 0x6842 },
+ { 0x1002, 0x6843 },
+ { 0x1002, 0x6849 },
+ { 0x1002, 0x684C },
+ { 0x1002, 0x6850 },
+ { 0x1002, 0x6858 },
+ { 0x1002, 0x6859 },
+ { 0x1002, 0x6880 },
+ { 0x1002, 0x6888 },
+ { 0x1002, 0x6889 },
+ { 0x1002, 0x688A },
+ { 0x1002, 0x688C },
+ { 0x1002, 0x688D },
+ { 0x1002, 0x6898 },
+ { 0x1002, 0x6899 },
+ { 0x1002, 0x689b },
+ { 0x1002, 0x689c },
+ { 0x1002, 0x689d },
+ { 0x1002, 0x689e },
+ { 0x1002, 0x68a0 },
+ { 0x1002, 0x68a1 },
+ { 0x1002, 0x68a8 },
+ { 0x1002, 0x68a9 },
+ { 0x1002, 0x68b0 },
+ { 0x1002, 0x68b8 },
+ { 0x1002, 0x68b9 },
+ { 0x1002, 0x68ba },
+ { 0x1002, 0x68be },
+ { 0x1002, 0x68bf },
+ { 0x1002, 0x68c0 },
+ { 0x1002, 0x68c1 },
+ { 0x1002, 0x68c7 },
+ { 0x1002, 0x68c8 },
+ { 0x1002, 0x68c9 },
+ { 0x1002, 0x68d8 },
+ { 0x1002, 0x68d9 },
+ { 0x1002, 0x68da },
+ { 0x1002, 0x68de },
+ { 0x1002, 0x68e0 },
+ { 0x1002, 0x68e1 },
+ { 0x1002, 0x68e4 },
+ { 0x1002, 0x68e5 },
+ { 0x1002, 0x68e8 },
+ { 0x1002, 0x68e9 },
+ { 0x1002, 0x68f1 },
+ { 0x1002, 0x68f2 },
+ { 0x1002, 0x68f8 },
+ { 0x1002, 0x68f9 },
+ { 0x1002, 0x68fa },
+ { 0x1002, 0x68fe },
+ { 0x1002, 0x7100 },
+ { 0x1002, 0x7101 },
+ { 0x1002, 0x7102 },
+ { 0x1002, 0x7103 },
+ { 0x1002, 0x7104 },
+ { 0x1002, 0x7105 },
+ { 0x1002, 0x7106 },
+ { 0x1002, 0x7108 },
+ { 0x1002, 0x7109 },
+ { 0x1002, 0x710A },
+ { 0x1002, 0x710B },
+ { 0x1002, 0x710C },
+ { 0x1002, 0x710E },
+ { 0x1002, 0x710F },
+ { 0x1002, 0x7140 },
+ { 0x1002, 0x7141 },
+ { 0x1002, 0x7142 },
+ { 0x1002, 0x7143 },
+ { 0x1002, 0x7144 },
+ { 0x1002, 0x7145 },
+ { 0x1002, 0x7146 },
+ { 0x1002, 0x7147 },
+ { 0x1002, 0x7149 },
+ { 0x1002, 0x714A },
+ { 0x1002, 0x714B },
+ { 0x1002, 0x714C },
+ { 0x1002, 0x714D },
+ { 0x1002, 0x714E },
+ { 0x1002, 0x714F },
+ { 0x1002, 0x7151 },
+ { 0x1002, 0x7152 },
+ { 0x1002, 0x7153 },
+ { 0x1002, 0x715E },
+ { 0x1002, 0x715F },
+ { 0x1002, 0x7180 },
+ { 0x1002, 0x7181 },
+ { 0x1002, 0x7183 },
+ { 0x1002, 0x7186 },
+ { 0x1002, 0x7187 },
+ { 0x1002, 0x7188 },
+ { 0x1002, 0x718A },
+ { 0x1002, 0x718B },
+ { 0x1002, 0x718C },
+ { 0x1002, 0x718D },
+ { 0x1002, 0x718F },
+ { 0x1002, 0x7193 },
+ { 0x1002, 0x7196 },
+ { 0x1002, 0x719B },
+ { 0x1002, 0x719F },
+ { 0x1002, 0x71C0 },
+ { 0x1002, 0x71C1 },
+ { 0x1002, 0x71C2 },
+ { 0x1002, 0x71C3 },
+ { 0x1002, 0x71C4 },
+ { 0x1002, 0x71C5 },
+ { 0x1002, 0x71C6 },
+ { 0x1002, 0x71C7 },
+ { 0x1002, 0x71CD },
+ { 0x1002, 0x71CE },
+ { 0x1002, 0x71D2 },
+ { 0x1002, 0x71D4 },
+ { 0x1002, 0x71D5 },
+ { 0x1002, 0x71D6 },
+ { 0x1002, 0x71DA },
+ { 0x1002, 0x71DE },
+ { 0x1002, 0x7200 },
+ { 0x1002, 0x7210 },
+ { 0x1002, 0x7211 },
+ { 0x1002, 0x7240 },
+ { 0x1002, 0x7243 },
+ { 0x1002, 0x7244 },
+ { 0x1002, 0x7245 },
+ { 0x1002, 0x7246 },
+ { 0x1002, 0x7247 },
+ { 0x1002, 0x7248 },
+ { 0x1002, 0x7249 },
+ { 0x1002, 0x724A },
+ { 0x1002, 0x724B },
+ { 0x1002, 0x724C },
+ { 0x1002, 0x724D },
+ { 0x1002, 0x724E },
+ { 0x1002, 0x724F },
+ { 0x1002, 0x7280 },
+ { 0x1002, 0x7281 },
+ { 0x1002, 0x7283 },
+ { 0x1002, 0x7284 },
+ { 0x1002, 0x7287 },
+ { 0x1002, 0x7288 },
+ { 0x1002, 0x7289 },
+ { 0x1002, 0x728B },
+ { 0x1002, 0x728C },
+ { 0x1002, 0x7290 },
+ { 0x1002, 0x7291 },
+ { 0x1002, 0x7293 },
+ { 0x1002, 0x7297 },
+ { 0x1002, 0x7834 },
+ { 0x1002, 0x7835 },
+ { 0x1002, 0x791e },
+ { 0x1002, 0x791f },
+ { 0x1002, 0x793f },
+ { 0x1002, 0x7941 },
+ { 0x1002, 0x7942 },
+ { 0x1002, 0x796c },
+ { 0x1002, 0x796d },
+ { 0x1002, 0x796e },
+ { 0x1002, 0x796f },
+ { 0x1002, 0x9400 },
+ { 0x1002, 0x9401 },
+ { 0x1002, 0x9402 },
+ { 0x1002, 0x9403 },
+ { 0x1002, 0x9405 },
+ { 0x1002, 0x940A },
+ { 0x1002, 0x940B },
+ { 0x1002, 0x940F },
+ { 0x1002, 0x94A0 },
+ { 0x1002, 0x94A1 },
+ { 0x1002, 0x94A3 },
+ { 0x1002, 0x94B1 },
+ { 0x1002, 0x94B3 },
+ { 0x1002, 0x94B4 },
+ { 0x1002, 0x94B5 },
+ { 0x1002, 0x94B9 },
+ { 0x1002, 0x9440 },
+ { 0x1002, 0x9441 },
+ { 0x1002, 0x9442 },
+ { 0x1002, 0x9443 },
+ { 0x1002, 0x9444 },
+ { 0x1002, 0x9446 },
+ { 0x1002, 0x944A },
+ { 0x1002, 0x944B },
+ { 0x1002, 0x944C },
+ { 0x1002, 0x944E },
+ { 0x1002, 0x9450 },
+ { 0x1002, 0x9452 },
+ { 0x1002, 0x9456 },
+ { 0x1002, 0x945A },
+ { 0x1002, 0x945B },
+ { 0x1002, 0x945E },
+ { 0x1002, 0x9460 },
+ { 0x1002, 0x9462 },
+ { 0x1002, 0x946A },
+ { 0x1002, 0x946B },
+ { 0x1002, 0x947A },
+ { 0x1002, 0x947B },
+ { 0x1002, 0x9480 },
+ { 0x1002, 0x9487 },
+ { 0x1002, 0x9488 },
+ { 0x1002, 0x9489 },
+ { 0x1002, 0x948A },
+ { 0x1002, 0x948F },
+ { 0x1002, 0x9490 },
+ { 0x1002, 0x9491 },
+ { 0x1002, 0x9495 },
+ { 0x1002, 0x9498 },
+ { 0x1002, 0x949C },
+ { 0x1002, 0x949E },
+ { 0x1002, 0x949F },
+ { 0x1002, 0x94C0 },
+ { 0x1002, 0x94C1 },
+ { 0x1002, 0x94C3 },
+ { 0x1002, 0x94C4 },
+ { 0x1002, 0x94C5 },
+ { 0x1002, 0x94C6 },
+ { 0x1002, 0x94C7 },
+ { 0x1002, 0x94C8 },
+ { 0x1002, 0x94C9 },
+ { 0x1002, 0x94CB },
+ { 0x1002, 0x94CC },
+ { 0x1002, 0x94CD },
+ { 0x1002, 0x9500 },
+ { 0x1002, 0x9501 },
+ { 0x1002, 0x9504 },
+ { 0x1002, 0x9505 },
+ { 0x1002, 0x9506 },
+ { 0x1002, 0x9507 },
+ { 0x1002, 0x9508 },
+ { 0x1002, 0x9509 },
+ { 0x1002, 0x950F },
+ { 0x1002, 0x9511 },
+ { 0x1002, 0x9515 },
+ { 0x1002, 0x9517 },
+ { 0x1002, 0x9519 },
+ { 0x1002, 0x9540 },
+ { 0x1002, 0x9541 },
+ { 0x1002, 0x9542 },
+ { 0x1002, 0x954E },
+ { 0x1002, 0x954F },
+ { 0x1002, 0x9552 },
+ { 0x1002, 0x9553 },
+ { 0x1002, 0x9555 },
+ { 0x1002, 0x9557 },
+ { 0x1002, 0x955f },
+ { 0x1002, 0x9580 },
+ { 0x1002, 0x9581 },
+ { 0x1002, 0x9583 },
+ { 0x1002, 0x9586 },
+ { 0x1002, 0x9587 },
+ { 0x1002, 0x9588 },
+ { 0x1002, 0x9589 },
+ { 0x1002, 0x958A },
+ { 0x1002, 0x958B },
+ { 0x1002, 0x958C },
+ { 0x1002, 0x958D },
+ { 0x1002, 0x958E },
+ { 0x1002, 0x958F },
+ { 0x1002, 0x9590 },
+ { 0x1002, 0x9591 },
+ { 0x1002, 0x9593 },
+ { 0x1002, 0x9595 },
+ { 0x1002, 0x9596 },
+ { 0x1002, 0x9597 },
+ { 0x1002, 0x9598 },
+ { 0x1002, 0x9599 },
+ { 0x1002, 0x959B },
+ { 0x1002, 0x95C0 },
+ { 0x1002, 0x95C2 },
+ { 0x1002, 0x95C4 },
+ { 0x1002, 0x95C5 },
+ { 0x1002, 0x95C6 },
+ { 0x1002, 0x95C7 },
+ { 0x1002, 0x95C9 },
+ { 0x1002, 0x95CC },
+ { 0x1002, 0x95CD },
+ { 0x1002, 0x95CE },
+ { 0x1002, 0x95CF },
+ { 0x1002, 0x9610 },
+ { 0x1002, 0x9611 },
+ { 0x1002, 0x9612 },
+ { 0x1002, 0x9613 },
+ { 0x1002, 0x9614 },
+ { 0x1002, 0x9615 },
+ { 0x1002, 0x9616 },
+ { 0x1002, 0x9640 },
+ { 0x1002, 0x9641 },
+ { 0x1002, 0x9642 },
+ { 0x1002, 0x9643 },
+ { 0x1002, 0x9644 },
+ { 0x1002, 0x9645 },
+ { 0x1002, 0x9647 },
+ { 0x1002, 0x9648 },
+ { 0x1002, 0x9649 },
+ { 0x1002, 0x964a },
+ { 0x1002, 0x964b },
+ { 0x1002, 0x964c },
+ { 0x1002, 0x964e },
+ { 0x1002, 0x964f },
+ { 0x1002, 0x9710 },
+ { 0x1002, 0x9711 },
+ { 0x1002, 0x9712 },
+ { 0x1002, 0x9713 },
+ { 0x1002, 0x9714 },
+ { 0x1002, 0x9715 },
+ { 0x1002, 0x9802 },
+ { 0x1002, 0x9803 },
+ { 0x1002, 0x9804 },
+ { 0x1002, 0x9805 },
+ { 0x1002, 0x9806 },
+ { 0x1002, 0x9807 },
+ { 0x1002, 0x9808 },
+ { 0x1002, 0x9809 },
+ { 0x1002, 0x980A },
+ { 0x1002, 0x9900 },
+ { 0x1002, 0x9901 },
+ { 0x1002, 0x9903 },
+ { 0x1002, 0x9904 },
+ { 0x1002, 0x9905 },
+ { 0x1002, 0x9906 },
+ { 0x1002, 0x9907 },
+ { 0x1002, 0x9908 },
+ { 0x1002, 0x9909 },
+ { 0x1002, 0x990A },
+ { 0x1002, 0x990B },
+ { 0x1002, 0x990C },
+ { 0x1002, 0x990D },
+ { 0x1002, 0x990E },
+ { 0x1002, 0x990F },
+ { 0x1002, 0x9910 },
+ { 0x1002, 0x9913 },
+ { 0x1002, 0x9917 },
+ { 0x1002, 0x9918 },
+ { 0x1002, 0x9919 },
+ { 0x1002, 0x9990 },
+ { 0x1002, 0x9991 },
+ { 0x1002, 0x9992 },
+ { 0x1002, 0x9993 },
+ { 0x1002, 0x9994 },
+ { 0x1002, 0x9995 },
+ { 0x1002, 0x9996 },
+ { 0x1002, 0x9997 },
+ { 0x1002, 0x9998 },
+ { 0x1002, 0x9999 },
+ { 0x1002, 0x999A },
+ { 0x1002, 0x999B },
+ { 0x1002, 0x999C },
+ { 0x1002, 0x999D },
+ { 0x1002, 0x99A0 },
+ { 0x1002, 0x99A2 },
+ { 0x1002, 0x99A4 },
+};
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c
index 1d3c9ec7601..a9efc2c98d1 100644
--- a/sys/dev/pci/vga_pci.c
+++ b/sys/dev/pci/vga_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vga_pci.c,v 1.78 2014/06/01 00:37:37 mlarkin Exp $ */
+/* $OpenBSD: vga_pci.c,v 1.79 2014/07/12 23:16:23 jsg Exp $ */
/* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */
/*
@@ -81,6 +81,9 @@
#include <dev/pci/pcivar.h>
#include <dev/pci/pcidevs.h>
+#include <dev/pci/drm/i915/i915_devlist.h>
+#include <dev/pci/drm/radeon/radeon_devlist.h>
+
#include <dev/pci/agpvar.h>
#include <dev/ic/mc6845reg.h>
@@ -121,7 +124,7 @@ int vesafb_getcmap(struct vga_pci_softc *, struct wsdisplay_cmap *);
void vga_save_state(struct vga_pci_softc *);
void vga_restore_state(struct vga_pci_softc *);
#endif
-
+int vga_aperture_needed(struct pci_attach_args *);
/*
* Function pointers for wsconsctl parameter handling.
@@ -171,6 +174,28 @@ static const struct vga_device_description vga_devs[] = {
};
#endif
+static const struct pci_matchid aperture_blacklist[] = {
+ /* server adapters found in mga200 drm driver */
+ { PCI_VENDOR_MATROX, PCI_PRODUCT_MATROX_G200E_SE },
+ { PCI_VENDOR_MATROX, PCI_PRODUCT_MATROX_G200E_SE_B },
+ { PCI_VENDOR_MATROX, PCI_PRODUCT_MATROX_G200EH },
+ { PCI_VENDOR_MATROX, PCI_PRODUCT_MATROX_G200ER },
+ { PCI_VENDOR_MATROX, PCI_PRODUCT_MATROX_G200EV },
+ { PCI_VENDOR_MATROX, PCI_PRODUCT_MATROX_G200EW },
+
+ /* server adapters found in ast drm driver */
+ { PCI_VENDOR_ASPEED, PCI_PRODUCT_ASPEED_AST2000 },
+ { PCI_VENDOR_ASPEED, PCI_PRODUCT_ASPEED_AST2100 },
+
+ /* ati adapters found in servers */
+ { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_RAGEXL },
+ { PCI_VENDOR_ATI, PCI_PRODUCT_ATI_ES1000 },
+
+ /* xgi found in some poweredges/supermicros/tyans */
+ { PCI_VENDOR_XGI, PCI_PRODUCT_XGI_VOLARI_Z7 },
+ { PCI_VENDOR_XGI, PCI_PRODUCT_XGI_VOLARI_Z9 },
+};
+
int
vga_pci_match(struct device *parent, void *match, void *aux)
{
@@ -198,6 +223,19 @@ vga_pci_match(struct device *parent, void *match, void *aux)
return (1);
}
+int
+vga_aperture_needed(struct pci_attach_args *pa)
+{
+#if defined(__i386__) || defined(__amd64__) || \
+ defined(__sparc64__) || defined(__macppc__)
+ if (pci_matchbyid(pa, i915_devices, nitems(i915_devices)) ||
+ pci_matchbyid(pa, radeon_devices, nitems(radeon_devices)) ||
+ pci_matchbyid(pa, aperture_blacklist, nitems(aperture_blacklist)))
+ return (0);
+#endif
+ return (1);
+}
+
void
vga_pci_attach(struct device *parent, struct device *self, void *aux)
{
@@ -254,6 +292,9 @@ vga_pci_attach(struct device *parent, struct device *self, void *aux)
}
#endif
+ if (vga_aperture_needed(pa))
+ printf("%s: aperture needed\n", sc->sc_dev.dv_xname);
+
#if NINTAGP > 0
/*
* attach intagp here instead of pchb so it can share mappings