diff options
Diffstat (limited to 'sys/dev/drm/drm_agpsupport.c')
-rw-r--r-- | sys/dev/drm/drm_agpsupport.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/sys/dev/drm/drm_agpsupport.c b/sys/dev/drm/drm_agpsupport.c index 6a7ebcf..4bb4e7a 100644 --- a/sys/dev/drm/drm_agpsupport.c +++ b/sys/dev/drm/drm_agpsupport.c @@ -38,50 +38,15 @@ __FBSDID("$FreeBSD$"); #include "dev/drm/drmP.h" -#if __FreeBSD_version >= 800004 #include <dev/agp/agpreg.h> -#else /* __FreeBSD_version >= 800004 */ -#include <pci/agpreg.h> -#endif /* __FreeBSD_version >= 800004 */ #include <dev/pci/pcireg.h> /* Returns 1 if AGP or 0 if not. */ static int drm_device_find_capability(struct drm_device *dev, int cap) { -#if __FreeBSD_version >= 602102 return (pci_find_cap(dev->device, cap, NULL) == 0); -#else - /* Code taken from agp.c. IWBNI that was a public interface. */ - u_int32_t status; - u_int8_t ptr, next; - - /* - * Check the CAP_LIST bit of the PCI status register first. - */ - status = pci_read_config(dev->device, PCIR_STATUS, 2); - if (!(status & 0x10)) - return 0; - - /* - * Traverse the capabilities list. - */ - for (ptr = pci_read_config(dev->device, AGP_CAPPTR, 1); - ptr != 0; - ptr = next) { - u_int32_t capid = pci_read_config(dev->device, ptr, 4); - next = AGP_CAPID_GET_NEXT_PTR(capid); - - /* - * If this capability entry ID is cap, then we are done. - */ - if (AGP_CAPID_GET_CAP_ID(capid) == cap) - return 1; - } - - return 0; -#endif } int drm_device_is_agp(struct drm_device *dev) |