All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/nv50: initialize ramht_refs list for faked 0 channel
@ 2010-08-22 18:54 Marcin Slusarz
       [not found] ` <20100822185408.GA2883-OI9uyE9O0yo@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Marcin Slusarz @ 2010-08-22 18:54 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

We need it for PFIFO_INTR_CACHE_ERROR interrupt handling,
because nouveau_fifo_swmthd looks for matching gpuobj in
ramht_refs list.
It fixes kernel panic in nouveau_gpuobj_ref_find.

Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/gpu/drm/nouveau/nv50_instmem.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c
index b57cc4a..6e57426 100644
--- a/drivers/gpu/drm/nouveau/nv50_instmem.c
+++ b/drivers/gpu/drm/nouveau/nv50_instmem.c
@@ -139,6 +139,8 @@ nv50_instmem_init(struct drm_device *dev)
 	chan->file_priv = (struct drm_file *)-2;
 	dev_priv->fifos[0] = dev_priv->fifos[127] = chan;
 
+	INIT_LIST_HEAD(&chan->ramht_refs);
+
 	/* Channel's PRAMIN object + heap */
 	ret = nouveau_gpuobj_new_fake(dev, 0, c_offset, c_size, 0,
 							NULL, &chan->ramin);
-- 
1.7.1.1

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

* Re: [PATCH] drm/nv50: initialize ramht_refs list for faked 0 channel
       [not found] ` <20100822185408.GA2883-OI9uyE9O0yo@public.gmane.org>
@ 2010-08-31 21:22   ` Marcin Slusarz
       [not found]     ` <20100831212223.GA12076-OI9uyE9O0yo@public.gmane.org>
  2010-09-01  9:53   ` Maxim Levitsky
  1 sibling, 1 reply; 8+ messages in thread
From: Marcin Slusarz @ 2010-08-31 21:22 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Sun, Aug 22, 2010 at 08:54:08PM +0200, Marcin Slusarz wrote:
> We need it for PFIFO_INTR_CACHE_ERROR interrupt handling,
> because nouveau_fifo_swmthd looks for matching gpuobj in
> ramht_refs list.
> It fixes kernel panic in nouveau_gpuobj_ref_find.
> 
> Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  drivers/gpu/drm/nouveau/nv50_instmem.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c
> index b57cc4a..6e57426 100644
> --- a/drivers/gpu/drm/nouveau/nv50_instmem.c
> +++ b/drivers/gpu/drm/nouveau/nv50_instmem.c
> @@ -139,6 +139,8 @@ nv50_instmem_init(struct drm_device *dev)
>  	chan->file_priv = (struct drm_file *)-2;
>  	dev_priv->fifos[0] = dev_priv->fifos[127] = chan;
>  
> +	INIT_LIST_HEAD(&chan->ramht_refs);
> +
>  	/* Channel's PRAMIN object + heap */
>  	ret = nouveau_gpuobj_new_fake(dev, 0, c_offset, c_size, 0,
>  							NULL, &chan->ramin);
> -- 

ping

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

* Re: [PATCH] drm/nv50: initialize ramht_refs list for faked 0 channel
       [not found]     ` <20100831212223.GA12076-OI9uyE9O0yo@public.gmane.org>
@ 2010-08-31 21:52       ` Ben Skeggs
  2010-09-02 10:45         ` Marcin Slusarz
  0 siblings, 1 reply; 8+ messages in thread
From: Ben Skeggs @ 2010-08-31 21:52 UTC (permalink / raw)
  To: Marcin Slusarz; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Tue, 2010-08-31 at 23:22 +0200, Marcin Slusarz wrote:
> On Sun, Aug 22, 2010 at 08:54:08PM +0200, Marcin Slusarz wrote:
> > We need it for PFIFO_INTR_CACHE_ERROR interrupt handling,
> > because nouveau_fifo_swmthd looks for matching gpuobj in
> > ramht_refs list.
> > It fixes kernel panic in nouveau_gpuobj_ref_find.
> > 
> > Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> >  drivers/gpu/drm/nouveau/nv50_instmem.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c
> > index b57cc4a..6e57426 100644
> > --- a/drivers/gpu/drm/nouveau/nv50_instmem.c
> > +++ b/drivers/gpu/drm/nouveau/nv50_instmem.c
> > @@ -139,6 +139,8 @@ nv50_instmem_init(struct drm_device *dev)
> >  	chan->file_priv = (struct drm_file *)-2;
> >  	dev_priv->fifos[0] = dev_priv->fifos[127] = chan;
> >  
> > +	INIT_LIST_HEAD(&chan->ramht_refs);
> > +
> >  	/* Channel's PRAMIN object + heap */
> >  	ret = nouveau_gpuobj_new_fake(dev, 0, c_offset, c_size, 0,
> >  							NULL, &chan->ramin);
> > -- 
> 
> ping
Pong!  Thank you for the patch.

