drm: dumb scanout create/mmap for intel/radeon (v3)
[deliverable/linux.git] / drivers / gpu / drm / i915 / i915_drv.c
index e517447b0880cb87e6d920e237eeee104d07d1c2..17fde2f27418515c1bb7eb63a39cda0e161c2c74 100644 (file)
@@ -568,6 +568,14 @@ int i915_reset(struct drm_device *dev, u8 flags)
 static int __devinit
 i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
+       /* Only bind to function 0 of the device. Early generations
+        * used function 1 as a placeholder for multi-head. This causes
+        * us confusion instead, especially on the systems where both
+        * functions have the same PCI-ID!
+        */
+       if (PCI_FUNC(pdev->devfn))
+               return -ENODEV;
+
        return drm_get_pci_dev(pdev, ent, &driver);
 }
 
@@ -692,6 +700,9 @@ static struct drm_driver driver = {
        .gem_init_object = i915_gem_init_object,
        .gem_free_object = i915_gem_free_object,
        .gem_vm_ops = &i915_gem_vm_ops,
+       .dumb_create = i915_gem_dumb_create,
+       .dumb_map_offset = i915_gem_mmap_gtt,
+       .dumb_destroy = i915_gem_dumb_destroy,
        .ioctls = i915_ioctls,
        .fops = {
                 .owner = THIS_MODULE,
This page took 0.026273 seconds and 5 git commands to generate.