[PATCH] drm/kms/radeon: Add kconfig to specify the default modesetting

From: Takashi Iwai
Date: Thu Aug 20 2009 - 09:26:40 EST


This patch adds a Kconfig item to specify the default radeon modeset
value. Also fixed the description of CONFIG_DRM_RADEON_KMS.

Since KMS gives problems on some Radeon devices, it's safer to disable
it as default on distro kernels. But distros would love to include the
feature itself instead of disabling KMS completely.

Reference: Novell bnc#527910
https://bugzilla.novell.com/show_bug.cgi?id=527910

Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
---
drivers/gpu/drm/radeon/Kconfig | 13 +++++++++++--
drivers/gpu/drm/radeon/radeon_drv.c | 4 ++++
2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/Kconfig b/drivers/gpu/drm/radeon/Kconfig
index 2168d67..230de32 100644
--- a/drivers/gpu/drm/radeon/Kconfig
+++ b/drivers/gpu/drm/radeon/Kconfig
@@ -1,9 +1,9 @@
config DRM_RADEON_KMS
- bool "Enable modesetting on radeon by default"
+ bool "Enable kernel modesetting on radeon"
depends on DRM_RADEON
select DRM_TTM
help
- Choose this option if you want kernel modesetting enabled by default,
+ Choose this option if you want kernel modesetting enabled,
and you have a new enough userspace to support this. Running old
userspaces with this enabled will cause pain.

@@ -32,3 +32,12 @@ config DRM_RADEON_KMS
This code support the following hardware : R1XX,R2XX,R3XX,R4XX,R5XX
(radeon up to X1950). Works is underway to provide support for R6XX,
R7XX and newer hardware (radeon from HD2XXX to HD4XXX).
+
+config CONFIG_DRM_RADEON_KMS_DEFAULT
+ bool "Enable modesetting on radeon by default"
+ depends on DRM_RADEON_KMS
+ help
+ Choose this option if you want to enable the kernel modesetting
+ feature in the radeon driver by default. Even if this is set
+ off, you can still enable it via the kernel commandline option
+ radeon.modeset=1.
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 0bd5879..74d5b70 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -82,7 +82,11 @@ void radeon_debugfs_cleanup(struct drm_minor *minor);

int radeon_no_wb;
#if defined(CONFIG_DRM_RADEON_KMS)
+#ifdef CONFIG_DRM_RADEON_KMS_DEFAULT
int radeon_modeset = -1;
+#else
+int radeon_modeset = 0;
+#endif
int radeon_dynclks = -1;
int radeon_r4xx_atom = 0;
int radeon_agpmode = 0;
--
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/