All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fifo/gk104: kick channel upon removal
@ 2016-03-01  7:59 Alexandre Courbot
       [not found] ` <1456819145-3141-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Courbot @ 2016-03-01  7:59 UTC (permalink / raw)
  To: Ben Skeggs, Eric Biggers; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

A channel may still be processed by the PBDMA even after removal, unless
it is properly kicked. Some chips are more sensible to this than others,
with GM20B triggering the issue very easily (the PBDMA will try to fetch
methods from the previously-removed channel after a new one is added).

Make sure this cannot happen by kicking the channel right after it is
disabled, and before the new runlist is submitted.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
Second attempt at this - the first version was reverted after causing a
regression: https://lists.freedesktop.org/archives/nouveau/2015-August/021842.html

I am pretty confident this one will pass though: we are now kicking the channel
only if it has a chance of being scheduled at that time, and in a path from which
we *will* access the FIFO registers after the kick, so if nothing complained until
then, kicking the channel should be unconsequential.

Eric, since you reported the regression on the first version, would you mind trying
this one and giving us your Tested-by? I have tested it on dGPU but unfortunately
could not set it up in an optimus-like manner, with power management kicking in.

 drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c b/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c
index 2e1df01bd928..8b4a5e01829c 100644
--- a/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c
+++ b/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c
@@ -154,6 +154,7 @@ gk104_fifo_gpfifo_fini(struct nvkm_fifo_chan *base)
 	if (!list_empty(&chan->head)) {
 		gk104_fifo_runlist_remove(fifo, chan);
 		nvkm_mask(device, 0x800004 + coff, 0x00000800, 0x00000800);
+		gk104_fifo_gpfifo_kick(chan);
 		gk104_fifo_runlist_commit(fifo, chan->engine);
 	}
 
-- 
2.7.2

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

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

* Re: [PATCH] fifo/gk104: kick channel upon removal
       [not found] ` <1456819145-3141-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2016-03-02  3:53   ` Eric Biggers
  2016-03-02  9:07     ` Alexandre Courbot
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Biggers @ 2016-03-02  3:53 UTC (permalink / raw)
  To: Alexandre Courbot; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Ben Skeggs

On Tue, Mar 01, 2016 at 04:59:05PM +0900, Alexandre Courbot wrote:
> 
> Eric, since you reported the regression on the first version, would you mind trying
> this one and giving us your Tested-by? I have tested it on dGPU but unfortunately
> could not set it up in an optimus-like manner, with power management kicking in.
> 

Thanks.  I've tested Linux 4.5-rc6 with your patch applied, and I've yet to
encounter the crash after about half a dozen reboots.  So it seems good so far,
but I'll keep running it and will let you know if I notice a problem.
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

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

* Re: [PATCH] fifo/gk104: kick channel upon removal
  2016-03-02  3:53   ` Eric Biggers
@ 2016-03-02  9:07     ` Alexandre Courbot
       [not found]       ` <CAAVeFuLGtLK9=qsLf1PcRFrpxuxOTfH6xunb83LBbqqdNPuoQw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Courbot @ 2016-03-02  9:07 UTC (permalink / raw)
  To: Eric Biggers
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	Ben Skeggs

On Wed, Mar 2, 2016 at 12:53 PM, Eric Biggers <ebiggers3@gmail.com> wrote:
> On Tue, Mar 01, 2016 at 04:59:05PM +0900, Alexandre Courbot wrote:
>>
>> Eric, since you reported the regression on the first version, would you mind trying
>> this one and giving us your Tested-by? I have tested it on dGPU but unfortunately
>> could not set it up in an optimus-like manner, with power management kicking in.
>>
>
> Thanks.  I've tested Linux 4.5-rc6 with your patch applied, and I've yet to
> encounter the crash after about half a dozen reboots.  So it seems good so far,
> but I'll keep running it and will let you know if I notice a problem.

Great news, this one was bothering me for some time. Would be grateful
if you could let us know whether things are still going well after
further testing.
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

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

* Re: [PATCH] fifo/gk104: kick channel upon removal
       [not found]       ` <CAAVeFuLGtLK9=qsLf1PcRFrpxuxOTfH6xunb83LBbqqdNPuoQw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-03-07  2:10         ` Alexandre Courbot
       [not found]           ` <CAAVeFu+taWyad_Hes1VVjLiRojEVKiBgFfwiT_M_VL0AdbY2Nw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Courbot @ 2016-03-07  2:10 UTC (permalink / raw)
  To: Eric Biggers
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	Ben Skeggs

