All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Try a bit harder to get output on the screen at panic time
@ 2010-04-09 22:10 Jesse Barnes
  2010-04-09 22:11 ` [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode Jesse Barnes
                   ` (5 more replies)
  0 siblings, 6 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-04-09 22:10 UTC (permalink / raw)
  To: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

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.

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode
  2010-04-09 22:10 [RFC] Try a bit harder to get output on the screen at panic time Jesse Barnes
@ 2010-04-09 22:11 ` Jesse Barnes
  2010-04-12  0:05     ` Dave Airlie
  2010-04-09 22:12 ` [PATCH] vt: try harder to print output when panicing Jesse Barnes
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 32+ messages in thread
From: Jesse Barnes @ 2010-04-09 22:11 UTC (permalink / raw)
  To: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

Needed for panic and kdb, since we need to avoid taking the mode_config
mutex.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/drm_fb_helper.c |   42 +++++++++++++++++++++++++++++++++-----
 1 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 6929f5b..962eadb 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -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);
-- 
1.6.6.1



^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH] vt: try harder to print output when panicing
  2010-04-09 22:10 [RFC] Try a bit harder to get output on the screen at panic time Jesse Barnes
  2010-04-09 22:11 ` [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode Jesse Barnes
  2010-04-09 22:12 ` [PATCH] vt: try harder to print output when panicing Jesse Barnes
@ 2010-04-09 22:12 ` Jesse Barnes
  2010-04-09 22:12 ` [PATCH] fbcon: assume console is active if panicing Jesse Barnes
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-04-09 22:12 UTC (permalink / raw)
  To: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

At 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.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/char/vt.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index bd1d116..29ec1c9 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -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)
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH] vt: try harder to print output when panicing
  2010-04-09 22:10 [RFC] Try a bit harder to get output on the screen at panic time Jesse Barnes
  2010-04-09 22:11 ` [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode Jesse Barnes
@ 2010-04-09 22:12 ` Jesse Barnes
  2010-04-09 22:12 ` Jesse Barnes
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-04-09 22:12 UTC (permalink / raw)
  To: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

At 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.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/char/vt.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index bd1d116..29ec1c9 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -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)
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH] fbcon: assume console is active if panicing
  2010-04-09 22:10 [RFC] Try a bit harder to get output on the screen at panic time Jesse Barnes
                   ` (2 preceding siblings ...)
  2010-04-09 22:12 ` Jesse Barnes
@ 2010-04-09 22:12 ` Jesse Barnes
  2010-04-19 22:05   ` Jesse Barnes
  2010-05-20  0:34   ` Jesse Barnes
  5 siblings, 0 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-04-09 22:12 UTC (permalink / raw)
  To: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

This 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.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/video/console/fbcon.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index b0a3fa0..6ca1051 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -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,
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* Re: [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode
  2010-04-09 22:11 ` [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode Jesse Barnes
@ 2010-04-12  0:05     ` Dave Airlie
  0 siblings, 0 replies; 32+ messages in thread
From: Dave Airlie @ 2010-04-12  0:05 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: dri-devel, linux-kernel, Linus Torvalds, James Simmons

On Sat, Apr 10, 2010 at 8:11 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> Needed for panic and kdb, since we need to avoid taking the mode_config
> mutex.

One comment below.

>
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>  drivers/gpu/drm/drm_fb_helper.c |   42 +++++++++++++++++++++++++++++++++-----
>  1 files changed, 36 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 6929f5b..962eadb 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -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();

Any reason to drop the return here?

not just remove the return 0?

Dave.

>        return 0;
>  }
>  EXPORT_SYMBOL(drm_fb_helper_panic);
> --
> 1.6.6.1
>
>
>

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode
@ 2010-04-12  0:05     ` Dave Airlie
  0 siblings, 0 replies; 32+ messages in thread
From: Dave Airlie @ 2010-04-12  0:05 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: Linus Torvalds, linux-kernel, dri-devel

On Sat, Apr 10, 2010 at 8:11 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> Needed for panic and kdb, since we need to avoid taking the mode_config
> mutex.

One comment below.

>
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>  drivers/gpu/drm/drm_fb_helper.c |   42 +++++++++++++++++++++++++++++++++-----
>  1 files changed, 36 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 6929f5b..962eadb 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -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();

Any reason to drop the return here?

not just remove the return 0?

Dave.

>        return 0;
>  }
>  EXPORT_SYMBOL(drm_fb_helper_panic);
> --
> 1.6.6.1
>
>
>

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode
  2010-04-12  0:05     ` Dave Airlie
@ 2010-04-12 15:46       ` Jesse Barnes
  -1 siblings, 0 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-04-12 15:46 UTC (permalink / raw)
  To: Dave Airlie; +Cc: dri-devel, linux-kernel, Linus Torvalds, James Simmons

