diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-08-13 16:26:07 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-03 13:13:03 +1000 |
commit | 72a148277701acf56bcec486a1124499600812e1 (patch) | |
tree | b1b53a80b8c4bfd7b7fd731079f35a2d47b51476 /drivers/gpu/drm/nouveau/core/engine/copy | |
parent | 4c2d42225b5024ad88f736608f44b51f702bd4e4 (diff) | |
download | op-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/copy')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/copy/nva3.c | 15 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c | 14 |
2 files changed, 24 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/copy/nva3.c b/drivers/gpu/drm/nouveau/core/engine/copy/nva3.c index debb828..c43c334 100644 --- a/drivers/gpu/drm/nouveau/core/engine/copy/nva3.c +++ b/drivers/gpu/drm/nouveau/core/engine/copy/nva3.c @@ -30,6 +30,7 @@ #include <subdev/fb.h> #include <subdev/vm.h> +#include <engine/fifo.h> #include <engine/copy.h> #include "fuc/nva3.fuc.h" @@ -102,21 +103,28 @@ static struct nouveau_enum nva3_copy_isr_error_name[] = { static void nva3_copy_intr(struct nouveau_subdev *subdev) { + struct nouveau_fifo *pfifo = nouveau_fifo(subdev); + struct nouveau_engine *engine = nv_engine(subdev); + struct nouveau_object *engctx; struct nva3_copy_priv *priv = (void *)subdev; u32 dispatch = nv_rd32(priv, 0x10401c); u32 stat = nv_rd32(priv, 0x104008) & dispatch & ~(dispatch >> 16); - u32 inst = nv_rd32(priv, 0x104050) & 0x3fffffff; + u64 inst = nv_rd32(priv, 0x104050) & 0x3fffffff; u32 ssta = nv_rd32(priv, 0x104040) & 0x0000ffff; u32 addr = nv_rd32(priv, 0x104040) >> 16; u32 mthd = (addr & 0x07ff) << 2; u32 subc = (addr & 0x3800) >> 11; u32 data = nv_rd32(priv, 0x104044); + int chid; + + engctx = nouveau_engctx_get(engine, inst); + chid = pfifo->chid(pfifo, engctx); if (stat & 0x00000040) { nv_error(priv, "DISPATCH_ERROR ["); nouveau_enum_print(nva3_copy_isr_error_name, ssta); - printk("] ch 0x%08x subc %d mthd 0x%04x data 0x%08x\n", - inst, subc, mthd, data); + printk("] ch %d [0x%010llx] subc %d mthd 0x%04x data 0x%08x\n", + chid, inst << 12, subc, mthd, data); nv_wr32(priv, 0x104004, 0x00000040); stat &= ~0x00000040; } @@ -127,6 +135,7 @@ nva3_copy_intr(struct nouveau_subdev *subdev) } nv50_fb_trap(nouveau_fb(priv), 1); + nouveau_engctx_put(engctx); } static int diff --git a/drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c index ecc8faa..0c0ce0f 100644 --- a/drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c @@ -27,6 +27,7 @@ #include <core/class.h> #include <core/engctx.h> +#include <engine/fifo.h> #include <engine/copy.h> #include "fuc/nvc0.fuc.h" @@ -113,6 +114,9 @@ static struct nouveau_enum nvc0_copy_isr_error_name[] = { static void nvc0_copy_intr(struct nouveau_subdev *subdev) { + struct nouveau_fifo *pfifo = nouveau_fifo(subdev); + struct nouveau_engine *engine = nv_engine(subdev); + struct nouveau_object *engctx; int idx = nv_engidx(nv_object(subdev)) - NVDEV_ENGINE_COPY0; struct nvc0_copy_priv *priv = (void *)subdev; u32 disp = nv_rd32(priv, 0x10401c + (idx * 0x1000)); @@ -124,12 +128,16 @@ nvc0_copy_intr(struct nouveau_subdev *subdev) u32 mthd = (addr & 0x07ff) << 2; u32 subc = (addr & 0x3800) >> 11; u32 data = nv_rd32(priv, 0x104044 + (idx * 0x1000)); + int chid; + + engctx = nouveau_engctx_get(engine, inst); + chid = pfifo->chid(pfifo, engctx); if (stat & 0x00000040) { nv_error(priv, "DISPATCH_ERROR ["); nouveau_enum_print(nvc0_copy_isr_error_name, ssta); - printk("] ch 0x%010llx subc %d mthd 0x%04x data 0x%08x\n", - (u64)inst << 12, subc, mthd, data); + printk("] ch %d [0x%010llx] subc %d mthd 0x%04x data 0x%08x\n", + chid, (u64)inst << 12, subc, mthd, data); nv_wr32(priv, 0x104004 + (idx * 0x1000), 0x00000040); stat &= ~0x00000040; } @@ -138,6 +146,8 @@ nvc0_copy_intr(struct nouveau_subdev *subdev) nv_error(priv, "unhandled intr 0x%08x\n", stat); nv_wr32(priv, 0x104004 + (idx * 0x1000), stat); } + + nouveau_engctx_put(engctx); } static int |