summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/engine/graph/nv40.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-08-13 16:26:07 +1000
committerBen Skeggs <bskeggs@redhat.com>2012-10-03 13:13:03 +1000
commit72a148277701acf56bcec486a1124499600812e1 (patch)
treeb1b53a80b8c4bfd7b7fd731079f35a2d47b51476 /drivers/gpu/drm/nouveau/core/engine/graph/nv40.c
parent4c2d42225b5024ad88f736608f44b51f702bd4e4 (diff)
downloadop-kernel-dev-72a148277701acf56bcec486a1124499600812e1.zip
op-kernel-dev-72a148277701acf56bcec486a1124499600812e1.tar.gz
drm/nouveau: restore fifo chid information in engine error messages
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/engine/graph/nv40.c')
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/nv40.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nv40.c b/drivers/gpu/drm/nouveau/core/engine/graph/nv40.c
index 2f9f2c6..5690fe3 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/nv40.c
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/nv40.c
@@ -256,26 +256,32 @@ nv40_graph_tile_prog(struct nouveau_engine *engine, int i)
static void
nv40_graph_intr(struct nouveau_subdev *subdev)
{
- struct nv40_graph_priv *priv = (void *)subdev;
+ struct nouveau_fifo *pfifo = nouveau_fifo(subdev);
struct nouveau_engine *engine = nv_engine(subdev);
+ struct nouveau_object *engctx;
struct nouveau_handle *handle = NULL;
+ struct nv40_graph_priv *priv = (void *)subdev;
u32 stat = nv_rd32(priv, NV03_PGRAPH_INTR);
u32 nsource = nv_rd32(priv, NV03_PGRAPH_NSOURCE);
u32 nstatus = nv_rd32(priv, NV03_PGRAPH_NSTATUS);
- u32 inst = (nv_rd32(priv, 0x40032c) & 0x000fffff) << 4;
+ u32 inst = nv_rd32(priv, 0x40032c) & 0x000fffff;
u32 addr = nv_rd32(priv, NV04_PGRAPH_TRAPPED_ADDR);
u32 subc = (addr & 0x00070000) >> 16;
u32 mthd = (addr & 0x00001ffc);
u32 data = nv_rd32(priv, NV04_PGRAPH_TRAPPED_DATA);
u32 class = nv_rd32(priv, 0x400160 + subc * 4) & 0xffff;
u32 show = stat;
+ int chid;
+
+ engctx = nouveau_engctx_get(engine, inst);
+ chid = pfifo->chid(pfifo, engctx);
if (stat & NV_PGRAPH_INTR_ERROR) {
if (nsource & NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD) {
- handle = nouveau_engctx_lookup_class(engine, inst, class);
+ handle = nouveau_handle_get_class(engctx, class);
if (handle && !nv_call(handle->object, mthd, data))
show &= ~NV_PGRAPH_INTR_ERROR;
- nouveau_engctx_handle_put(handle);
+ nouveau_handle_put(handle);
}
if (nsource & NV03_PGRAPH_NSOURCE_DMA_VTX_PROTECTION) {
@@ -294,10 +300,12 @@ nv40_graph_intr(struct nouveau_subdev *subdev)
printk(" nstatus:");
nouveau_bitfield_print(nv10_graph_nstatus, nstatus);
printk("\n");
- nv_error(priv, "ch 0x%08x subc %d class 0x%04x "
+ nv_error(priv, "ch %d [0x%08x] subc %d class 0x%04x "
"mthd 0x%04x data 0x%08x\n",
- inst, subc, class, mthd, data);
+ chid, inst << 4, subc, class, mthd, data);
}
+
+ nouveau_engctx_put(engctx);
}
static int
OpenPOWER on IntegriCloud