On Mon, 12 Apr 2010 10:05:00 +1000
Dave Airlie <airlied@gmail.com> wrote:

> On Sat, Apr 10, 2010 at 8:11 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > Needed for panic and kdb, since we need to avoid taking the mode_config
> > mutex.
> 
> One comment below.
> 
> >
> > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> > ---
> >  drivers/gpu/drm/drm_fb_helper.c |   42 +++++++++++++++++++++++++++++++++-----
> >  1 files changed, 36 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> > index 6929f5b..962eadb 100644
> > --- a/drivers/gpu/drm/drm_fb_helper.c
> > +++ b/drivers/gpu/drm/drm_fb_helper.c
> > @@ -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();
> 
> Any reason to drop the return here?
> 
> 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.

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode
@ 2010-04-12 15:46       ` Jesse Barnes
  0 siblings, 0 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-04-12 15:46 UTC (permalink / raw)
  To: Dave Airlie; +Cc: Torvalds, Linus, linux-kernel, dri-devel

On Mon, 12 Apr 2010 10:05:00 +1000
Dave Airlie <airlied@gmail.com> wrote:

> On Sat, Apr 10, 2010 at 8:11 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > Needed for panic and kdb, since we need to avoid taking the mode_config
> > mutex.
> 
> One comment below.
> 
> >
> > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> > ---
> >  drivers/gpu/drm/drm_fb_helper.c |   42 +++++++++++++++++++++++++++++++++-----
> >  1 files changed, 36 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> > index 6929f5b..962eadb 100644
> > --- a/drivers/gpu/drm/drm_fb_helper.c
> > +++ b/drivers/gpu/drm/drm_fb_helper.c
> > @@ -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();
> 
> Any reason to drop the return here?
> 
> 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.

-- 
Jesse Barnes, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode
  2010-04-12  0:05     ` Dave Airlie
@ 2010-04-12 16:05       ` Jesse Barnes
  -1 siblings, 0 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-04-12 16:05 UTC (permalink / raw)
  To: Dave Airlie; +Cc: dri-devel, linux-kernel, Linus Torvalds, James Simmons

On Mon, 12 Apr 2010 10:05:00 +1000
Dave Airlie <airlied@gmail.com> wrote:

> On Sat, Apr 10, 2010 at 8:11 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > Needed for panic and kdb, since we need to avoid taking the mode_config
> > mutex.
> 
> One comment below.

Updated patch below.

-- 
Jesse Barnes, Intel Open Source Technology Center

>From 7e972aa6a2f432b8fd04cb5d1a51f4df2fddea62 Mon Sep 17 00:00:00 2001
From: Jesse Barnes <jbarnes@virtuousgeek.org>
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.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/drm_fb_helper.c |   43 ++++++++++++++++++++++++++++++++------
 1 files changed, 36 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 6929f5b..be0b95a 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -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);
 
-- 
1.6.6.1



^ permalink raw reply related	[flat|nested] 32+ messages in thread

* Re: [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode
@ 2010-04-12 16:05       ` Jesse Barnes
  0 siblings, 0 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-04-12 16:05 UTC (permalink / raw)
  To: Dave Airlie; +Cc: Torvalds, Linus, linux-kernel, dri-devel

On Mon, 12 Apr 2010 10:05:00 +1000
Dave Airlie <airlied@gmail.com> wrote:

> On Sat, Apr 10, 2010 at 8:11 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > Needed for panic and kdb, since we need to avoid taking the mode_config
> > mutex.
> 
> One comment below.

Updated patch below.

-- 
Jesse Barnes, Intel Open Source Technology Center

>From 7e972aa6a2f432b8fd04cb5d1a51f4df2fddea62 Mon Sep 17 00:00:00 2001
From: Jesse Barnes <jbarnes@virtuousgeek.org>
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.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/drm_fb_helper.c |   43 ++++++++++++++++++++++++++++++++------
 1 files changed, 36 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 6929f5b..be0b95a 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -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);
 
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-04-09 22:10 [RFC] Try a bit harder to get output on the screen at panic time Jesse Barnes
@ 2010-04-19 22:05   ` Jesse Barnes
  2010-04-09 22:12 ` [PATCH] vt: try harder to print output when panicing Jesse Barnes
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-04-19 22:05 UTC (permalink / raw)
  Cc: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