On Wed, Mar 2, 2016 at 6:07 PM, Alexandre Courbot <gnurou@gmail.com> wrote:
> On Wed, Mar 2, 2016 at 12:53 PM, Eric Biggers <ebiggers3@gmail.com> wrote:
>> On Tue, Mar 01, 2016 at 04:59:05PM +0900, Alexandre Courbot wrote:
>>>
>>> Eric, since you reported the regression on the first version, would you mind trying
>>> this one and giving us your Tested-by? I have tested it on dGPU but unfortunately
>>> could not set it up in an optimus-like manner, with power management kicking in.
>>>
>>
>> Thanks.  I've tested Linux 4.5-rc6 with your patch applied, and I've yet to
>> encounter the crash after about half a dozen reboots.  So it seems good so far,
>> but I'll keep running it and will let you know if I notice a problem.
>
> Great news, this one was bothering me for some time. Would be grateful
> if you could let us know whether things are still going well after
> further testing.

Hi Eric, just to follow up - are you still happy with this patch?
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

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

* Re: [PATCH] fifo/gk104: kick channel upon removal
       [not found]           ` <CAAVeFu+taWyad_Hes1VVjLiRojEVKiBgFfwiT_M_VL0AdbY2Nw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-03-07  2:32             ` Eric Biggers
  2016-03-07  2:39               ` Alexandre Courbot
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Biggers @ 2016-03-07  2:32 UTC (permalink / raw)
  To: Alexandre Courbot
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	Ben Skeggs

On Mon, Mar 07, 2016 at 11:10:16AM +0900, Alexandre Courbot wrote:
> 
> Hi Eric, just to follow up - are you still happy with this patch?

Yes, I still haven't had any problems with it.
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

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

* Re: [PATCH] fifo/gk104: kick channel upon removal
  2016-03-07  2:32             ` Eric Biggers
@ 2016-03-07  2:39               ` Alexandre Courbot
       [not found]                 ` <CAAVeFuLo9SmOOP+MixSxhnO_GM_fJfRUXjhU-thPQQXdoJFeqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Courbot @ 2016-03-07  2:39 UTC (permalink / raw)
  To: Eric Biggers
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	Ben Skeggs

On Mon, Mar 7, 2016 at 11:32 AM, Eric Biggers <ebiggers3@gmail.com> wrote:
> On Mon, Mar 07, 2016 at 11:10:16AM +0900, Alexandre Courbot wrote:
>>
>> Hi Eric, just to follow up - are you still happy with this patch?
>
> Yes, I still haven't had any problems with it.

Awesome. Clear to add your Tested-by?
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

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

* Re: [PATCH] fifo/gk104: kick channel upon removal
       [not found]                 ` <CAAVeFuLo9SmOOP+MixSxhnO_GM_fJfRUXjhU-thPQQXdoJFeqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-03-07  2:48                   ` Eric Biggers
  0 siblings, 0 replies; 7+ messages in thread
From: Eric Biggers @ 2016-03-07  2:48 UTC (permalink / raw)
  To: Alexandre Courbot
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	Ben Skeggs

On Mon, Mar 07, 2016 at 11:39:18AM +0900, Alexandre Courbot wrote:
> On Mon, Mar 7, 2016 at 11:32 AM, Eric Biggers <ebiggers3@gmail.com> wrote:
> > On Mon, Mar 07, 2016 at 11:10:16AM +0900, Alexandre Courbot wrote:
> >>
> >> Hi Eric, just to follow up - are you still happy with this patch?
> >
> > Yes, I still haven't had any problems with it.
> 
> Awesome. Clear to add your Tested-by?

Yes that's fine with me.
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

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

end of thread, other threads:[~2016-03-07  2:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01  7:59 [PATCH] fifo/gk104: kick channel upon removal Alexandre Courbot
     [not found] ` <1456819145-3141-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-02  3:53   ` Eric Biggers
2016-03-02  9:07     ` Alexandre Courbot
     [not found]       ` <CAAVeFuLGtLK9=qsLf1PcRFrpxuxOTfH6xunb83LBbqqdNPuoQw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-07  2:10         ` Alexandre Courbot
     [not found]           ` <CAAVeFu+taWyad_Hes1VVjLiRojEVKiBgFfwiT_M_VL0AdbY2Nw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-07  2:32             ` Eric Biggers
2016-03-07  2:39               ` Alexandre Courbot
     [not found]                 ` <CAAVeFuLo9SmOOP+MixSxhnO_GM_fJfRUXjhU-thPQQXdoJFeqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-07  2:48                   ` Eric Biggers

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.