summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/engine/mpeg
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/mpeg
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/mpeg')
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c b/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c
index 7a1bc76..9adcefc 100644
--- a/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c
+++ b/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c
@@ -26,13 +26,14 @@
#include <core/class.h>
#include <core/engctx.h>
#include <core/handle.h>
-#include <core/engine/graph/nv40.h>
#include <subdev/fb.h>
#include <subdev/timer.h>
#include <subdev/instmem.h>
+#include <engine/fifo.h>
#include <engine/mpeg.h>
+#include <engine/graph/nv40.h>
struct nv31_mpeg_priv {
struct nouveau_mpeg base;
@@ -195,30 +196,34 @@ nv31_mpeg_tile_prog(struct nouveau_engine *engine, int i)
void
nv31_mpeg_intr(struct nouveau_subdev *subdev)
{
- struct nv31_mpeg_priv *priv = (void *)subdev;
+ struct nouveau_fifo *pfifo = nouveau_fifo(subdev);
struct nouveau_engine *engine = nv_engine(subdev);
- struct nouveau_handle *handle = NULL;
- u32 inst = (nv_rd32(priv, 0x00b318) & 0x000fffff) << 4;
+ struct nouveau_object *engctx;
+ struct nouveau_handle *handle;
+ struct nv31_mpeg_priv *priv = (void *)subdev;
+ u32 inst = nv_rd32(priv, 0x00b318) & 0x000fffff;
u32 stat = nv_rd32(priv, 0x00b100);
u32 type = nv_rd32(priv, 0x00b230);
u32 mthd = nv_rd32(priv, 0x00b234);
u32 data = nv_rd32(priv, 0x00b238);
u32 show = stat;
+ int chid;
+
+ engctx = nouveau_engctx_get(engine, inst);
+ chid = pfifo->chid(pfifo, engctx);
if (stat & 0x01000000) {
/* happens on initial binding of the object */
- if (handle && type == 0x00000020 && mthd == 0x0000) {
+ if (type == 0x00000020 && mthd == 0x0000) {
nv_mask(priv, 0x00b308, 0x00000000, 0x00000000);
show &= ~0x01000000;
}
- if (handle && type == 0x00000010) {
- handle = nouveau_engctx_lookup_class(engine, inst, 0x3174);
-
- if (handle && !nv_call(handle->object, mthd, data)) {
- nouveau_engctx_handle_put(handle);
+ if (type == 0x00000010) {
+ handle = nouveau_handle_get_class(engctx, 0x3174);
+ if (handle && !nv_call(handle->object, mthd, data))
show &= ~0x01000000;
- }
+ nouveau_handle_put(handle);
}
}
@@ -227,8 +232,10 @@ nv31_mpeg_intr(struct nouveau_subdev *subdev)
if (show) {
nv_error(priv, "ch %d [0x%08x] 0x%08x 0x%08x 0x%08x 0x%08x\n",
- inst, stat, type, mthd, data);
+ chid, inst << 4, stat, type, mthd, data);
}
+
+ nouveau_engctx_put(engctx);
}
static int
OpenPOWER on IntegriCloud