summaryrefslogtreecommitdiff
path: root/nvkm
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2013-04-29 09:44:33 +1000
committerBen Skeggs <bskeggs@redhat.com>2013-06-13 10:38:42 +1000
commit606c4bdd96caa2b7a3ce73d4867d2553371d90c9 (patch)
tree8195fe6dabcd90b49c0783eabed8dfdec79fab6b /nvkm
parent3dc7100fc07cfc9c39ad28b18e3ab86f10b2c6de (diff)
downloadnouveau-606c4bdd96caa2b7a3ce73d4867d2553371d90c9.tar.gz
ce/nve0: stub interrupt handler
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'nvkm')
-rw-r--r--nvkm/engine/copy/nve0.c16
-rw-r--r--nvkm/subdev/mc/nvc0.c1
2 files changed, 17 insertions, 0 deletions
diff --git a/nvkm/engine/copy/nve0.c b/nvkm/engine/copy/nve0.c
index db351c997..30f1ef1ed 100644
--- a/nvkm/engine/copy/nve0.c
+++ b/nvkm/engine/copy/nve0.c
@@ -67,6 +67,19 @@ nve0_copy_cclass = {
* PCOPY engine/subdev functions
******************************************************************************/
+static void
+nve0_copy_intr(struct nouveau_subdev *subdev)
+{
+ const int ce = nv_subidx(nv_object(subdev)) - NVDEV_ENGINE_COPY0;
+ struct nve0_copy_priv *priv = (void *)subdev;
+ u32 stat = nv_rd32(priv, 0x104908 + (ce * 0x1000));
+
+ if (stat) {
+ nv_warn(priv, "unhandled intr 0x%08x\n", stat);
+ nv_wr32(priv, 0x104908 + (ce * 0x1000), stat);
+ }
+}
+
static int
nve0_copy0_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct nouveau_oclass *oclass, void *data, u32 size,
@@ -85,6 +98,7 @@ nve0_copy0_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return ret;
nv_subdev(priv)->unit = 0x00000040;
+ nv_subdev(priv)->intr = nve0_copy_intr;
nv_engine(priv)->cclass = &nve0_copy_cclass;
nv_engine(priv)->sclass = nve0_copy_sclass;
return 0;
@@ -108,6 +122,7 @@ nve0_copy1_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return ret;
nv_subdev(priv)->unit = 0x00000080;
+ nv_subdev(priv)->intr = nve0_copy_intr;
nv_engine(priv)->cclass = &nve0_copy_cclass;
nv_engine(priv)->sclass = nve0_copy_sclass;
return 0;
@@ -128,6 +143,7 @@ nve0_copy2_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return ret;
nv_subdev(priv)->unit = 0x00200000;
+ nv_subdev(priv)->intr = nve0_copy_intr;
nv_engine(priv)->cclass = &nve0_copy_cclass;
nv_engine(priv)->sclass = nve0_copy_sclass;
return 0;
diff --git a/nvkm/subdev/mc/nvc0.c b/nvkm/subdev/mc/nvc0.c
index 737bd4b68..c5da3babb 100644
--- a/nvkm/subdev/mc/nvc0.c
+++ b/nvkm/subdev/mc/nvc0.c
@@ -33,6 +33,7 @@ nvc0_mc_intr[] = {
{ 0x00000001, NVDEV_ENGINE_PPP },
{ 0x00000020, NVDEV_ENGINE_COPY0 },
{ 0x00000040, NVDEV_ENGINE_COPY1 },
+ { 0x00000080, NVDEV_ENGINE_COPY2 },
{ 0x00000100, NVDEV_ENGINE_FIFO },
{ 0x00001000, NVDEV_ENGINE_GR },
{ 0x00008000, NVDEV_ENGINE_BSP },