Skip to contentSkip to conversation

drm/radeon: restore nomodeset operation (v2)

PATCH In review Dave Airlie 3 participants 3 messages May 15, 2013

Subsystems (2)
lore
Share & tools
lore

Dave Airlie

author maintainer
#0 lore raw

PATCH 1/1 drm/radeon: restore nomodeset operation (v2)

From: Dave Airlie <[email protected]>

When UMS was deprecated it removed support for nomodeset commandline we really want this in distro land so we can debug stuff, everyone should fallback to vesa correctly.

v2: oops -1 isn't used anymore, restore original behaviour -1 is default, so we can boot with nomodeset on the command line, then use radeon.modeset=1 to override it for debugging later.

---
 drivers/gpu/drm/radeon/radeon_drv.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_drv.c +11 -1
index d33f484..094e7e5 100644
@@ -147,7 +147,7 @@ static inline void radeon_unregister_atpx_handler(void) {}
 #endif
 
 int radeon_no_wb;
-int radeon_modeset = 1;
+int radeon_modeset = -1;
 int radeon_dynclks = -1;
 int radeon_r4xx_atom = 0;
 int radeon_agpmode = 0;
@@ -456,6 +456,16 @@ static struct pci_driver radeon_kms_pci_driver = {
 
 static int __init radeon_init(void)
 {
+#ifdef CONFIG_VGA_CONSOLE
+	if (vgacon_text_force() && radeon_modeset == -1) {
+		DRM_INFO("VGACON disable radeon kernel modesetting.\n");
+		radeon_modeset = 0;
+	}
+#endif
+	/* set to modesetting by default if not nomodeset */
+	if (radeon_modeset == -1)
+		radeon_modeset = 1;
+
 	if (radeon_modeset == 1) {
 		DRM_INFO("radeon kernel modesetting enabled.\n");
 		driver = &kms_driver;
Signature · 1 line
1.8.1.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Dave Airlie

From: Dave Airlie <[email protected]>

When UMS was deprecated it removed support for nomodeset commandline we really want this in distro land so we can debug stuff, everyone should fallback to vesa correctly.

Quoted 6 lines

v2: oops -1 isn't used anymore, restore original behaviour -1 is default, so we can boot with nomodeset on the command line, then use radeon.modeset=1 to override it for debugging later.

Whoops. Looks good to me. Do you want me take this patch through my tree or do you want to apply it?

Quoted 41 lines
---
 drivers/gpu/drm/radeon/radeon_drv.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_drv.c +11 -2
index d33f484..094e7e5 100644
@@ -147,7 +147,7 @@ static inline void radeon_unregister_atpx_handler(void) {}
 #endif
 
 int radeon_no_wb;
-int radeon_modeset = 1;
+int radeon_modeset = -1;
 int radeon_dynclks = -1;
 int radeon_r4xx_atom = 0;
 int radeon_agpmode = 0;
@@ -456,6 +456,16 @@ static struct pci_driver radeon_kms_pci_driver = {
 
 static int __init radeon_init(void)
 {
+#ifdef CONFIG_VGA_CONSOLE
+       if (vgacon_text_force() && radeon_modeset == -1) {
+               DRM_INFO("VGACON disable radeon kernel modesetting.\n");
+               radeon_modeset = 0;
+       }
+#endif
+       /* set to modesetting by default if not nomodeset */
+       if (radeon_modeset == -1)
+               radeon_modeset = 1;
+
        if (radeon_modeset == 1) {
                DRM_INFO("radeon kernel modesetting enabled.\n");
                driver = &kms_driver;
--

1.8.1.2

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Reviewed-by
#2 lore raw

Am 15.05.2013 15:00, schrieb Alex Deucher:

Quoted 11 lines · Dave Airlie
Quoted 10 lines

From: Dave Airlie <[email protected]>

When UMS was deprecated it removed support for nomodeset commandline we really want this in distro land so we can debug stuff, everyone should fallback to vesa correctly.

v2: oops -1 isn't used anymore, restore original behaviour -1 is default, so we can boot with nomodeset on the command line, then use radeon.modeset=1 to override it for debugging later.

Quoted 6 lines
Quoted 2 lines

Whoops. Looks good to me. Do you want me take this patch through my tree or do you want to apply it?

I was really wondering what that code does exactly while removing it, now I know. Patch is:

Quoted 48 lines
Quoted 39 lines

---
  drivers/gpu/drm/radeon/radeon_drv.c | 12 +++++++++++-
  1 file changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_drv.c +11 -2
index d33f484..094e7e5 100644
@@ -147,7 +147,7 @@ static inline void radeon_unregister_atpx_handler(void) {}
  #endif
 
  int radeon_no_wb;
-int radeon_modeset = 1;
+int radeon_modeset = -1;
  int radeon_dynclks = -1;
  int radeon_r4xx_atom = 0;
  int radeon_agpmode = 0;
@@ -456,6 +456,16 @@ static struct pci_driver radeon_kms_pci_driver = {
 
  static int __init radeon_init(void)
  {
+#ifdef CONFIG_VGA_CONSOLE
+       if (vgacon_text_force() && radeon_modeset == -1) {
+               DRM_INFO("VGACON disable radeon kernel modesetting.\n");
+               radeon_modeset = 0;
+       }
+#endif
+       /* set to modesetting by default if not nomodeset */
+       if (radeon_modeset == -1)
+               radeon_modeset = 1;
+
         if (radeon_modeset == 1) {
                 DRM_INFO("radeon kernel modesetting enabled.\n");
                 driver = &kms_driver;
--

1.8.1.2

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel