Full piglit run with this patch:
http://people.freedesktop.org/~mslusarz/chan_owners.txt
This patch covers only a small subset of all error messages, so:
Not-yet-signed-off-by: Marcin Slusarz marcin.slus...@gmail.com
Comments? Ideas?
(This commit depends on this one:
http://people.freedesktop.org/~mslusarz/0001-drm-nouveau-split-fifo-interrupt-handler.patch
)
---
core/engine/fifo/nv04.c| 43 +---
core/engine/graph/nv50.c | 14 +--
core/include/core/client.h |2 -
core/subdev/fb/nv50.c | 53 ++---
nouveau_drm.c |5 ++--
5 files changed, 100 insertions(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c
b/drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c
index 76944c4..f5d4d28 100644
--- a/drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c
+++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c
@@ -24,6 +24,7 @@
#include core/os.h
#include core/class.h
+#include core/client.h
#include core/engctx.h
#include core/namedb.h
#include core/handle.h
@@ -398,10 +399,29 @@ out:
return handled;
}
+static struct nouveau_client *
+nv04_fifo_client_for_chid(struct nv04_fifo_priv *priv, u32 chid)
+{
+ struct nouveau_fifo_chan *chan;
+ struct nouveau_client *client = NULL;
+ unsigned long flags;
+
+ spin_lock_irqsave(priv-base.lock, flags);
+ if (chid = priv-base.min
+ chid = priv-base.max) {
+ chan = (void *)priv-base.channel[chid];
+ client = nouveau_client(chan);
+ }
+ spin_unlock_irqrestore(priv-base.lock, flags);
+
+ return client;
+}
+
static void
nv04_fifo_cache_error(struct nouveau_device *device,
struct nv04_fifo_priv *priv, u32 chid, u32 get)
{
+ struct nouveau_client *client;
u32 mthd, data;
int ptr;
@@ -421,9 +441,12 @@ nv04_fifo_cache_error(struct nouveau_device *device,
}
if (!nv04_fifo_swmthd(priv, chid, mthd, data)) {
+ client = nv04_fifo_client_for_chid(priv, chid);
+
nv_error(priv,
-CACHE_ERROR - Ch %d/%d Mthd 0x%04x Data 0x%08x\n,
-chid, (mthd 13) 7, mthd 0x1ffc, data);
+CACHE_ERROR - Ch %d/%d [%s] Mthd 0x%04x Data
0x%08x\n,
+chid, (mthd 13) 7, client ? client-name : unk,
+mthd 0x1ffc, data);
}
nv_wr32(priv, NV04_PFIFO_CACHE1_DMA_PUSH, 0);
@@ -445,11 +468,14 @@ static void
nv04_fifo_dma_pusher(struct nouveau_device *device, struct nv04_fifo_priv
*priv,
u32 chid)
{
+ struct nouveau_client *client;
u32 dma_get = nv_rd32(priv, 0x003244);
u32 dma_put = nv_rd32(priv, 0x003240);
u32 push = nv_rd32(priv, 0x003220);
u32 state = nv_rd32(priv, 0x003228);
+ client = nv04_fifo_client_for_chid(priv, chid);
+
if (device-card_type == NV_50) {
u32 ho_get = nv_rd32(priv, 0x003328);
u32 ho_put = nv_rd32(priv, 0x003320);
@@ -457,9 +483,10 @@ nv04_fifo_dma_pusher(struct nouveau_device *device, struct
nv04_fifo_priv *priv,
u32 ib_put = nv_rd32(priv, 0x003330);
nv_error(priv,
-DMA_PUSHER - Ch %d Get 0x%02x%08x Put 0x%02x%08x
IbGet 0x%08x IbPut 0x%08x State 0x%08x (err: %s) Push 0x%08x\n,
-chid, ho_get, dma_get, ho_put, dma_put, ib_get, ib_put,
-state, nv_dma_state_err(state), push);
+DMA_PUSHER - Ch %d [%s] Get 0x%02x%08x Put 0x%02x%08x
IbGet 0x%08x IbPut 0x%08x State 0x%08x (err: %s) Push 0x%08x\n,
+chid, client ? client-name : unk, ho_get, dma_get,
+ho_put, dma_put, ib_get, ib_put, state,
+nv_dma_state_err(state), push);
/* METHOD_COUNT, in DMA_STATE on earlier chipsets */
nv_wr32(priv, 0x003364, 0x);
@@ -471,9 +498,9 @@ nv04_fifo_dma_pusher(struct nouveau_device *device, struct
nv04_fifo_priv *priv,
nv_wr32(priv, 0x003334, ib_put);
} else {
nv_error(priv,
-DMA_PUSHER - Ch %d Get 0x%08x Put 0x%08x State 0x%08x
(err: %s) Push 0x%08x\n,
-chid, dma_get, dma_put, state, nv_dma_state_err(state),
-push);
+DMA_PUSHER - Ch %d [%s] Get 0x%08x Put 0x%08x State
0x%08x (err: %s) Push 0x%08x\n,
+chid, client ? client-name : unk, dma_get, dma_put,
+state, nv_dma_state_err(state), push);
if (dma_get != dma_put)
nv_wr32(priv, 0x003244, dma_put);
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c
b/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c
index