On Fri, 9 Apr 2010 15:10:50 -0700
Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> 
> 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,
-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
@ 2010-04-19 22:05   ` Jesse Barnes
  0 siblings, 0 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-04-19 22:05 UTC (permalink / raw)
  Cc: linux-kernel, dri-devel, Torvalds, Linus

On Fri, 9 Apr 2010 15:10:50 -0700
Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> 
> 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,
-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-04-09 22:10 [RFC] Try a bit harder to get output on the screen at panic time Jesse Barnes
@ 2010-05-20  0:34   ` Jesse Barnes
  2010-04-09 22:12 ` [PATCH] vt: try harder to print output when panicing Jesse Barnes
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-05-20  0:34 UTC (permalink / raw)
  Cc: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

On Fri, 9 Apr 2010 15:10:50 -0700
Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> 
> 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.

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
@ 2010-05-20  0:34   ` Jesse Barnes
  0 siblings, 0 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-05-20  0:34 UTC (permalink / raw)
  Cc: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

On Fri, 9 Apr 2010 15:10:50 -0700
Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> 
> 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.

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-05-20  0:34   ` Jesse Barnes
  (?)
@ 2010-05-20  1:13   ` Maxim Levitsky
  2010-05-20  1:27     ` Maxim Levitsky
  -1 siblings, 1 reply; 32+ messages in thread
From: Maxim Levitsky @ 2010-05-20  1:13 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

On Wed, 2010-05-19 at 17:34 -0700, Jesse Barnes wrote: 
> On Fri, 9 Apr 2010 15:10:50 -0700
> Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> > 
> > 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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-05-20  1:13   ` Maxim Levitsky
@ 2010-05-20  1:27     ` Maxim Levitsky
  2010-05-20 16:28       ` Jesse Barnes
  0 siblings, 1 reply; 32+ messages in thread
From: Maxim Levitsky @ 2010-05-20  1:27 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

On Thu, 2010-05-20 at 04:13 +0300, Maxim Levitsky wrote: 
> On Wed, 2010-05-19 at 17:34 -0700, Jesse Barnes wrote: 
> > On Fri, 9 Apr 2010 15:10:50 -0700
> > Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> > > 
> > > 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:

diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c
b/drivers/gpu/drm/nouveau/nouveau_state.c
index 062b7f6..b3ef08b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
@@ -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


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-05-20  1:27     ` Maxim Levitsky
@ 2010-05-20 16:28       ` Jesse Barnes
  2010-05-20 21:14         ` Maxim Levitsky
  0 siblings, 1 reply; 32+ messages in thread
From: Jesse Barnes @ 2010-05-20 16:28 UTC (permalink / raw)
  To: Maxim Levitsky
  Cc: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

On Thu, 20 May 2010 04:27:07 +0300
Maxim Levitsky <maximlevitsky@gmail.com> wrote:

> On Thu, 2010-05-20 at 04:13 +0300, Maxim Levitsky wrote: 
> > On Wed, 2010-05-19 at 17:34 -0700, Jesse Barnes wrote: 
> > > On Fri, 9 Apr 2010 15:10:50 -0700
> > > Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> > > > 
> > > > 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:
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c
> b/drivers/gpu/drm/nouveau/nouveau_state.c
> index 062b7f6..b3ef08b 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_state.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_state.c
> @@ -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;

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?

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-05-20 16:28       ` Jesse Barnes
@ 2010-05-20 21:14         ` Maxim Levitsky
  2010-05-21 21:57             ` Maxim Levitsky
  0 siblings, 1 reply; 32+ messages in thread
From: Maxim Levitsky @ 2010-05-20 21:14 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

On Thu, 2010-05-20 at 09:28 -0700, Jesse Barnes wrote: 
> On Thu, 20 May 2010 04:27:07 +0300
> Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> 
> > On Thu, 2010-05-20 at 04:13 +0300, Maxim Levitsky wrote: 
> > > On Wed, 2010-05-19 at 17:34 -0700, Jesse Barnes wrote: 
> > > > On Fri, 9 Apr 2010 15:10:50 -0700
> > > > Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> > > > > 
> > > > > 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:
> > 
> > diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c
> > b/drivers/gpu/drm/nouveau/nouveau_state.c
> > index 062b7f6..b3ef08b 100644
> > --- a/drivers/gpu/drm/nouveau/nouveau_state.c
> > +++ b/drivers/gpu/drm/nouveau/nouveau_state.c
> > @@ -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;
> 
> 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


