Skip to content

Commit 51f73d6

Browse files
author
Ben Skeggs
committed
drm/nvc0: implement irq handler for whatever's at 0x14xxxx
This is just barely enough to stop a never-ending IRQ storm that can be triggered by our 3D driver. We have no idea what this engine is.. Signed-off-by: Ben Skeggs <[email protected]>
1 parent 0f1cb20 commit 51f73d6

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

drivers/gpu/drm/nouveau/nvc0_graph.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "nvc0_graph.h"
3232

3333
static void nvc0_graph_isr(struct drm_device *);
34+
static void nvc0_runk140_isr(struct drm_device *);
3435
static int nvc0_graph_unload_context_to(struct drm_device *dev, u64 chan);
3536

3637
void
@@ -281,6 +282,7 @@ nvc0_graph_destroy(struct drm_device *dev)
281282
return;
282283

283284
nouveau_irq_unregister(dev, 12);
285+
nouveau_irq_unregister(dev, 25);
284286

285287
nouveau_gpuobj_ref(NULL, &priv->unk4188b8);
286288
nouveau_gpuobj_ref(NULL, &priv->unk4188b4);
@@ -390,6 +392,7 @@ nvc0_graph_create(struct drm_device *dev)
390392
}
391393

392394
nouveau_irq_register(dev, 12, nvc0_graph_isr);
395+
nouveau_irq_register(dev, 25, nvc0_runk140_isr);
393396
NVOBJ_CLASS(dev, 0x902d, GR); /* 2D */
394397
NVOBJ_CLASS(dev, 0x9039, GR); /* M2MF */
395398
NVOBJ_CLASS(dev, 0x9097, GR); /* 3D */
@@ -777,3 +780,19 @@ nvc0_graph_isr(struct drm_device *dev)
777780

778781
nv_wr32(dev, 0x400500, 0x00010001);
779782
}
783+
784+
static void
785+
nvc0_runk140_isr(struct drm_device *dev)
786+
{
787+
u32 units = nv_rd32(dev, 0x00017c) & 0x1f;
788+
789+
while (units) {
790+
u32 unit = ffs(units) - 1;
791+
u32 reg = 0x140000 + unit * 0x2000;
792+
u32 st0 = nv_mask(dev, reg + 0x1020, 0, 0);
793+
u32 st1 = nv_mask(dev, reg + 0x1420, 0, 0);
794+
795+
NV_INFO(dev, "PRUNK140: %d 0x%08x 0x%08x\n", unit, st0, st1);
796+
units &= ~(1 << unit);
797+
}
798+
}

0 commit comments

Comments
 (0)