I meant to reply to this earlier but it slipped my mind.  I have a
number of pending cleanups to all this stuff that should make this patch
unnecessary.

Ben.
> 
> _______________________________________________
> Nouveau mailing list
> Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau

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

* Re: [PATCH] drm/nv50: initialize ramht_refs list for faked 0 channel
       [not found] ` <20100822185408.GA2883-OI9uyE9O0yo@public.gmane.org>
  2010-08-31 21:22   ` Marcin Slusarz
@ 2010-09-01  9:53   ` Maxim Levitsky
  2010-09-01  9:54     ` Maxim Levitsky
  1 sibling, 1 reply; 8+ messages in thread
From: Maxim Levitsky @ 2010-09-01  9:53 UTC (permalink / raw)
  To: Marcin Slusarz; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Jason Wessel

Hi,

I just tried that patch, but unfortunately nether with nor without it
kdb seems not to work.
It could be id10t error from my side, but I did test the kdb in the past
with few KMS patches, and it seemed to work.

Now I can't even get its prompt on the console.

This is what I do:

echo kbd | sudo tee /sys/module/kgdboc/parameters/kgdboc
(also tried booting with kgdboc=kbd)

Both seems to start kdb, because

maxim@maxim-laptop:~$ cat /sys/module/kgdboc/parameters/kgdboc 
kbd

maxim@maxim-laptop:~$ dmesg | grep kgdb
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-2.6.36-rc3+ root=UUID=52341b68-74f3-4c96-aaf8-7586a06c4b4e ro splash video=nouveau nmi_watchdog=lapic kgdboc=kbd
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.36-rc3+ root=UUID=52341b68-74f3-4c96-aaf8-7586a06c4b4e ro splash video=nouveau nmi_watchdog=lapic kgdboc=kbd
[    2.671914] kgdb: Registered I/O driver kgdboc.


Now when I first switch to console and then press Alt+SysRQ+G, I just get SYSRQ: DEBUG, and system hangs.
It could be printk level, but that should be ok, no?

maxim@maxim-laptop:~$ cat /proc/sys/kernel/printk
7	4	1	7


Also if I remember correct inputting 'g' then ENTER should resume the system, but it doesn't.

So I think kdb doesn't work at all here

Best regards,
	Maxim Levitsky

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

* Re: [PATCH] drm/nv50: initialize ramht_refs list for faked 0 channel
  2010-09-01  9:53   ` Maxim Levitsky
@ 2010-09-01  9:54     ` Maxim Levitsky
  0 siblings, 0 replies; 8+ messages in thread
From: Maxim Levitsky @ 2010-09-01  9:54 UTC (permalink / raw)
  To: Marcin Slusarz; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Jason Wessel

Sorry, wrong thread!

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

