Skip to contentSkip to conversation

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

PATCH In review Takashi Iwai 2 participants 3 messages Aug 20, 2009 – Aug 21, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

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
---
 drivers/gpu/drm/radeon/Kconfig      |   13 +++++++++++--
 drivers/gpu/drm/radeon/radeon_drv.c |    4 ++++
 2 files changed, 15 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/Kconfig +11 -2
index 2168d67..230de32 100644
@@ -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.
drivers/gpu/drm/radeon/radeon_drv.c +4 -0
index 0bd5879..74d5b70 100644
@@ -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;
Signature · 1 line
1.6.3.3
maintainer
#1 lore raw
Quoted 9 lines · Takashi Iwai

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

I'm sort of torn on this, when radeon KMS moves out of staging it will be disabled by
default using the current option. It will build everything always and disable/enable like this patch
does. I'm not willing to do that yet esp now in -rcX time as it might break builds
on some other arches.

So if a distro isn't shipping a compatible userspace, I'd rather they didn't ship
the kernel support built at all until we move it from staging.

AFAIK you guys don't use -ati on a lot of cards kms is useful so I'm not sure when you'll
ever have a compatible userspace.

Dave.

#2 lore raw

At Fri, 21 Aug 2009 10:52:13 +1000,

Quoted 12 lines · Dave Airlie
Quoted 9 lines · Takashi Iwai

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

Quoted 7 lines

I'm sort of torn on this, when radeon KMS moves out of staging it will be disabled by
default using the current option. It will build everything always and disable/enable like this patch
does. I'm not willing to do that yet esp now in -rcX time as it might break builds
on some other arches.

Yeah, it's a bit late for this kind of change; I share your concern, too.

Quoted 7 lines

So if a distro isn't shipping a compatible userspace, I'd rather they didn't ship
the kernel support built at all until we move it from staging.

AFAIK you guys don't use -ati on a lot of cards kms is useful so I'm not sure when you'll
ever have a compatible userspace.

Well, a lack of dynamic switch -- or inconsistent behavior (i915 is built with KMS but not enabled as default) is the problem right now. We can live without radeon KMS, but it would be nice if we can still provide the functionality in any form...

thanks,

Takashi