> 



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-05-20 21:14         ` Maxim Levitsky
@ 2010-05-21 21:57             ` Maxim Levitsky
  0 siblings, 0 replies; 32+ messages in thread
From: Maxim Levitsky @ 2010-05-21 21:57 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

On Fri, 2010-05-21 at 00:14 +0300, Maxim Levitsky wrote: 
> On Thu, 2010-05-20 at 09:28 -0700, Jesse Barnes wrote: 
> > On Thu, 20 May 2010 04:27:07 +0300
> > Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> > 
> > > On Thu, 2010-05-20 at 04:13 +0300, Maxim Levitsky wrote: 
> > > > On Wed, 2010-05-19 at 17:34 -0700, Jesse Barnes wrote: 
> > > > > On Fri, 9 Apr 2010 15:10:50 -0700
> > > > > Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> > > > > > 
> > > > > > 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:
> > > 
> > > diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c
> > > b/drivers/gpu/drm/nouveau/nouveau_state.c
> > > index 062b7f6..b3ef08b 100644
> > > --- a/drivers/gpu/drm/nouveau/nouveau_state.c
> > > +++ b/drivers/gpu/drm/nouveau/nouveau_state.c
> > > @@ -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;
> > 
> > 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



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
@ 2010-05-21 21:57             ` Maxim Levitsky
  0 siblings, 0 replies; 32+ messages in thread
From: Maxim Levitsky @ 2010-05-21 21:57 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: Linus Torvalds, linux-kernel, dri-devel

On Fri, 2010-05-21 at 00:14 +0300, Maxim Levitsky wrote: 
> On Thu, 2010-05-20 at 09:28 -0700, Jesse Barnes wrote: 
> > On Thu, 20 May 2010 04:27:07 +0300
> > Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> > 
> > > On Thu, 2010-05-20 at 04:13 +0300, Maxim Levitsky wrote: 
> > > > On Wed, 2010-05-19 at 17:34 -0700, Jesse Barnes wrote: 
> > > > > On Fri, 9 Apr 2010 15:10:50 -0700
> > > > > Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> > > > > > 
> > > > > > 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:
> > > 
> > > diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c
> > > b/drivers/gpu/drm/nouveau/nouveau_state.c
> > > index 062b7f6..b3ef08b 100644
> > > --- a/drivers/gpu/drm/nouveau/nouveau_state.c
> > > +++ b/drivers/gpu/drm/nouveau/nouveau_state.c
> > > @@ -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;
> > 
> > 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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-05-21 21:57             ` Maxim Levitsky
  (?)
@ 2010-05-21 22:02             ` Jesse Barnes
  2010-05-21 22:26               ` Maxim Levitsky
  -1 siblings, 1 reply; 32+ messages in thread
From: Jesse Barnes @ 2010-05-21 22:02 UTC (permalink / raw)
  To: Maxim Levitsky
  Cc: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

On Sat, 22 May 2010 00:57:30 +0300
Maxim Levitsky <maximlevitsky@gmail.com> wrote:

