summaryrefslogtreecommitdiff
path: root/linux-core/drm_drv.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_drv.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_drv.c')
-rw-r--r--linux-core/drm_drv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 4932ea59..dd76421f 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -414,7 +414,8 @@ static void drm_cleanup(struct drm_device * dev)
drm_ht_remove(&dev->object_hash);
drm_put_minor(&dev->primary);
- drm_put_minor(&dev->control);
+ if (drm_core_check_feature(dev, DRIVER_MODESET))
+ drm_put_minor(&dev->control);
if (drm_put_dev(dev))
DRM_ERROR("Cannot unload module\n");
}