From: Stephan Schmid <stephan_2303-S0/GAf8tV78@public.gmane.org>
To: Nouveau <nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: [Patch] reenable fifos if we get an error while fifos disabled
Date: Sun, 30 Sep 2007 20:46:58 +0200 [thread overview]
Message-ID: <46FFEF22.8080205@web.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 524 bytes --]
Hello,
while playing around with multiple fifo contexts I got fifo hangs when opening glxgears nr.3.
The reason is that in drm/linux_core/nouveau_fifo.c l.342 engine->graph.create_context() returns
-ENOMEM (I dont know why but I think this problems also appears with other errors).
But the real problem is that then nouveau_fifo alloc() returns without reenabling fifo execution,
so all fifos hang.
With this patch glxgears nr.3 only prints scary messages and falls back to software rendering.
Greetings
Stephan Schmid
[-- Attachment #2: patch_fifo_reenable --]
[-- Type: text/plain, Size: 1195 bytes --]
diff --git a/shared-core/nouveau_fifo.c b/shared-core/nouveau_fifo.c
index 437c84f..88a429a 100644
--- a/shared-core/nouveau_fifo.c
+++ b/shared-core/nouveau_fifo.c
@@ -342,6 +342,16 @@ nouveau_fifo_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret,
ret = engine->graph.create_context(chan);
if (ret) {
nouveau_fifo_free(chan);
+
+ NV_WRITE(NV04_PFIFO_CACHE1_DMA_PUSH,
+ NV_READ(NV04_PFIFO_CACHE1_DMA_PUSH) | 1);
+ NV_WRITE(NV03_PFIFO_CACHE1_PUSH0, 0x00000001);
+ NV_WRITE(NV04_PFIFO_CACHE1_PULL0, 0x00000001);
+ NV_WRITE(NV04_PFIFO_CACHE1_PULL1, 0x00000001);
+
+ /* reenable the fifo caches */
+ NV_WRITE(NV03_PFIFO_CACHES, 1);
+
return ret;
}
@@ -349,6 +359,16 @@ nouveau_fifo_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret,
ret = engine->fifo.create_context(chan);
if (ret) {
nouveau_fifo_free(chan);
+
+ NV_WRITE(NV04_PFIFO_CACHE1_DMA_PUSH,
+ NV_READ(NV04_PFIFO_CACHE1_DMA_PUSH) | 1);
+ NV_WRITE(NV03_PFIFO_CACHE1_PUSH0, 0x00000001);
+ NV_WRITE(NV04_PFIFO_CACHE1_PULL0, 0x00000001);
+ NV_WRITE(NV04_PFIFO_CACHE1_PULL1, 0x00000001);
+
+ /* reenable the fifo caches */
+ NV_WRITE(NV03_PFIFO_CACHES, 1);
+
return ret;
}
[-- Attachment #3: Type: text/plain, Size: 181 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
next reply other threads:[~2007-09-30 18:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-30 18:46 Stephan Schmid [this message]
[not found] ` <46FFEF22.8080205-S0/GAf8tV78@public.gmane.org>
2007-09-30 21:30 ` [Patch] reenable fifos if we get an error while fifos disabled matthieu castet
[not found] ` <47001565.2010607-GANU6spQydw@public.gmane.org>
2007-09-30 21:33 ` matthieu castet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46FFEF22.8080205@web.de \
--to=stephan_2303-s0/gaf8tv78@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.