> On Fri, 2010-05-21 at 00:14 +0300, Maxim Levitsky wrote: 
> > On Thu, 2010-05-20 at 09:28 -0700, Jesse Barnes wrote: 
> > > On Thu, 20 May 2010 04:27:07 +0300
> > > Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> > > 
> > > > On Thu, 2010-05-20 at 04:13 +0300, Maxim Levitsky wrote: 
> > > > > On Wed, 2010-05-19 at 17:34 -0700, Jesse Barnes wrote: 
> > > > > > On Fri, 9 Apr 2010 15:10:50 -0700
> > > > > > Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> > > > > > > 
> > > > > > > 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:
> > > > 
> > > > diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c
> > > > b/drivers/gpu/drm/nouveau/nouveau_state.c
> > > > index 062b7f6..b3ef08b 100644
> > > > --- a/drivers/gpu/drm/nouveau/nouveau_state.c
> > > > +++ b/drivers/gpu/drm/nouveau/nouveau_state.c
> > > > @@ -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;
> > > 
> > > 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'.

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...

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-05-21 22:02             ` Jesse Barnes
@ 2010-05-21 22:26               ` Maxim Levitsky
  2010-05-30 14:48                 ` Maxim Levitsky
  0 siblings, 1 reply; 32+ messages in thread
From: Maxim Levitsky @ 2010-05-21 22:26 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

On Fri, 2010-05-21 at 15:02 -0700, Jesse Barnes wrote: 
> On Sat, 22 May 2010 00:57:30 +0300
> Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> 
> > On Fri, 2010-05-21 at 00:14 +0300, Maxim Levitsky wrote: 
> > > On Thu, 2010-05-20 at 09:28 -0700, Jesse Barnes wrote: 
> > > > On Thu, 20 May 2010 04:27:07 +0300
> > > > Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> > > > 
> > > > > On Thu, 2010-05-20 at 04:13 +0300, Maxim Levitsky wrote: 
> > > > > > On Wed, 2010-05-19 at 17:34 -0700, Jesse Barnes wrote: 
> > > > > > > On Fri, 9 Apr 2010 15:10:50 -0700
> > > > > > > Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> > > > > > > > 
> > > > > > > > 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:
> > > > > 
> > > > > diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c
> > > > > b/drivers/gpu/drm/nouveau/nouveau_state.c
> > > > > index 062b7f6..b3ef08b 100644
> > > > > --- a/drivers/gpu/drm/nouveau/nouveau_state.c
> > > > > +++ b/drivers/gpu/drm/nouveau/nouveau_state.c
> > > > > @@ -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;
> > > > 
> > > > 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'.
> 
> 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



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-05-21 22:26               ` Maxim Levitsky
@ 2010-05-30 14:48                 ` Maxim Levitsky
  0 siblings, 0 replies; 32+ messages in thread
From: Maxim Levitsky @ 2010-05-30 14:48 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

On Sat, 2010-05-22 at 01:26 +0300, Maxim Levitsky wrote: 
> On Fri, 2010-05-21 at 15:02 -0700, Jesse Barnes wrote: 
> > On Sat, 22 May 2010 00:57:30 +0300
> > Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> > 
> > > On Fri, 2010-05-21 at 00:14 +0300, Maxim Levitsky wrote: 
> > > > On Thu, 2010-05-20 at 09:28 -0700, Jesse Barnes wrote: 
> > > > > On Thu, 20 May 2010 04:27:07 +0300
> > > > > Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> > > > > 
> > > > > > On Thu, 2010-05-20 at 04:13 +0300, Maxim Levitsky wrote: 
> > > > > > > On Wed, 2010-05-19 at 17:34 -0700, Jesse Barnes wrote: 
> > > > > > > > On Fri, 9 Apr 2010 15:10:50 -0700
> > > > > > > > Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> > > > > > > > > 
> > > > > > > > > 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:
> > > > > > 
> > > > > > diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c
> > > > > > b/drivers/gpu/drm/nouveau/nouveau_state.c
> > > > > > index 062b7f6..b3ef08b 100644
> > > > > > --- a/drivers/gpu/drm/nouveau/nouveau_state.c
> > > > > > +++ b/drivers/gpu/drm/nouveau/nouveau_state.c
> > > > > > @@ -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;
> > > > > 
> > > > > 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'.
> > 
> > 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.)

Ping.

Best regards,
Maxim Levitsky


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-05-20  0:34   ` Jesse Barnes
@ 2010-06-06 16:36     ` James Simmons
  -1 siblings, 0 replies; 32+ messages in thread
From: James Simmons @ 2010-06-06 16:36 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie


> On Fri, 9 Apr 2010 15:10:50 -0700
> Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> > 
> > 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. 

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
@ 2010-06-06 16:36     ` James Simmons
  0 siblings, 0 replies; 32+ messages in thread
From: James Simmons @ 2010-06-06 16:36 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: Linus Torvalds, linux-kernel, dri-devel


> On Fri, 9 Apr 2010 15:10:50 -0700
> Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> > 
> > 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. 

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-06-06 16:36     ` James Simmons
  (?)
@ 2010-06-08 23:20     ` Jesse Barnes
  -1 siblings, 0 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-06-08 23:20 UTC (permalink / raw)
  To: James Simmons; +Cc: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie

On Sun, 6 Jun 2010 17:36:24 +0100 (BST)
James Simmons <jsimmons@infradead.org> wrote:

