Try a bit harder to get output on the screen at panic time
Subsystems (6)
This set of 3 patches makes it a little more likely we'll get panic output onto the screen even when X is running, assuming a KMS enabled stack anyway.
It gets me from a blank or very sparsely populated black screen at panic time, to one including the full backtrace and panic output at panic time (tested with "echo c > /proc/sysrq-trigger" from an X session).
It doesn't cover every case; for instance I think it'll fail when X has disabled the display, but those cases need to be handled with separate patches anyway (need to add atomic DPMS paths for instance).
Anyway, please test these out and let me know if they work for you.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
PATCH 1/1 drm: add locked variant of drm_fb_helper_force_kernel_mode
Needed for panic and kdb, since we need to avoid taking the mode_config mutex.
--- drivers/gpu/drm/drm_fb_helper.c | 42 +++++++++++++++++++++++++++++++++----- 1 files changed, 36 insertions(+), 6 deletions(-)
drivers/gpu/drm/drm_fb_helper.c +36 -6
@@ -242,18 +242,22 @@ static int drm_fb_helper_parse_command_line(struct drm_fb_helper *fb_helper)return 0 ; } -bool drm_fb_helper_force_kernel_mode (void ) +bool drm_fb_helper_force_kernel_mode_locked (void ) {int i =0 ;bool ret, error = false;struct drm_fb_helper *helper; - -if (list_empty (&kernel_fb_helper_list)) -return false; +struct drm_mode_set *mode_set; +struct drm_crtc *crtc;list_for_each_entry (helper, &kernel_fb_helper_list, kernel_fb_list) {for (i =0 ; i < helper->crtc_count; i++) { -struct drm_mode_set *mode_set = &helper->crtc_info[i].mode_set; + mode_set = &helper->crtc_info[i].mode_set; + crtc = helper->crtc_info[i].mode_set.crtc; + +if (!crtc->enabled) +continue ; + ret =drm_crtc_helper_set_config (mode_set);if (ret) error = true;
@@ -262,11 +266,37 @@ bool drm_fb_helper_force_kernel_mode(void)return error; } +bool drm_fb_helper_force_kernel_mode (void ) +{ +bool ret; +struct drm_device *dev; +struct drm_fb_helper *helper; +struct drm_mode_set *mode_set; + +if (list_empty (&kernel_fb_helper_list)) { +DRM_DEBUG_KMS ("no fb helper list??\n" ); +return false; + } + +/* Get the DRM device */ + helper =list_first_entry (&kernel_fb_helper_list, + struct drm_fb_helper, + kernel_fb_list); + mode_set = &helper->crtc_info[0 ].mode_set; + dev = mode_set->crtc->dev; + +mutex_lock (&dev->mode_config.mutex); + ret =drm_fb_helper_force_kernel_mode_locked (); +mutex_unlock (&dev->mode_config.mutex); + +return ret; +} +int drm_fb_helper_panic (struct notifier_block *n,unsigned long ununsed,void *panic_str) {DRM_ERROR ("panic occurred, switching back to text console\n" ); -return drm_fb_helper_force_kernel_mode (); +drm_fb_helper_force_kernel_mode_locked ();return 0 ; }EXPORT_SYMBOL (drm_fb_helper_panic);
Signature · 1 line
1.6.6.1
Dave Airlie
maintainerRe: [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode
Quoted 2 lines · Jesse Barnes
Needed for panic and kdb, since we need to avoid taking the
mode_configmutex.
One comment below.
Quoted 64 lines
Signed-off-by Jesse Barnes <[email protected]>---
drivers/gpu/drm/drm_fb_helper.c | 42 +++++++++++++++++++++++++++++++++-----1 files changed, 36 insertions(+), 6 deletions(-)drivers/gpu/drm/drm_fb_helper.c +31
-5@@ -242,18 +242,22 @@ static int drm_fb_helper_parse_command_line(struct drm_fb_helper *fb_helper) return 0; } -bool drm_fb_helper_force_kernel_mode (void ) +bool drm_fb_helper_force_kernel_mode_locked (void ) { int i = 0; bool ret, error = false; struct drm_fb_helper *helper; - - if (list_empty(&kernel_fb_helper_list)) - return false; + struct drm_mode_set *mode_set; + struct drm_crtc *crtc; list_for_each_entry(helper, &kernel_fb_helper_list, kernel_fb_list) { for (i = 0; i < helper->crtc_count; i++) { - struct drm_mode_set *mode_set = &helper->crtc_info[i].mode_set; + mode_set = &helper->crtc_info[i].mode_set; + crtc = helper->crtc_info[i].mode_set.crtc; + + if (!crtc->enabled) + continue; + ret = drm_crtc_helper_set_config(mode_set); if (ret) error = true;@@ -262,11 +266,37 @@ bool drm_fb_helper_force_kernel_mode(void) return error; } +bool drm_fb_helper_force_kernel_mode (void ) +{ + bool ret; + struct drm_device *dev; + struct drm_fb_helper *helper; + struct drm_mode_set *mode_set; + + if (list_empty(&kernel_fb_helper_list)) { + DRM_DEBUG_KMS("no fb helper list??\n"); + return false; + } + + /* Get the DRM device */ + helper = list_first_entry(&kernel_fb_helper_list, + struct drm_fb_helper, + kernel_fb_list); + mode_set = &helper->crtc_info[0].mode_set; + dev = mode_set->crtc->dev; + + mutex_lock(&dev->mode_config.mutex); + ret = drm_fb_helper_force_kernel_mode_locked(); + mutex_unlock(&dev->mode_config.mutex);
drivers/gpu/drm/drm_fb_helper.c bool drm_fb_helper_force_kernel_mode(void) · line 299
Quoted 10 lines
drivers/gpu/drm/drm_fb_helper.c +5
-1+ + return ret; +} + int drm_fb_helper_panic(struct notifier_block *n, unsigned long ununsed, void *panic_str) { DRM_ERROR("panic occurred, switching back to text console\n"); - return drm_fb_helper_force_kernel_mode(); + drm_fb_helper_force_kernel_mode_locked();
Any reason to drop the return here?
not just remove the return 0?
Dave.
Quoted 8 lines
drivers/gpu/drm/drm_fb_helper.c +0
-1return 0; } EXPORT_SYMBOL(drm_fb_helper_panic); --1.6.6.1
Re: [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode
Quoted 83 lines · On Mon, 12 Apr 2010 10:05:00 +1000 Dave Airlie <[email protected]> wrote:
Quoted 2 lines · Jesse Barnes
Needed for panic and kdb, since we need to avoid taking the
mode_configmutex.One comment below.
Quoted 64 lines
Signed-off-by Jesse Barnes <[email protected]>---
drivers/gpu/drm/drm_fb_helper.c | 42 +++++++++++++++++++++++++++++++++-----1 files changed, 36 insertions(+), 6 deletions(-)drivers/gpu/drm/drm_fb_helper.c +31
-5@@ -242,18 +242,22 @@ static int drm_fb_helper_parse_command_line(struct drm_fb_helper *fb_helper) return 0; } -bool drm_fb_helper_force_kernel_mode (void ) +bool drm_fb_helper_force_kernel_mode_locked (void ) { int i = 0; bool ret, error = false; struct drm_fb_helper *helper; - - if (list_empty(&kernel_fb_helper_list)) - return false; + struct drm_mode_set *mode_set; + struct drm_crtc *crtc; list_for_each_entry(helper, &kernel_fb_helper_list, kernel_fb_list) { for (i = 0; i < helper->crtc_count; i++) { - struct drm_mode_set *mode_set = &helper->crtc_info[i].mode_set; + mode_set = &helper->crtc_info[i].mode_set; + crtc = helper->crtc_info[i].mode_set.crtc; + + if (!crtc->enabled) + continue; + ret = drm_crtc_helper_set_config(mode_set); if (ret) error = true;@@ -262,11 +266,37 @@ bool drm_fb_helper_force_kernel_mode(void) return error; } +bool drm_fb_helper_force_kernel_mode (void ) +{ + bool ret; + struct drm_device *dev; + struct drm_fb_helper *helper; + struct drm_mode_set *mode_set; + + if (list_empty(&kernel_fb_helper_list)) { + DRM_DEBUG_KMS("no fb helper list??\n"); + return false; + } + + /* Get the DRM device */ + helper = list_first_entry(&kernel_fb_helper_list, + struct drm_fb_helper, + kernel_fb_list); + mode_set = &helper->crtc_info[0].mode_set; + dev = mode_set->crtc->dev; + + mutex_lock(&dev->mode_config.mutex); + ret = drm_fb_helper_force_kernel_mode_locked(); + mutex_unlock(&dev->mode_config.mutex);drivers/gpu/drm/drm_fb_helper.c bool drm_fb_helper_force_kernel_mode(void) · line 299
Quoted 10 lines
drivers/gpu/drm/drm_fb_helper.c +5
-1+ + return ret; +} + int drm_fb_helper_panic(struct notifier_block *n, unsigned long ununsed, void *panic_str) { DRM_ERROR("panic occurred, switching back to text console\n"); - return drm_fb_helper_force_kernel_mode(); + drm_fb_helper_force_kernel_mode_locked();Any reason to drop the return here?
Quoted 1 line
not just remove the return 0?
Oh no; I don't think the return value is checked anywhere but we may as well return it anyway.
Signature · 5 lines
Jesse Barnes, Intel Open Source Technology Center _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode
In reply to Dave AirlieQuoted 5 lines · On Mon, 12 Apr 2010 10:05:00 +1000 Dave Airlie <[email protected]> wrote:
Quoted 2 lines · Jesse Barnes
Needed for panic and kdb, since we need to avoid taking the
mode_configmutex.One comment below.
Updated patch below.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Quoted 1 line
From
7e972aa6a2f432b8fd04cb5d1a51f4df2fddea62Mon Sep 17 00:00:00 2001
From: Jesse Barnes <[email protected]>
Date: Thu, 8 Apr 2010 14:40:27 -0700
Subject: [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode
Needed for panic and kdb, since we need to avoid taking the mode_config mutex.
--- drivers/gpu/drm/drm_fb_helper.c | 43 ++++++++++++++++++++++++++++++++------ 1 files changed, 36 insertions(+), 7 deletions(-)
drivers/gpu/drm/drm_fb_helper.c +36 -7
@@ -242,18 +242,22 @@ static int drm_fb_helper_parse_command_line(struct drm_fb_helper *fb_helper)return 0 ; } -bool drm_fb_helper_force_kernel_mode (void ) +bool drm_fb_helper_force_kernel_mode_locked (void ) {int i =0 ;bool ret, error = false;struct drm_fb_helper *helper; - -if (list_empty (&kernel_fb_helper_list)) -return false; +struct drm_mode_set *mode_set; +struct drm_crtc *crtc;list_for_each_entry (helper, &kernel_fb_helper_list, kernel_fb_list) {for (i =0 ; i < helper->crtc_count; i++) { -struct drm_mode_set *mode_set = &helper->crtc_info[i].mode_set; + mode_set = &helper->crtc_info[i].mode_set; + crtc = helper->crtc_info[i].mode_set.crtc; + +if (!crtc->enabled) +continue ; + ret =drm_crtc_helper_set_config (mode_set);if (ret) error = true;
@@ -262,12 +266,37 @@ bool drm_fb_helper_force_kernel_mode(void)return error; } +bool drm_fb_helper_force_kernel_mode (void ) +{ +bool ret; +struct drm_device *dev; +struct drm_fb_helper *helper; +struct drm_mode_set *mode_set; + +if (list_empty (&kernel_fb_helper_list)) { +DRM_DEBUG_KMS ("no fb helper list??\n" ); +return false; + } + +/* Get the DRM device */ + helper =list_first_entry (&kernel_fb_helper_list, + struct drm_fb_helper, + kernel_fb_list); + mode_set = &helper->crtc_info[0 ].mode_set; + dev = mode_set->crtc->dev; + +mutex_lock (&dev->mode_config.mutex); + ret =drm_fb_helper_force_kernel_mode_locked (); +mutex_unlock (&dev->mode_config.mutex); + +return ret; +} +int drm_fb_helper_panic (struct notifier_block *n,unsigned long ununsed,void *panic_str) {DRM_ERROR ("panic occurred, switching back to text console\n" ); -return drm_fb_helper_force_kernel_mode (); -return 0 ; +return drm_fb_helper_force_kernel_mode_locked (); }EXPORT_SYMBOL (drm_fb_helper_panic);
Signature · 1 line
1.6.6.1
PATCH 1/1 vt: try harder to print output when panicing
In reply to Jesse BarnesAt panic time (i.e. when oops_in_progress is set) we should try a bit harder to update the screen and make sure output gets to the VT, since some drivers are capable of flipping back to it.
So make sure we try to unblank and update the display if called from a panic context.
--- drivers/char/vt.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)
drivers/char/vt.c +8 -4
@@ -698,7 +698,10 @@ void redraw_screen(struct vc_data *vc, int is_switch)update_attr (vc);clear_buffer_attributes (vc); } -if (update && vc->vc_mode !=KD_GRAPHICS ) + +/* Forcibly update if we're panicing */ +if ((update && vc->vc_mode !=KD_GRAPHICS ) || + oops_in_progress)do_update_region (vc, vc->vc_origin, vc->vc_screenbuf_size /2 ); }set_cursor (vc);
@@ -2498,7 +2501,7 @@ static void vt_console_print(struct console *co, const char *b, unsigned count) goto quit; } -if (vc->vc_mode !=KD_TEXT ) +if (vc->vc_mode !=KD_TEXT && !oops_in_progress) goto quit;/* undraw cursor first */
@@ -3703,7 +3706,8 @@ void do_unblank_screen(int leaving_gfx)return ; } vc = vc_cons[fg_console].d; -if (vc->vc_mode !=KD_TEXT ) +/* Try to unblank in oops case too */ +if (vc->vc_mode !=KD_TEXT && !oops_in_progress)return ;/* but leave console_blanked != 0 */ if (blankinterval) {
@@ -3712,7 +3716,7 @@ void do_unblank_screen(int leaving_gfx) } console_blanked =0 ; -if (vc->vc_sw->con_blank (vc,0 , leaving_gfx)) +if (vc->vc_sw->con_blank (vc,0 , leaving_gfx) || oops_in_progress)/* Low-level driver cannot restore -> do it ourselves */ update_screen (vc);if (console_blank_hook)
Signature · 1 line
1.6.6.1
PATCH 1/1 fbcon: assume console is active if panicing
In reply to Jesse BarnesThis allows us to draw to the fbcon buffer in a panic situation, in case the low level driver can flip to it at panic time.
--- drivers/video/console/fbcon.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/console/fbcon.c +1 -1
@@ -283,7 +283,7 @@ static inline int fbcon_is_inactive(struct vc_data *vc, struct fb_info *info)struct fbcon_ops *ops = info->fbcon_par;return (info->state !=FBINFO_STATE_RUNNING || - vc->vc_mode !=KD_TEXT || ops->graphics); + vc->vc_mode !=KD_TEXT || ops->graphics) && !oops_in_progress; } static inline int get_color(struct vc_data *vc, struct fb_info *info,
Signature · 1 line
1.6.6.1
PATCH 1/1 vt: try harder to print output when panicing
In reply to Jesse BarnesAt panic time (i.e. when oops_in_progress is set) we should try a bit harder to update the screen and make sure output gets to the VT, since some drivers are capable of flipping back to it.
So make sure we try to unblank and update the display if called from a panic context.
--- drivers/char/vt.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)
drivers/char/vt.c +8 -4
@@ -698,7 +698,10 @@ void redraw_screen(struct vc_data *vc, int is_switch)update_attr (vc);clear_buffer_attributes (vc); } -if (update && vc->vc_mode !=KD_GRAPHICS ) + +/* Forcibly update if we're panicing */ +if ((update && vc->vc_mode !=KD_GRAPHICS ) || + oops_in_progress)do_update_region (vc, vc->vc_origin, vc->vc_screenbuf_size /2 ); }set_cursor (vc);
@@ -2498,7 +2501,7 @@ static void vt_console_print(struct console *co, const char *b, unsigned count) goto quit; } -if (vc->vc_mode !=KD_TEXT ) +if (vc->vc_mode !=KD_TEXT && !oops_in_progress) goto quit;/* undraw cursor first */
@@ -3703,7 +3706,8 @@ void do_unblank_screen(int leaving_gfx)return ; } vc = vc_cons[fg_console].d; -if (vc->vc_mode !=KD_TEXT ) +/* Try to unblank in oops case too */ +if (vc->vc_mode !=KD_TEXT && !oops_in_progress)return ;/* but leave console_blanked != 0 */ if (blankinterval) {
@@ -3712,7 +3716,7 @@ void do_unblank_screen(int leaving_gfx) } console_blanked =0 ; -if (vc->vc_sw->con_blank (vc,0 , leaving_gfx)) +if (vc->vc_sw->con_blank (vc,0 , leaving_gfx) || oops_in_progress)/* Low-level driver cannot restore -> do it ourselves */ update_screen (vc);if (console_blank_hook)
Signature · 1 line
1.6.6.1
Quoted 9 lines · On Fri, 9 Apr 2010 15:10:50 -0700 Jesse Barnes <[email protected]> wrote:
This set of 3 patches makes it a little more likely we'll get panic output onto the screen even when X is running, assuming a KMS enabled stack anyway.
It gets me from a blank or very sparsely populated black screen at panic time, to one including the full backtrace and panic output at panic time (tested with "echo c >
/proc/sysrq-trigger" from an X session).
Quoted 5 lines
It doesn't cover every case; for instance I think it'll fail when X has disabled the display, but those cases need to be handled with separate patches anyway (need to add atomic DPMS paths for instance).
Anyway, please test these out and let me know if they work for you.
Linus, did you get a chance to try these at all? They're small, and if they work for you I thought maybe they had a chance to get into 2.6.34.
Thanks,
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Quoted 9 lines · On Fri, 9 Apr 2010 15:10:50 -0700 Jesse Barnes <[email protected]> wrote:
This set of 3 patches makes it a little more likely we'll get panic output onto the screen even when X is running, assuming a KMS enabled stack anyway.
It gets me from a blank or very sparsely populated black screen at panic time, to one including the full backtrace and panic output at panic time (tested with "echo c >
/proc/sysrq-trigger" from an X session).
Quoted 5 lines
It doesn't cover every case; for instance I think it'll fail when X has disabled the display, but those cases need to be handled with separate patches anyway (need to add atomic DPMS paths for instance).
Anyway, please test these out and let me know if they work for you.
Ping Linus & Dave again. Have you guys tried these? Really, it's cool.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Quoted 12 lines · Jesse Barnes
Quoted 9 lines · On Fri, 9 Apr 2010 15:10:50 -0700 Jesse Barnes <[email protected]> wrote:
This set of 3 patches makes it a little more likely we'll get panic output onto the screen even when X is running, assuming a KMS enabled stack anyway.
It gets me from a blank or very sparsely populated black screen at panic time, to one including the full backtrace and panic output at panic time (tested with "echo c >
/proc/sysrq-trigger" from an X session).
Quoted 8 lines
Quoted 5 lines
It doesn't cover every case; for instance I think it'll fail when X has disabled the display, but those cases need to be handled with separate patches anyway (need to add atomic DPMS paths for instance).
Anyway, please test these out and let me know if they work for you.
Ping Linus & Dave again. Have you guys tried these? Really, it's cool.
Second that, just tested these patches, and these work perfectly. One more reason for me to dump nvidia driver for nouveau.
Best regards,
Maxim Levitsky
Quoted 17 lines · Maxim Levitsky
Quoted 16 lines · Jesse Barnes
Quoted 13 lines · On Fri, 9 Apr 2010 15:10:50 -0700 Jesse Barnes <[email protected]> wrote:
This set of 3 patches makes it a little more likely we'll get panic output onto the screen even when X is running, assuming a KMS enabled stack anyway.
It gets me from a blank or very sparsely populated black screen at panic time, to one including the full backtrace and panic output at panic time (tested with "echo c >
/proc/sysrq-trigger" from an X session).It doesn't cover every case; for instance I think it'll fail when X has disabled the display, but those cases need to be handled with separate patches anyway (need to add atomic DPMS paths for instance).
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Anyway, please test these out and let me know if they work for you.
Ping Linus & Dave again. Have you guys tried these? Really, it's cool.
Second that, just tested these patches, and these work perfectly. One more reason for me to dump nvidia driver for nouveau.
Unfortunately I spoke too soon.
After suspend to ram, system doesn't properly resume now.
My system is based on nvidia G86, I use latest nouveau drivers, and suspend with compiz running.
I also patched kernel not to do vt switch on suspend/resume:
(quoted diff) +0 -0
b/drivers/gpu/drm/nouveau/nouveau_state.c
index 062b7f6..b3ef08b 100644
drivers/gpu/drm/nouveau/nouveau_state.c +0 -0
@@ -31,6 +31,7 @@
#include "drm_crtc_helper.h"
#include <linux/vgaarb.h>
#include <linux/vga_switcheroo.h>
+#include <linux/suspend.h>
#include "nouveau_drv.h"
#include "nouveau_drm.h"
@@ -771,6 +772,8 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
int ret = nouveau_card_init(dev);
if (ret)
return ret;
+
+ pm_set_vt_switch(0);
}
return 0;Best regards,
Maxim Levitsky
Quoted 58 lines · On Thu, 20 May 2010 04:27:07 +0300 Maxim Levitsky <[email protected]>…
Quoted 17 lines · Maxim Levitsky
Quoted 16 lines · Jesse Barnes
Quoted 13 lines · On Fri, 9 Apr 2010 15:10:50 -0700 Jesse Barnes <[email protected]> wrote:
This set of 3 patches makes it a little more likely we'll get panic output onto the screen even when X is running, assuming a KMS enabled stack anyway.
It gets me from a blank or very sparsely populated black screen at panic time, to one including the full backtrace and panic output at panic time (tested with "echo c >
/proc/sysrq-trigger" from an X session).It doesn't cover every case; for instance I think it'll fail when X has disabled the display, but those cases need to be handled with separate patches anyway (need to add atomic DPMS paths for instance).
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Anyway, please test these out and let me know if they work for you.
Ping Linus & Dave again. Have you guys tried these? Really, it's cool.
Second that, just tested these patches, and these work perfectly. One more reason for me to dump nvidia driver for nouveau.
Unfortunately I spoke too soon.
After suspend to ram, system doesn't properly resume now.
My system is based on nvidia G86, I use latest nouveau drivers, and suspend with compiz running.
I also patched kernel not to do vt switch on suspend/resume:
drivers/gpu/drm/nouveau/nouveau_state.c +3
-0@@ -31,6 +31,7 @@#include "drm_crtc_helper.h" #include <linux/vgaarb.h> #include <linux/vga_switcheroo.h> +#include <linux/suspend.h> #include "nouveau_drv.h" #include "nouveau_drm.h" @@ -771,6 +772,8 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)int ret =nouveau_card_init (dev);if (ret)return ret; + +pm_set_vt_switch (0 ); }
Quoted 1 line
return 0;
Hm I don't see how my patches would have affected suspend/resume, since they just add "oops_in_progress" checks to a few places. Are you sure something else isn't breaking your resume path?
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Quoted 61 lines · Jesse Barnes
Quoted 58 lines · On Thu, 20 May 2010 04:27:07 +0300 Maxim Levitsky <[email protected]>…
Quoted 17 lines · Maxim Levitsky
Quoted 16 lines · Jesse Barnes
Quoted 13 lines · On Fri, 9 Apr 2010 15:10:50 -0700 Jesse Barnes <[email protected]> wrote:
This set of 3 patches makes it a little more likely we'll get panic output onto the screen even when X is running, assuming a KMS enabled stack anyway.
It gets me from a blank or very sparsely populated black screen at panic time, to one including the full backtrace and panic output at panic time (tested with "echo c >
/proc/sysrq-trigger" from an X session).It doesn't cover every case; for instance I think it'll fail when X has disabled the display, but those cases need to be handled with separate patches anyway (need to add atomic DPMS paths for instance).
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Anyway, please test these out and let me know if they work for you.
Ping Linus & Dave again. Have you guys tried these? Really, it's cool.
Second that, just tested these patches, and these work perfectly. One more reason for me to dump nvidia driver for nouveau.
Unfortunately I spoke too soon.
After suspend to ram, system doesn't properly resume now.
My system is based on nvidia G86, I use latest nouveau drivers, and suspend with compiz running.
I also patched kernel not to do vt switch on suspend/resume:
drivers/gpu/drm/nouveau/nouveau_state.c +3
-0@@ -31,6 +31,7 @@#include "drm_crtc_helper.h" #include <linux/vgaarb.h> #include <linux/vga_switcheroo.h> +#include <linux/suspend.h> #include "nouveau_drv.h" #include "nouveau_drm.h" @@ -771,6 +772,8 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)int ret =nouveau_card_init (dev);if (ret)return ret; + +pm_set_vt_switch (0 ); }
Quoted 5 lines
Quoted 1 line
return 0;Hm I don't see how my patches would have affected suspend/resume, since they just add "
oops_in_progress" checks to a few places. Are you sure something else isn't breaking your resume path?
I am sure. I just reverted them, and everything works again. I refer to 3 patches in this thread.
Best regards,
Maxim Levitsky
Quoted 1 line
Quoted 62 lines · Maxim Levitsky
Quoted 61 lines · Jesse Barnes
Quoted 58 lines · On Thu, 20 May 2010 04:27:07 +0300 Maxim Levitsky <[email protected]>…
Quoted 17 lines · Maxim Levitsky
Quoted 16 lines · Jesse Barnes
Quoted 13 lines · On Fri, 9 Apr 2010 15:10:50 -0700 Jesse Barnes <[email protected]> wrote:
This set of 3 patches makes it a little more likely we'll get panic output onto the screen even when X is running, assuming a KMS enabled stack anyway.
It gets me from a blank or very sparsely populated black screen at panic time, to one including the full backtrace and panic output at panic time (tested with "echo c >
/proc/sysrq-trigger" from an X session).It doesn't cover every case; for instance I think it'll fail when X has disabled the display, but those cases need to be handled with separate patches anyway (need to add atomic DPMS paths for instance).
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Anyway, please test these out and let me know if they work for you.
Ping Linus & Dave again. Have you guys tried these? Really, it's cool.
Second that, just tested these patches, and these work perfectly. One more reason for me to dump nvidia driver for nouveau.
Unfortunately I spoke too soon.
After suspend to ram, system doesn't properly resume now.
My system is based on nvidia G86, I use latest nouveau drivers, and suspend with compiz running.
I also patched kernel not to do vt switch on suspend/resume:
drivers/gpu/drm/nouveau/nouveau_state.c +3
-0@@ -31,6 +31,7 @@#include "drm_crtc_helper.h" #include <linux/vgaarb.h> #include <linux/vga_switcheroo.h> +#include <linux/suspend.h> #include "nouveau_drv.h" #include "nouveau_drm.h" @@ -771,6 +772,8 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)int ret =nouveau_card_init (dev);if (ret)return ret; + +pm_set_vt_switch (0 ); }
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
return 0;Hm I don't see how my patches would have affected suspend/resume, since they just add "
oops_in_progress" checks to a few places. Are you sure something else isn't breaking your resume path?I am sure. I just reverted them, and everything works again. I refer to 3 patches in this thread.
In fact I might look a bit silly, but I applied these patches on top of linus master tree + nouveau master, and suspend to ram works just fine.
Maybe it shows up when kgdb+kdb isn't compiled in or so. Maybe it just triggered some bug in nouveau drivers...
(Note that I also enabled kgdb, and kdb, and breaking into kdb (SysRQ+g) doesn't switch console mode, just hangs till I press 'g'.
Best regards,
Maxim Levitsky
Quoted 73 lines · On Sat, 22 May 2010 00:57:30 +0300 Maxim Levitsky <[email protected]>…
Quoted 62 lines · Maxim Levitsky
Quoted 61 lines · Jesse Barnes
Quoted 58 lines · On Thu, 20 May 2010 04:27:07 +0300 Maxim Levitsky <[email protected]>…
Quoted 17 lines · Maxim Levitsky
Quoted 16 lines · Jesse Barnes
Quoted 13 lines · On Fri, 9 Apr 2010 15:10:50 -0700 Jesse Barnes <[email protected]> wrote:
This set of 3 patches makes it a little more likely we'll get panic output onto the screen even when X is running, assuming a KMS enabled stack anyway.
It gets me from a blank or very sparsely populated black screen at panic time, to one including the full backtrace and panic output at panic time (tested with "echo c >
/proc/sysrq-trigger" from an X session).It doesn't cover every case; for instance I think it'll fail when X has disabled the display, but those cases need to be handled with separate patches anyway (need to add atomic DPMS paths for instance).
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Anyway, please test these out and let me know if they work for you.
Ping Linus & Dave again. Have you guys tried these? Really, it's cool.
Second that, just tested these patches, and these work perfectly. One more reason for me to dump nvidia driver for nouveau.
Unfortunately I spoke too soon.
After suspend to ram, system doesn't properly resume now.
My system is based on nvidia G86, I use latest nouveau drivers, and suspend with compiz running.
I also patched kernel not to do vt switch on suspend/resume:
drivers/gpu/drm/nouveau/nouveau_state.c +3
-0@@ -31,6 +31,7 @@#include "drm_crtc_helper.h" #include <linux/vgaarb.h> #include <linux/vga_switcheroo.h> +#include <linux/suspend.h> #include "nouveau_drv.h" #include "nouveau_drm.h" @@ -771,6 +772,8 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)int ret =nouveau_card_init (dev);if (ret)return ret; + +pm_set_vt_switch (0 ); }Quoted 7 lines
Quoted 5 lines
Quoted 1 line
return 0;Hm I don't see how my patches would have affected suspend/resume, since they just add "
oops_in_progress" checks to a few places. Are you sure something else isn't breaking your resume path?I am sure. I just reverted them, and everything works again. I refer to 3 patches in this thread.
In fact I might look a bit silly, but I applied these patches on top of linus master tree + nouveau master, and suspend to ram works just fine.
Quoted 6 lines
Maybe it shows up when kgdb+kdb isn't compiled in or so. Maybe it just triggered some bug in nouveau drivers...
(Note that I also enabled kgdb, and kdb, and breaking into kdb (SysRQ+g) doesn't switch console mode, just hangs till I press 'g'.
Ok so it sounds like these particular patches are innocent?
As for kdb, I think the latest tree is probably missing the graphics switch support on the driver side...
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Quoted 80 lines · Jesse Barnes
Quoted 77 lines · On Sat, 22 May 2010 00:57:30 +0300 Maxim Levitsky <[email protected]>…
Quoted 62 lines · Maxim Levitsky
Quoted 61 lines · Jesse Barnes
Quoted 58 lines · On Thu, 20 May 2010 04:27:07 +0300 Maxim Levitsky <[email protected]>…
Quoted 17 lines · Maxim Levitsky
Quoted 16 lines · Jesse Barnes
Quoted 13 lines · On Fri, 9 Apr 2010 15:10:50 -0700 Jesse Barnes <[email protected]> wrote:
This set of 3 patches makes it a little more likely we'll get panic output onto the screen even when X is running, assuming a KMS enabled stack anyway.
It gets me from a blank or very sparsely populated black screen at panic time, to one including the full backtrace and panic output at panic time (tested with "echo c >
/proc/sysrq-trigger" from an X session).It doesn't cover every case; for instance I think it'll fail when X has disabled the display, but those cases need to be handled with separate patches anyway (need to add atomic DPMS paths for instance).
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Anyway, please test these out and let me know if they work for you.
Ping Linus & Dave again. Have you guys tried these? Really, it's cool.
Second that, just tested these patches, and these work perfectly. One more reason for me to dump nvidia driver for nouveau.
Unfortunately I spoke too soon.
After suspend to ram, system doesn't properly resume now.
My system is based on nvidia G86, I use latest nouveau drivers, and suspend with compiz running.
I also patched kernel not to do vt switch on suspend/resume:
drivers/gpu/drm/nouveau/nouveau_state.c +3
-0@@ -31,6 +31,7 @@#include "drm_crtc_helper.h" #include <linux/vgaarb.h> #include <linux/vga_switcheroo.h> +#include <linux/suspend.h> #include "nouveau_drv.h" #include "nouveau_drm.h" @@ -771,6 +772,8 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)int ret =nouveau_card_init (dev);if (ret)return ret; + +pm_set_vt_switch (0 ); }Quoted 7 lines
Quoted 5 lines
Quoted 1 line
return 0;Hm I don't see how my patches would have affected suspend/resume, since they just add "
oops_in_progress" checks to a few places. Are you sure something else isn't breaking your resume path?I am sure. I just reverted them, and everything works again. I refer to 3 patches in this thread.
In fact I might look a bit silly, but I applied these patches on top of linus master tree + nouveau master, and suspend to ram works just fine.
Maybe it shows up when kgdb+kdb isn't compiled in or so. Maybe it just triggered some bug in nouveau drivers...
Quoted 7 lines
Quoted 2 lines
(Note that I also enabled kgdb, and kdb, and breaking into kdb (SysRQ+g) doesn't switch console mode, just hangs till I press 'g'.
Ok so it sounds like these particular patches are innocent?
As for kdb, I think the latest tree is probably missing the graphics switch support on the driver side...
In what part? nouveau or kdb?
Screen does switch to text mode and displays the backtrace on 'panic' (Tested with sysrq+c).
(If kdb is enabled, screen doesn't switch, but allowing kdb to continue via 'g' command eventually breaks into it.)
Best regards,
Maxim Levitsky
Quoted 86 lines · Maxim Levitsky
Quoted 85 lines · Jesse Barnes
Quoted 73 lines · On Sat, 22 May 2010 00:57:30 +0300 Maxim Levitsky <[email protected]>…
Quoted 62 lines · Maxim Levitsky
Quoted 61 lines · Jesse Barnes
Quoted 58 lines · On Thu, 20 May 2010 04:27:07 +0300 Maxim Levitsky <[email protected]>…
Quoted 17 lines · Maxim Levitsky
Quoted 16 lines · Jesse Barnes
Quoted 13 lines · On Fri, 9 Apr 2010 15:10:50 -0700 Jesse Barnes <[email protected]> wrote:
This set of 3 patches makes it a little more likely we'll get panic output onto the screen even when X is running, assuming a KMS enabled stack anyway.
It gets me from a blank or very sparsely populated black screen at panic time, to one including the full backtrace and panic output at panic time (tested with "echo c >
/proc/sysrq-trigger" from an X session).It doesn't cover every case; for instance I think it'll fail when X has disabled the display, but those cases need to be handled with separate patches anyway (need to add atomic DPMS paths for instance).
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Anyway, please test these out and let me know if they work for you.
Ping Linus & Dave again. Have you guys tried these? Really, it's cool.
Second that, just tested these patches, and these work perfectly. One more reason for me to dump nvidia driver for nouveau.
Unfortunately I spoke too soon.
After suspend to ram, system doesn't properly resume now.
My system is based on nvidia G86, I use latest nouveau drivers, and suspend with compiz running.
I also patched kernel not to do vt switch on suspend/resume:
drivers/gpu/drm/nouveau/nouveau_state.c +3
-0@@ -31,6 +31,7 @@#include "drm_crtc_helper.h" #include <linux/vgaarb.h> #include <linux/vga_switcheroo.h> +#include <linux/suspend.h> #include "nouveau_drv.h" #include "nouveau_drm.h" @@ -771,6 +772,8 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)int ret =nouveau_card_init (dev);if (ret)return ret; + +pm_set_vt_switch (0 ); }Quoted 7 lines
Quoted 5 lines
Quoted 1 line
return 0;Hm I don't see how my patches would have affected suspend/resume, since they just add "
oops_in_progress" checks to a few places. Are you sure something else isn't breaking your resume path?I am sure. I just reverted them, and everything works again. I refer to 3 patches in this thread.
In fact I might look a bit silly, but I applied these patches on top of linus master tree + nouveau master, and suspend to ram works just fine.
Quoted 6 lines
Maybe it shows up when kgdb+kdb isn't compiled in or so. Maybe it just triggered some bug in nouveau drivers...
(Note that I also enabled kgdb, and kdb, and breaking into kdb (SysRQ+g) doesn't switch console mode, just hangs till I press 'g'.
Ok so it sounds like these particular patches are innocent?
Quoted 8 lines
Quoted 2 lines
As for kdb, I think the latest tree is probably missing the graphics switch support on the driver side...
In what part? nouveau or kdb?
Screen does switch to text mode and displays the backtrace on 'panic' (Tested with sysrq+c).
(If kdb is enabled, screen doesn't switch, but allowing kdb to continue via 'g' command eventually breaks into it.)
Ping.
Best regards,
Maxim Levitsky
Quoted 13 lines
Quoted 9 lines · On Fri, 9 Apr 2010 15:10:50 -0700 Jesse Barnes <[email protected]> wrote:
This set of 3 patches makes it a little more likely we'll get panic output onto the screen even when X is running, assuming a KMS enabled stack anyway.
It gets me from a blank or very sparsely populated black screen at panic time, to one including the full backtrace and panic output at panic time (tested with "echo c >
/proc/sysrq-trigger" from an X session).
Quoted 7 lines
Quoted 5 lines
It doesn't cover every case; for instance I think it'll fail when X has disabled the display, but those cases need to be handled with separate patches anyway (need to add atomic DPMS paths for instance).
Anyway, please test these out and let me know if they work for you.
Ping Linus & Dave again. Have you guys tried these? Really, it's cool.
Is this safe with UMS and vgacon/sticon? With a oops while using vgacon you can now touch the hardware buffer while not in vga text mode.
Quoted 17 lines · On Sun, 6 Jun 2010 17:36:24 +0100 (BST) James Simmons <[email protected]>…
Quoted 17 lines
Quoted 13 lines · On Fri, 9 Apr 2010 15:10:50 -0700 Jesse Barnes <[email protected]> wrote:
This set of 3 patches makes it a little more likely we'll get panic output onto the screen even when X is running, assuming a KMS enabled stack anyway.
It gets me from a blank or very sparsely populated black screen at panic time, to one including the full backtrace and panic output at panic time (tested with "echo c >
/proc/sysrq-trigger" from an X session).It doesn't cover every case; for instance I think it'll fail when X has disabled the display, but those cases need to be handled with separate patches anyway (need to add atomic DPMS paths for instance).
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Anyway, please test these out and let me know if they work for you.
Ping Linus & Dave again. Have you guys tried these? Really, it's cool.
Is this safe with UMS and vgacon/sticon? With a oops while using vgacon you can now touch the hardware buffer while not in vga text mode.
Seems unlikely that poking VGA memory at that point would cause data corruption. There shouldn't be any other harm either, since the system is already wedged...
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center