* Re: [PATCH] drm/nv50: initialize ramht_refs list for faked 0 channel
  2010-08-31 21:52       ` Ben Skeggs
@ 2010-09-02 10:45         ` Marcin Slusarz
       [not found]           ` <20100902104544.GA2716-OI9uyE9O0yo@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Marcin Slusarz @ 2010-09-02 10:45 UTC (permalink / raw)
  To: Ben Skeggs; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Dave Airlie

On Wed, Sep 01, 2010 at 07:52:58AM +1000, Ben Skeggs wrote:
> On Tue, 2010-08-31 at 23:22 +0200, Marcin Slusarz wrote:
> > On Sun, Aug 22, 2010 at 08:54:08PM +0200, Marcin Slusarz wrote:
> > > We need it for PFIFO_INTR_CACHE_ERROR interrupt handling,
> > > because nouveau_fifo_swmthd looks for matching gpuobj in
> > > ramht_refs list.
> > > It fixes kernel panic in nouveau_gpuobj_ref_find.
> > > 
> > > Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > > ---
> > >  drivers/gpu/drm/nouveau/nv50_instmem.c |    2 ++
> > >  1 files changed, 2 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c
> > > index b57cc4a..6e57426 100644
> > > --- a/drivers/gpu/drm/nouveau/nv50_instmem.c
> > > +++ b/drivers/gpu/drm/nouveau/nv50_instmem.c
> > > @@ -139,6 +139,8 @@ nv50_instmem_init(struct drm_device *dev)
> > >  	chan->file_priv = (struct drm_file *)-2;
> > >  	dev_priv->fifos[0] = dev_priv->fifos[127] = chan;
> > >  
> > > +	INIT_LIST_HEAD(&chan->ramht_refs);
> > > +
> > >  	/* Channel's PRAMIN object + heap */
> > >  	ret = nouveau_gpuobj_new_fake(dev, 0, c_offset, c_size, 0,
> > >  							NULL, &chan->ramin);
> > > -- 
> > 
> > ping
> Pong!  Thank you for the patch.
> 
> I meant to reply to this earlier but it slipped my mind.  I have a
> number of pending cleanups to all this stuff that should make this patch
> unnecessary.

Oh, come on. It's a simple one-line bugfix for easily triggerable kernel panic.
Patch like this should not wait a week for any response - it should be applied
ASAP and go to Linus possibly with -stable tag.

Marcin

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

* Re: [PATCH] drm/nv50: initialize ramht_refs list for faked 0 channel
       [not found]           ` <20100902104544.GA2716-OI9uyE9O0yo@public.gmane.org>
@ 2010-09-02 12:31             ` Ben Skeggs
  2010-09-02 14:00               ` Marcin Slusarz
  0 siblings, 1 reply; 8+ messages in thread
From: Ben Skeggs @ 2010-09-02 12:31 UTC (permalink / raw)
  To: Marcin Slusarz; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Dave Airlie