> 
> > On Fri, 9 Apr 2010 15:10:50 -0700
> > Jesse Barnes <jbarnes@virtuousgeek.org> 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).
> > > 
> > > 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...

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-05-31  6:09 ` Dave Airlie
@ 2010-05-31  7:06   ` Maxim Levitsky
  0 siblings, 0 replies; 32+ messages in thread
From: Maxim Levitsky @ 2010-05-31  7:06 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Jesse Barnes, dri-devel, linux-kernel, Linus Torvalds, James Simmons

On Mon, 2010-05-31 at 16:09 +1000, Dave Airlie wrote: 
> On Mon, May 31, 2010 at 3:03 PM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > I'll test again this week.  I still don't see how these small patches could cause issues with suspend/resume unless we set oops_in_progress during that time on your machine...
> >
These do work fine. I guess that was something unrelated.
Sorry for noise!


Best regards,
Maxim Levitsky

> > Jesse
> 
> I've just given these a test on the EL6 kernel, and they seem to be
> working well for me here,
> 
> They don't seem to break s/r here at least, and I can see crashes now
> on screen which is a win. I'll get some time to try and set them up
> for upstream asap.
> 
> Dave.



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-05-31  5:03 ` Jesse Barnes
  (?)
@ 2010-05-31  6:09 ` Dave Airlie
  2010-05-31  7:06   ` Maxim Levitsky
  -1 siblings, 1 reply; 32+ messages in thread
From: Dave Airlie @ 2010-05-31  6:09 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: Maxim Levitsky, dri-devel, linux-kernel, Linus Torvalds, James Simmons

On Mon, May 31, 2010 at 3:03 PM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> I'll test again this week.  I still don't see how these small patches could cause issues with suspend/resume unless we set oops_in_progress during that time on your machine...
>
> Jesse

I've just given these a test on the EL6 kernel, and they seem to be
working well for me here,

They don't seem to break s/r here at least, and I can see crashes now
on screen which is a win. I'll get some time to try and set them up
for upstream asap.

Dave.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
@ 2010-05-31  5:03 ` Jesse Barnes
  0 siblings, 0 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-05-31  5:03 UTC (permalink / raw)
  To: Maxim Levitsky
  Cc: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 4886 bytes --]

