kernel/drm: Fix AGP detection for Matrox cards.
authorSascha Wildner <saw@online.de>
Wed, 4 Sep 2013 16:18:59 +0000 (18:18 +0200)
committerSascha Wildner <saw@online.de>
Wed, 4 Sep 2013 16:18:59 +0000 (18:18 +0200)
Since DRM drivers attach to vgapci, we need to look at the grandparent.

sys/dev/drm/mga/mga_drv.c

index f0835a4..60e1d0e 100644 (file)
@@ -71,11 +71,7 @@ static int mga_driver_device_is_agp(struct drm_device * dev)
         * device is 0x0021 (HB6 Universal PCI-PCI bridge), we reject the
         * device.
         */
-#if __FreeBSD_version >= 700010
        bus = device_get_parent(device_get_parent(dev->device));
-#else
-       bus = device_get_parent(dev->device);
-#endif
        if (pci_get_device(dev->device) == 0x0525 &&
            pci_get_vendor(bus) == 0x3388 &&
            pci_get_device(bus) == 0x0021)