diff options
Diffstat (limited to 'sys/dev/drm')
-rw-r--r-- | sys/dev/drm/drmP.h | 10 | ||||
-rw-r--r-- | sys/dev/drm/drm_agpsupport.c | 35 | ||||
-rw-r--r-- | sys/dev/drm/drm_bufs.c | 6 | ||||
-rw-r--r-- | sys/dev/drm/drm_drv.c | 22 | ||||
-rw-r--r-- | sys/dev/drm/drm_irq.c | 6 | ||||
-rw-r--r-- | sys/dev/drm/i915_drv.c | 8 | ||||
-rw-r--r-- | sys/dev/drm/mach64_drv.c | 4 | ||||
-rw-r--r-- | sys/dev/drm/mga_drv.c | 8 | ||||
-rw-r--r-- | sys/dev/drm/r128_drv.c | 4 | ||||
-rw-r--r-- | sys/dev/drm/radeon_drv.c | 4 | ||||
-rw-r--r-- | sys/dev/drm/savage_drv.c | 4 | ||||
-rw-r--r-- | sys/dev/drm/sis_drv.c | 4 | ||||
-rw-r--r-- | sys/dev/drm/tdfx_drv.c | 4 |
13 files changed, 0 insertions, 119 deletions
diff --git a/sys/dev/drm/drmP.h b/sys/dev/drm/drmP.h index bf5feed..7725884 100644 --- a/sys/dev/drm/drmP.h +++ b/sys/dev/drm/drmP.h @@ -51,9 +51,7 @@ struct drm_file; #include <sys/conf.h> #include <sys/sglist.h> #include <sys/stat.h> -#if __FreeBSD_version >= 700000 #include <sys/priv.h> -#endif #include <sys/proc.h> #include <sys/lock.h> #include <sys/fcntl.h> @@ -94,11 +92,7 @@ struct drm_file; #include <sys/mman.h> #include <sys/rman.h> #include <sys/memrange.h> -#if __FreeBSD_version >= 800004 #include <dev/agp/agpvar.h> -#else /* __FreeBSD_version >= 800004 */ -#include <pci/agpvar.h> -#endif /* __FreeBSD_version >= 800004 */ #include <sys/agpio.h> #include <sys/mutex.h> #include <dev/pci/pcivar.h> @@ -227,11 +221,7 @@ enum { #define PAGE_ALIGN(addr) round_page(addr) /* DRM_SUSER returns true if the user is superuser */ -#if __FreeBSD_version >= 700000 #define DRM_SUSER(p) (priv_check(p, PRIV_DRIVER) == 0) -#else -#define DRM_SUSER(p) (suser(p) == 0) -#endif #define DRM_AGP_FIND_DEVICE() agp_find_device() #define DRM_MTRR_WC MDF_WRITECOMBINE #define jiffies ticks 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) diff --git a/sys/dev/drm/drm_bufs.c b/sys/dev/drm/drm_bufs.c index de11e93..b685a59 100644 --- a/sys/dev/drm/drm_bufs.c +++ b/sys/dev/drm/drm_bufs.c @@ -1066,15 +1066,9 @@ int drm_mapbufs(struct drm_device *dev, void *data, struct drm_file *file_priv) } vaddr = round_page((vm_offset_t)vms->vm_daddr + MAXDSIZ); -#if __FreeBSD_version >= 600023 retcode = vm_mmap(&vms->vm_map, &vaddr, size, VM_PROT_READ | VM_PROT_WRITE, VM_PROT_ALL, MAP_SHARED | MAP_NOSYNC, OBJT_DEVICE, dev->devnode, foff); -#else - retcode = vm_mmap(&vms->vm_map, &vaddr, size, VM_PROT_READ | - VM_PROT_WRITE, VM_PROT_ALL, MAP_SHARED | MAP_NOSYNC, - SLIST_FIRST(&dev->devnode->si_hlist), foff); -#endif if (retcode) goto done; diff --git a/sys/dev/drm/drm_drv.c b/sys/dev/drm/drm_drv.c index 7598376..6874d45 100644 --- a/sys/dev/drm/drm_drv.c +++ b/sys/dev/drm/drm_drv.c @@ -161,19 +161,8 @@ int drm_probe(device_t kdev, drm_pci_id_list_t *idlist) { drm_pci_id_list_t *id_entry; int vendor, device; -#if __FreeBSD_version < 700010 - device_t realdev; - - if (!strcmp(device_get_name(kdev), "drmsub")) - realdev = device_get_parent(kdev); - else - realdev = kdev; - vendor = pci_get_vendor(realdev); - device = pci_get_device(realdev); -#else vendor = pci_get_vendor(kdev); device = pci_get_device(kdev); -#endif if (pci_get_class(kdev) != PCIC_DISPLAY || pci_get_subclass(kdev) != PCIS_DISPLAY_VGA) @@ -200,14 +189,7 @@ int drm_attach(device_t kdev, drm_pci_id_list_t *idlist) unit = device_get_unit(kdev); dev = device_get_softc(kdev); -#if __FreeBSD_version < 700010 - if (!strcmp(device_get_name(kdev), "drmsub")) - dev->device = device_get_parent(kdev); - else - dev->device = kdev; -#else dev->device = kdev; -#endif dev->devnode = make_dev(&drm_cdevsw, 0, DRM_DEV_UID, @@ -216,11 +198,7 @@ int drm_attach(device_t kdev, drm_pci_id_list_t *idlist) "dri/card%d", unit); dev->devnode->si_drv1 = dev; -#if __FreeBSD_version >= 700053 dev->pci_domain = pci_get_domain(dev->device); -#else - dev->pci_domain = 0; -#endif dev->pci_bus = pci_get_bus(dev->device); dev->pci_slot = pci_get_slot(dev->device); dev->pci_func = pci_get_function(dev->device); diff --git a/sys/dev/drm/drm_irq.c b/sys/dev/drm/drm_irq.c index 8977bcf..5965699 100644 --- a/sys/dev/drm/drm_irq.c +++ b/sys/dev/drm/drm_irq.c @@ -175,15 +175,9 @@ int drm_irq_install(struct drm_device *dev) DRM_UNLOCK(); /* Install handler */ -#if __FreeBSD_version >= 700031 retcode = bus_setup_intr(dev->device, dev->irqr, INTR_TYPE_TTY | INTR_MPSAFE, NULL, drm_irq_handler_wrap, dev, &dev->irqh); -#else - retcode = bus_setup_intr(dev->device, dev->irqr, - INTR_TYPE_TTY | INTR_MPSAFE, - drm_irq_handler_wrap, dev, &dev->irqh); -#endif if (retcode != 0) goto err; diff --git a/sys/dev/drm/i915_drv.c b/sys/dev/drm/i915_drv.c index 8638df1..244c7fe 100644 --- a/sys/dev/drm/i915_drv.c +++ b/sys/dev/drm/i915_drv.c @@ -147,19 +147,11 @@ static device_method_t i915_methods[] = { }; static driver_t i915_driver = { -#if __FreeBSD_version >= 700010 "drm", -#else - "drmsub", -#endif i915_methods, sizeof(struct drm_device) }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(i915, vgapci, i915_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(i915, agp, i915_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(i915, drm, 1, 1, 1); diff --git a/sys/dev/drm/mach64_drv.c b/sys/dev/drm/mach64_drv.c index 6f859ec..f4f61cd 100644 --- a/sys/dev/drm/mach64_drv.c +++ b/sys/dev/drm/mach64_drv.c @@ -130,9 +130,5 @@ static driver_t mach64_driver = { }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(mach64, vgapci, mach64_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(mach64, pci, mach64_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(mach64, drm, 1, 1, 1); diff --git a/sys/dev/drm/mga_drv.c b/sys/dev/drm/mga_drv.c index 6bb7e2b1..bc585b4 100644 --- a/sys/dev/drm/mga_drv.c +++ b/sys/dev/drm/mga_drv.c @@ -74,11 +74,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) @@ -167,9 +163,5 @@ static driver_t mga_driver = { }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(mga, vgapci, mga_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(mga, pci, mga_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(mga, drm, 1, 1, 1); diff --git a/sys/dev/drm/r128_drv.c b/sys/dev/drm/r128_drv.c index 8aebb0c..a112aeb 100644 --- a/sys/dev/drm/r128_drv.c +++ b/sys/dev/drm/r128_drv.c @@ -128,9 +128,5 @@ static driver_t r128_driver = { }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(r128, vgapci, r128_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(r128, pci, r128_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(r128, drm, 1, 1, 1); diff --git a/sys/dev/drm/radeon_drv.c b/sys/dev/drm/radeon_drv.c index 53443bc..a37c641 100644 --- a/sys/dev/drm/radeon_drv.c +++ b/sys/dev/drm/radeon_drv.c @@ -127,9 +127,5 @@ static driver_t radeon_driver = { }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(radeon, vgapci, radeon_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(radeon, pci, radeon_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(radeon, drm, 1, 1, 1); diff --git a/sys/dev/drm/savage_drv.c b/sys/dev/drm/savage_drv.c index 3c5e7c8..f6accae 100644 --- a/sys/dev/drm/savage_drv.c +++ b/sys/dev/drm/savage_drv.c @@ -113,9 +113,5 @@ static driver_t savage_driver = { }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(savage, vgapci, savage_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(savage, pci, savage_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(savage, drm, 1, 1, 1); diff --git a/sys/dev/drm/sis_drv.c b/sys/dev/drm/sis_drv.c index 8da88ba..8e82ac0 100644 --- a/sys/dev/drm/sis_drv.c +++ b/sys/dev/drm/sis_drv.c @@ -107,9 +107,5 @@ static driver_t sis_driver = { }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(sisdrm, vgapci, sis_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(sisdrm, pci, sis_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(sisdrm, drm, 1, 1, 1); diff --git a/sys/dev/drm/tdfx_drv.c b/sys/dev/drm/tdfx_drv.c index 75b7aca..2fe9eee 100644 --- a/sys/dev/drm/tdfx_drv.c +++ b/sys/dev/drm/tdfx_drv.c @@ -109,9 +109,5 @@ static driver_t tdfx_driver = { }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(tdfx, vgapci, tdfx_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(tdfx, pci, tdfx_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(tdfx, drm, 1, 1, 1); |