I'll test again this week.  I still don't see how these small patches could cause issues with suspend/resume unless we set oops_in_progress during that time on your machine...
Jesse
Maxim Levitsky <maximlevitsky@gmail.com> wrote:
>On Sat, 2010-05-22 at 01:26 +0300, Maxim Levitsky wrote: >> On Fri, 2010-05-21 at 15:02 -0700, Jesse Barnes wrote: >> > On Sat, 22 May 2010 00:57:30 +0300>> > Maxim Levitsky <maximlevitsky@gmail.com> wrote:>> > >> > > On Fri, 2010-05-21 at 00:14 +0300, Maxim Levitsky wrote: >> > > > On Thu, 2010-05-20 at 09:28 -0700, Jesse Barnes wrote: >> > > > > On Thu, 20 May 2010 04:27:07 +0300>> > > > > Maxim Levitsky <maximlevitsky@gmail.com> wrote:>> > > > > >> > > > > > On Thu, 2010-05-20 at 04:13 +0300, Maxim Levitsky wrote: >> > > > > > > On Wed, 2010-05-19 at 17:34 -0700, Jesse Barnes wrote: >> > > > > > > > On Fri, 9 Apr 2010 15:10:50 -0700>> > > > > > > > Jesse Barnes <jbarnes@virtuousgeek.org> 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).>> > > > > > > > > >> > > > > > > > > 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:>> > > > > > >> > > > > > diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c>> > > > > > b/drivers/gpu/drm/nouveau/nouveau_state.c>> > > > > > index 062b7f6..b3ef08b 100644>> > > > > > --- a/drivers/gpu/drm/nouveau/nouveau_state.c>> > > > > > +++ b/drivers/gpu/drm/nouveau/nouveau_state.c>> > > > > > @@ -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;>> > > > > >> > > > > 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'.>> > >> > 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.)>>Ping.>>Best regards,>Maxim Levitsky>>ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
@ 2010-05-31  5:03 ` Jesse Barnes
  0 siblings, 0 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-05-31  5:03 UTC (permalink / raw)
  To: Maxim Levitsky
  Cc: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

I'll test again this week.  I still don't see how these small patches could cause issues with suspend/resume unless we set oops_in_progress during that time on your machine...

Jesse

Maxim Levitsky <maximlevitsky@gmail.com> wrote:

>On Sat, 2010-05-22 at 01:26 +0300, Maxim Levitsky wrote: 
>> On Fri, 2010-05-21 at 15:02 -0700, Jesse Barnes wrote: 
>> > On Sat, 22 May 2010 00:57:30 +0300
>> > Maxim Levitsky <maximlevitsky@gmail.com> wrote:
>> > 
>> > > On Fri, 2010-05-21 at 00:14 +0300, Maxim Levitsky wrote: 
>> > > > On Thu, 2010-05-20 at 09:28 -0700, Jesse Barnes wrote: 
>> > > > > On Thu, 20 May 2010 04:27:07 +0300
>> > > > > Maxim Levitsky <maximlevitsky@gmail.com> wrote:
>> > > > > 
>> > > > > > On Thu, 2010-05-20 at 04:13 +0300, Maxim Levitsky wrote: 
>> > > > > > > On Wed, 2010-05-19 at 17:34 -0700, Jesse Barnes wrote: 
>> > > > > > > > On Fri, 9 Apr 2010 15:10:50 -0700
>> > > > > > > > Jesse Barnes <jbarnes@virtuousgeek.org> 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).
>> > > > > > > > > 
>> > > > > > > > > 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:
>> > > > > > 
>> > > > > > diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c
>> > > > > > b/drivers/gpu/drm/nouveau/nouveau_state.c
>> > > > > > index 062b7f6..b3ef08b 100644
>> > > > > > --- a/drivers/gpu/drm/nouveau/nouveau_state.c
>> > > > > > +++ b/drivers/gpu/drm/nouveau/nouveau_state.c
>> > > > > > @@ -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;
>> > > > > 
>> > > > > 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'.
>> > 
>> > 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.)
>
>Ping.
>
>Best regards,
>Maxim Levitsky
>
>

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [RFC] Try a bit harder to get output on the screen at panic time
@ 2010-04-09 22:10 Jesse Barnes
  0 siblings, 0 replies; 32+ messages in thread
From: Jesse Barnes @ 2010-04-09 22:10 UTC (permalink / raw)
  To: dri-devel, linux-kernel, Linus Torvalds, Dave Airlie, James Simmons

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.

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2010-06-08 23:21 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-09 22:10 [RFC] Try a bit harder to get output on the screen at panic time Jesse Barnes
2010-04-09 22:11 ` [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode Jesse Barnes
2010-04-12  0:05   ` Dave Airlie
2010-04-12  0:05     ` Dave Airlie
2010-04-12 15:46     ` Jesse Barnes
2010-04-12 15:46       ` Jesse Barnes
2010-04-12 16:05     ` Jesse Barnes
2010-04-12 16:05       ` Jesse Barnes
2010-04-09 22:12 ` [PATCH] vt: try harder to print output when panicing Jesse Barnes
2010-04-09 22:12 ` Jesse Barnes
2010-04-09 22:12 ` [PATCH] fbcon: assume console is active if panicing Jesse Barnes
2010-04-19 22:05 ` [RFC] Try a bit harder to get output on the screen at panic time Jesse Barnes
2010-04-19 22:05   ` Jesse Barnes
2010-05-20  0:34 ` Jesse Barnes
2010-05-20  0:34   ` Jesse Barnes
2010-05-20  1:13   ` Maxim Levitsky
2010-05-20  1:27     ` Maxim Levitsky
2010-05-20 16:28       ` Jesse Barnes
2010-05-20 21:14         ` Maxim Levitsky
2010-05-21 21:57           ` Maxim Levitsky
2010-05-21 21:57             ` Maxim Levitsky
2010-05-21 22:02             ` Jesse Barnes
2010-05-21 22:26               ` Maxim Levitsky
2010-05-30 14:48                 ` Maxim Levitsky
2010-06-06 16:36   ` James Simmons
2010-06-06 16:36     ` James Simmons
2010-06-08 23:20     ` Jesse Barnes
  -- strict thread matches above, loose matches on Subject: below --
2010-05-31  5:03 Jesse Barnes
2010-05-31  5:03 ` Jesse Barnes
2010-05-31  6:09 ` Dave Airlie
2010-05-31  7:06   ` Maxim Levitsky
2010-04-09 22:10 Jesse Barnes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.