All of lore.kernel.org
 help / color / mirror / Atom feed
* 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; 22+ 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] 22+ 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; 22+ 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] 22+ 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; 22+ 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] 22+ 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; 22+ 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] 22+ 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; 22+ 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] 22+ 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; 22+ 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] 22+ 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; 22+ 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] 22+ 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; 22+ 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] 22+ 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; 22+ 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] 22+ 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; 22+ 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] 22+ 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; 22+ 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] 22+ 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; 22+ 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] 22+ 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; 22+ 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] 22+ 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; 22+ 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] 22+ 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; 22+ 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] 22+ 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; 22+ 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] 22+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-04-09 22:10 Jesse Barnes
@ 2010-05-20  0:34   ` Jesse Barnes
  2010-05-20  0:34   ` Jesse Barnes
  1 sibling, 0 replies; 22+ 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] 22+ 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; 22+ 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] 22+ messages in thread

* Re: [RFC] Try a bit harder to get output on the screen at panic time
  2010-04-09 22:10 Jesse Barnes
@ 2010-04-19 22:05   ` Jesse Barnes
  2010-05-20  0:34   ` Jesse Barnes
  1 sibling, 0 replies; 22+ 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] 22+ 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; 22+ 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] 22+ messages in thread

* [RFC] Try a bit harder to get output on the screen at panic time
@ 2010-04-09 22:10 Jesse Barnes
  2010-04-19 22:05   ` Jesse Barnes
  2010-05-20  0:34   ` Jesse Barnes
  0 siblings, 2 replies; 22+ 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] 22+ 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; 22+ 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] 22+ messages in thread

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

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-31  5:03 [RFC] Try a bit harder to get output on the screen at panic time Jesse Barnes
2010-05-31  5:03 ` Jesse Barnes
2010-05-31  6:09 ` Dave Airlie
2010-05-31  7:06   ` Maxim Levitsky
  -- strict thread matches above, loose matches on Subject: below --
2010-04-09 22:10 Jesse Barnes
2010-04-19 22:05 ` 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
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.