On Thu, 2010-09-02 at 12:45 +0200, Marcin Slusarz wrote:
> On Wed, Sep 01, 2010 at 07:52:58AM +1000, Ben Skeggs wrote:
> > On Tue, 2010-08-31 at 23:22 +0200, Marcin Slusarz wrote:
> > > On Sun, Aug 22, 2010 at 08:54:08PM +0200, Marcin Slusarz wrote:
> > > > We need it for PFIFO_INTR_CACHE_ERROR interrupt handling,
> > > > because nouveau_fifo_swmthd looks for matching gpuobj in
> > > > ramht_refs list.
> > > > It fixes kernel panic in nouveau_gpuobj_ref_find.
> > > > 
> > > > Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > > > ---
> > > >  drivers/gpu/drm/nouveau/nv50_instmem.c |    2 ++
> > > >  1 files changed, 2 insertions(+), 0 deletions(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c
> > > > index b57cc4a..6e57426 100644
> > > > --- a/drivers/gpu/drm/nouveau/nv50_instmem.c
> > > > +++ b/drivers/gpu/drm/nouveau/nv50_instmem.c
> > > > @@ -139,6 +139,8 @@ nv50_instmem_init(struct drm_device *dev)
> > > >  	chan->file_priv = (struct drm_file *)-2;
> > > >  	dev_priv->fifos[0] = dev_priv->fifos[127] = chan;
> > > >  
> > > > +	INIT_LIST_HEAD(&chan->ramht_refs);
> > > > +
> > > >  	/* Channel's PRAMIN object + heap */
> > > >  	ret = nouveau_gpuobj_new_fake(dev, 0, c_offset, c_size, 0,
> > > >  							NULL, &chan->ramin);
> > > > -- 
> > > 
> > > ping
> > Pong!  Thank you for the patch.
> > 
> > I meant to reply to this earlier but it slipped my mind.  I have a
> > number of pending cleanups to all this stuff that should make this patch
> > unnecessary.
> 
> Oh, come on. It's a simple one-line bugfix for easily triggerable kernel panic.
> Patch like this should not wait a week for any response - it should be applied
> ASAP and go to Linus possibly with -stable tag.
Oh please, it's hardly easily triggerable.  I've *never* seen it
personally, and triggering errors on those channels isn't something that
generally happens.  If you feel that strongly about it I'll send it to
Dave to go to Linus.

Ben.
> 
> Marcin
> 

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

* Re: [PATCH] drm/nv50: initialize ramht_refs list for faked 0 channel
  2010-09-02 12:31             ` Ben Skeggs
@ 2010-09-02 14:00               ` Marcin Slusarz
  0 siblings, 0 replies; 8+ messages in thread
From: Marcin Slusarz @ 2010-09-02 14:00 UTC (permalink / raw)
  To: Ben Skeggs; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Dave Airlie

On Thu, Sep 02, 2010 at 10:31:55PM +1000, Ben Skeggs wrote:
> On Thu, 2010-09-02 at 12:45 +0200, Marcin Slusarz wrote:
> > On Wed, Sep 01, 2010 at 07:52:58AM +1000, Ben Skeggs wrote:
> > > On Tue, 2010-08-31 at 23:22 +0200, Marcin Slusarz wrote:
> > > > On Sun, Aug 22, 2010 at 08:54:08PM +0200, Marcin Slusarz wrote:
> > > > > We need it for PFIFO_INTR_CACHE_ERROR interrupt handling,
> > > > > because nouveau_fifo_swmthd looks for matching gpuobj in
> > > > > ramht_refs list.
> > > > > It fixes kernel panic in nouveau_gpuobj_ref_find.
> > > > > 
> > > > > Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > > > > ---
> > > > >  drivers/gpu/drm/nouveau/nv50_instmem.c |    2 ++
> > > > >  1 files changed, 2 insertions(+), 0 deletions(-)
> > > > > 
> > > > > diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c
> > > > > index b57cc4a..6e57426 100644
> > > > > --- a/drivers/gpu/drm/nouveau/nv50_instmem.c
> > > > > +++ b/drivers/gpu/drm/nouveau/nv50_instmem.c
> > > > > @@ -139,6 +139,8 @@ nv50_instmem_init(struct drm_device *dev)
> > > > >  	chan->file_priv = (struct drm_file *)-2;
> > > > >  	dev_priv->fifos[0] = dev_priv->fifos[127] = chan;
> > > > >  
> > > > > +	INIT_LIST_HEAD(&chan->ramht_refs);
> > > > > +
> > > > >  	/* Channel's PRAMIN object + heap */
> > > > >  	ret = nouveau_gpuobj_new_fake(dev, 0, c_offset, c_size, 0,
> > > > >  							NULL, &chan->ramin);
> > > > > -- 
> > > > 
> > > > ping
> > > Pong!  Thank you for the patch.
> > > 
> > > I meant to reply to this earlier but it slipped my mind.  I have a
> > > number of pending cleanups to all this stuff that should make this patch
> > > unnecessary.
> > 
> > Oh, come on. It's a simple one-line bugfix for easily triggerable kernel panic.
> > Patch like this should not wait a week for any response - it should be applied
> > ASAP and go to Linus possibly with -stable tag.
> Oh please, it's hardly easily triggerable.  I've *never* seen it
> personally, and triggering errors on those channels isn't something that
> generally happens. 

Are you sure you have *never* seen it? Do you have netconsole enabled all the time?
I'm asking because once you hit this bug, machine is dead and you won't find anything
in the logs.

I'm attaching the testcase. Yes, it's that simple.

--
#include <stdio.h>

#include <libdrm/nouveau_drmif.h>
#include <nouveau/nouveau_channel.h>

int main()
{
	struct nouveau_device *dev = NULL;
	struct nouveau_channel *chan = NULL;

	if (nouveau_device_open(&dev, "")) {
		perror("nouveau_device_open");
		return 1;
	}

	if (nouveau_channel_alloc(dev, 0, 0, &chan)) {
		perror("nouveau_channel_alloc");
		return 2;
	}

	return 0;
}

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

end of thread, other threads:[~2010-09-02 14:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-22 18:54 [PATCH] drm/nv50: initialize ramht_refs list for faked 0 channel Marcin Slusarz
     [not found] ` <20100822185408.GA2883-OI9uyE9O0yo@public.gmane.org>
2010-08-31 21:22   ` Marcin Slusarz
     [not found]     ` <20100831212223.GA12076-OI9uyE9O0yo@public.gmane.org>
2010-08-31 21:52       ` Ben Skeggs
2010-09-02 10:45         ` Marcin Slusarz
     [not found]           ` <20100902104544.GA2716-OI9uyE9O0yo@public.gmane.org>
2010-09-02 12:31             ` Ben Skeggs
2010-09-02 14:00               ` Marcin Slusarz
2010-09-01  9:53   ` Maxim Levitsky
2010-09-01  9:54     ` Maxim Levitsky

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.