aboutsummaryrefslogtreecommitdiff
path: root/linux-core/i915_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/i915_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/i915_drv.c')
-rw-r--r--linux-core/i915_drv.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c
index 6c12f1a1..b844dfe6 100644
--- a/linux-core/i915_drv.c
+++ b/linux-core/i915_drv.c
@@ -39,6 +39,9 @@ static struct pci_device_id pciidlist[] = {
i915_PCI_IDS
};
+unsigned int i915_modeset = 0;
+module_param_named(modeset, i915_modeset, int, 0400);
+
#ifdef I915_HAVE_FENCE
extern struct drm_fence_driver i915_fence_driver;
#endif
@@ -563,8 +566,8 @@ static struct drm_driver driver = {
DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
.load = i915_driver_load,
.unload = i915_driver_unload,
-/* .lastclose = i915_driver_lastclose,
- .preclose = i915_driver_preclose, */
+ .lastclose = i915_driver_lastclose,
+ .preclose = i915_driver_preclose,
.suspend = i915_suspend,
.resume = i915_resume,
.device_is_agp = i915_driver_device_is_agp,
@@ -624,6 +627,9 @@ static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
static int __init i915_init(void)
{
driver.num_ioctls = i915_max_ioctl;
+ if (i915_modeset == 1)
+ driver.driver_features |= DRIVER_MODESET;
+
return drm_init(&driver, pciidlist);
}