summaryrefslogtreecommitdiff
path: root/linux-core/drm_stub.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-02-28 16:24:17 +1000
committerDave Airlie <airlied@redhat.com>2008-02-28 16:24:17 +1000
commit01dcc47d895997f77c9457558e974d41c23ed4e1 (patch)
tree0550c9f9675b7dbcffa65583e4e866a36bf58057 /linux-core/drm_stub.c
parent132ba667f4a88bb182e2d2abc7c4e60699398380 (diff)
drm: add modesetting as a driver feature.
This change adds a driver feature that for i915 is controlled by a module parameter. You now need to do insmod i915.ko modeset=1 to enable it the modesetting paths. It also fixes up lots of X paths. I can run my new DDX driver on this code with and without modesetting enabled
Diffstat (limited to 'linux-core/drm_stub.c')
-rw-r--r--linux-core/drm_stub.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c
index 334c8f03..6856075b 100644
--- a/linux-core/drm_stub.c
+++ b/linux-core/drm_stub.c
@@ -343,8 +343,10 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
goto err_g3;
}
- if ((ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL)))
- goto err_g3;
+ /* only add the control node on a modesetting platform */
+ if (drm_core_check_feature(dev, DRIVER_MODESET))
+ if ((ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL)))
+ goto err_g3;
if ((ret = drm_get_minor(dev, &dev->primary, DRM_MINOR_LEGACY)))
goto err_g4;
@@ -361,7 +363,8 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
err_g5:
drm_put_minor(&dev->primary);
err_g4:
- drm_put_minor(&dev->control);
+ if (drm_core_check_feature(dev, DRIVER_MODESET))
+ drm_put_minor(&dev->control);
err_g3:
if (!drm_fb_loaded)
pci_disable_device(pdev);