aboutsummaryrefslogtreecommitdiff
path: root/bsd-core/mga_drv.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2005-11-28 21:15:46 +0000
committerEric Anholt <anholt@freebsd.org>2005-11-28 21:15:46 +0000
commit1835dff04a69509c0ea5fdb94abe0eaa61e7ab5a (patch)
tree6429c7218395c5df204ed027faf863f292473337 /bsd-core/mga_drv.c
parent0472ac5d117908a4ef612722960411c58e824999 (diff)
Fix AGP support guessing: Implement the same bridge checking in the MGA
driver as Linux uses, and actually use the driver's device_is_agp if available (hopefully fixing i915).
Diffstat (limited to 'bsd-core/mga_drv.c')
-rw-r--r--bsd-core/mga_drv.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/bsd-core/mga_drv.c b/bsd-core/mga_drv.c
index b3c8345b..1dc146f6 100644
--- a/bsd-core/mga_drv.c
+++ b/bsd-core/mga_drv.c
@@ -61,7 +61,20 @@ static drm_pci_id_list_t mga_pciidlist[] = {
*/
static int mga_driver_device_is_agp(drm_device_t * dev)
{
- return 1;
+ /* There are PCI versions of the G450. These cards have the
+ * same PCI ID as the AGP G450, but have an additional PCI-to-PCI
+ * bridge chip. We detect these cards, which are not currently
+ * supported by this driver, by looking at the device ID of the
+ * bus the "card" is on. If vendor is 0x3388 (Hint Corp) and the
+ * device is 0x0021 (HB6 Universal PCI-PCI bridge), we reject the
+ * device.
+ */
+ if (pci_get_device(dev->device) == 0x0525 &&
+ pci_get_vendor(device_get_parent(dev->device)) == 0x3388 &&
+ pci_get_device(device_get_parent(dev->device)) == 0x0021)
+ return 0;
+ else
+ return 2;
}
static void mga_configure(drm_device_t *dev)