aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_drv.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-09-08 11:09:50 +1000
committerDave Airlie <airlied@redhat.com>2009-09-08 11:15:59 +1000
commita0cdc6495bdd0ea12390b9edaf13c8cb653df109 (patch)
treec9f77662adab2cb11b0b5bd801827e00eeeb7856 /drivers/gpu/drm/radeon/radeon_drv.c
parent6fcefd56f5060ca99ab03c9f2ad1f17c3a543ca1 (diff)
downloadmrst-s0i3-test-a0cdc6495bdd0ea12390b9edaf13c8cb653df109.tar.gz
mrst-s0i3-test-a0cdc6495bdd0ea12390b9edaf13c8cb653df109.tar.xz
mrst-s0i3-test-a0cdc6495bdd0ea12390b9edaf13c8cb653df109.zip
drm/kms/radeon: make kms default a runtime option
This makes the kms/enable disable a runtime not a build time option. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_drv.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 133e975dbf0..29f040a7861 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -38,7 +38,6 @@
#include <linux/console.h>
-#if defined(CONFIG_DRM_RADEON_KMS)
/*
* KMS wrapper.
*/
@@ -77,11 +76,9 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma);
int radeon_debugfs_init(struct drm_minor *minor);
void radeon_debugfs_cleanup(struct drm_minor *minor);
#endif
-#endif
int radeon_no_wb;
-#if defined(CONFIG_DRM_RADEON_KMS)
int radeon_modeset = -1;
int radeon_dynclks = -1;
int radeon_r4xx_atom = 0;
@@ -92,12 +89,10 @@ int radeon_benchmarking = 0;
int radeon_testing = 0;
int radeon_connector_table = 0;
int radeon_tv = 1;
-#endif
MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers");
module_param_named(no_wb, radeon_no_wb, int, 0444);
-#if defined(CONFIG_DRM_RADEON_KMS)
MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
module_param_named(modeset, radeon_modeset, int, 0400);
@@ -127,7 +122,6 @@ module_param_named(connector_table, radeon_connector_table, int, 0444);
MODULE_PARM_DESC(tv, "TV enable (0 = disable)");
module_param_named(tv, radeon_tv, int, 0444);
-#endif
static int radeon_suspend(struct drm_device *dev, pm_message_t state)
{
@@ -219,7 +213,6 @@ static struct drm_driver driver_old = {
.patchlevel = DRIVER_PATCHLEVEL,
};
-#if defined(CONFIG_DRM_RADEON_KMS)
static struct drm_driver kms_driver;
static int __devinit
@@ -313,7 +306,6 @@ static struct drm_driver kms_driver = {
.minor = KMS_DRIVER_MINOR,
.patchlevel = KMS_DRIVER_PATCHLEVEL,
};
-#endif
static struct drm_driver *driver;
@@ -321,7 +313,6 @@ static int __init radeon_init(void)
{
driver = &driver_old;
driver->num_ioctls = radeon_max_ioctl;
-#if defined(CONFIG_DRM_RADEON_KMS)
#ifdef CONFIG_VGA_CONSOLE
if (vgacon_text_force() && radeon_modeset == -1) {
DRM_INFO("VGACON disable radeon kernel modesetting.\n");
@@ -332,8 +323,13 @@ static int __init radeon_init(void)
#endif
/* if enabled by default */
if (radeon_modeset == -1) {
- DRM_INFO("radeon default to kernel modesetting.\n");
+#ifdef CONFIG_DRM_RADEON_KMS
+ DRM_INFO("radeon defaulting to kernel modesetting.\n");
radeon_modeset = 1;
+#else
+ DRM_INFO("radeon defaulting to userspace modesetting.\n");
+ radeon_modeset = 0;
+#endif
}
if (radeon_modeset == 1) {
DRM_INFO("radeon kernel modesetting enabled.\n");
@@ -343,7 +339,6 @@ static int __init radeon_init(void)
}
/* if the vga console setting is enabled still
* let modprobe override it */
-#endif
return drm_init(driver);
}