summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/engine/crypt
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/crypt
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/crypt')
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c13
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c13
2 files changed, 22 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c b/drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c
index a0e5e39..198989b 100644
--- a/drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c
+++ b/drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c
@@ -30,6 +30,7 @@
#include <subdev/fb.h>
+#include <engine/fifo.h>
#include <engine/crypt.h>
struct nv84_crypt_priv {
@@ -133,23 +134,31 @@ static struct nouveau_bitfield nv84_crypt_intr_mask[] = {
static void
nv84_crypt_intr(struct nouveau_subdev *subdev)
{
+ struct nouveau_fifo *pfifo = nouveau_fifo(subdev);
+ struct nouveau_engine *engine = nv_engine(subdev);
+ struct nouveau_object *engctx;
struct nv84_crypt_priv *priv = (void *)subdev;
u32 stat = nv_rd32(priv, 0x102130);
u32 mthd = nv_rd32(priv, 0x102190);
u32 data = nv_rd32(priv, 0x102194);
u32 inst = nv_rd32(priv, 0x102188) & 0x7fffffff;
+ int chid;
+
+ engctx = nouveau_engctx_get(engine, inst);
+ chid = pfifo->chid(pfifo, engctx);
if (stat) {
nv_error(priv, "");
nouveau_bitfield_print(nv84_crypt_intr_mask, stat);
- printk(" ch 0x%010llx mthd 0x%04x data 0x%08x\n",
- (u64)inst << 12, mthd, data);
+ printk(" ch %d [0x%010llx] mthd 0x%04x data 0x%08x\n",
+ chid, (u64)inst << 12, mthd, data);
}
nv_wr32(priv, 0x102130, stat);
nv_wr32(priv, 0x10200c, 0x10);
nv50_fb_trap(nouveau_fb(priv), 1);
+ nouveau_engctx_put(engctx);
}
static int
diff --git a/drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c b/drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c
index 559a1b1..835b8eb 100644
--- a/drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c
+++ b/drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c
@@ -30,6 +30,7 @@
#include <subdev/timer.h>
#include <subdev/fb.h>
+#include <engine/fifo.h>
#include <engine/crypt.h>
#include "fuc/nv98.fuc.h"
@@ -102,6 +103,9 @@ static struct nouveau_enum nv98_crypt_isr_error_name[] = {
static void
nv98_crypt_intr(struct nouveau_subdev *subdev)
{
+ struct nouveau_fifo *pfifo = nouveau_fifo(subdev);
+ struct nouveau_engine *engine = nv_engine(subdev);
+ struct nouveau_object *engctx;
struct nv98_crypt_priv *priv = (void *)subdev;
u32 disp = nv_rd32(priv, 0x08701c);
u32 stat = nv_rd32(priv, 0x087008) & disp & ~(disp >> 16);
@@ -111,12 +115,16 @@ nv98_crypt_intr(struct nouveau_subdev *subdev)
u32 mthd = (addr & 0x07ff) << 2;
u32 subc = (addr & 0x3800) >> 11;
u32 data = nv_rd32(priv, 0x087044);
+ int chid;
+
+ engctx = nouveau_engctx_get(engine, inst);
+ chid = pfifo->chid(pfifo, engctx);
if (stat & 0x00000040) {
nv_error(priv, "DISPATCH_ERROR [");
nouveau_enum_print(nv98_crypt_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, (u64)inst << 12, subc, mthd, data);
nv_wr32(priv, 0x087004, 0x00000040);
stat &= ~0x00000040;
}
@@ -127,6 +135,7 @@ nv98_crypt_intr(struct nouveau_subdev *subdev)
}
nv50_fb_trap(nouveau_fb(priv), 1);
+ nouveau_engctx_put(engctx);
}
static int
OpenPOWER on IntegriCloud