drm/i915: Convert fence computations to use vma directly
[deliverable/linux.git] / drivers / gpu / drm / drm_pci.c
index 29d5a548d07a70c1fad5b5e13dc7413dd509c1b0..d86362fc8ac6b3fe31afde5ca1c42ba7304625a7 100644 (file)
@@ -144,50 +144,6 @@ int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master)
 }
 EXPORT_SYMBOL(drm_pci_set_busid);
 
-int drm_pci_set_unique(struct drm_device *dev,
-                      struct drm_master *master,
-                      struct drm_unique *u)
-{
-       int domain, bus, slot, func, ret;
-
-       master->unique_len = u->unique_len;
-       master->unique = kmalloc(master->unique_len + 1, GFP_KERNEL);
-       if (!master->unique) {
-               ret = -ENOMEM;
-               goto err;
-       }
-
-       if (copy_from_user(master->unique, u->unique, master->unique_len)) {
-               ret = -EFAULT;
-               goto err;
-       }
-
-       master->unique[master->unique_len] = '\0';
-
-       /* Return error if the busid submitted doesn't match the device's actual
-        * busid.
-        */
-       ret = sscanf(master->unique, "PCI:%d:%d:%d", &bus, &slot, &func);
-       if (ret != 3) {
-               ret = -EINVAL;
-               goto err;
-       }
-
-       domain = bus >> 8;
-       bus &= 0xff;
-
-       if ((domain != drm_get_pci_domain(dev)) ||
-           (bus != dev->pdev->bus->number) ||
-           (slot != PCI_SLOT(dev->pdev->devfn)) ||
-           (func != PCI_FUNC(dev->pdev->devfn))) {
-               ret = -EINVAL;
-               goto err;
-       }
-       return 0;
-err:
-       return ret;
-}
-
 static int drm_pci_irq_by_busid(struct drm_device *dev, struct drm_irq_busid *p)
 {
        if ((p->busnum >> 8) != drm_get_pci_domain(dev) ||
@@ -219,7 +175,7 @@ int drm_irq_by_busid(struct drm_device *dev, void *data,
 {
        struct drm_irq_busid *p = data;
 
-       if (drm_core_check_feature(dev, DRIVER_MODESET))
+       if (!drm_core_check_feature(dev, DRIVER_LEGACY))
                return -EINVAL;
 
        /* UMS was only ever support on PCI devices. */
@@ -307,7 +263,7 @@ int drm_get_pci_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
 
        /* No locking needed since shadow-attach is single-threaded since it may
         * only be called from the per-driver module init hook. */
-       if (!drm_core_check_feature(dev, DRIVER_MODESET))
+       if (drm_core_check_feature(dev, DRIVER_LEGACY))
                list_add_tail(&dev->legacy_dev_list, &driver->legacy_dev_list);
 
        return 0;
@@ -343,7 +299,7 @@ int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver)
 
        DRM_DEBUG("\n");
 
-       if (driver->driver_features & DRIVER_MODESET)
+       if (!(driver->driver_features & DRIVER_LEGACY))
                return pci_register_driver(pdriver);
 
        /* If not using KMS, fall back to stealth mode manual scanning. */
@@ -444,13 +400,6 @@ int drm_irq_by_busid(struct drm_device *dev, void *data,
 {
        return -EINVAL;
 }
-
-int drm_pci_set_unique(struct drm_device *dev,
-                      struct drm_master *master,
-                      struct drm_unique *u)
-{
-       return -EINVAL;
-}
 #endif
 
 EXPORT_SYMBOL(drm_pci_init);
@@ -472,7 +421,7 @@ void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver)
        struct drm_device *dev, *tmp;
        DRM_DEBUG("\n");
 
-       if (driver->driver_features & DRIVER_MODESET) {
+       if (!(driver->driver_features & DRIVER_LEGACY)) {
                pci_unregister_driver(pdriver);
        } else {
                list_for_each_entry_safe(dev, tmp, &driver->legacy_dev_list,
This page took 0.053915 seconds and 5 git commands to generate.