Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232506
b: refs/heads/master
c: 51f73d6
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Jan 25, 2011
1 parent 78c54b4 commit 8776c35
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0f1cb203b46f8f836afdd2198060ff6169aa7272
refs/heads/master: 51f73d64b46cb765cd5bee3b8d9f5980c44c6446
19 changes: 19 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/nvc0_graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "nvc0_graph.h"

static void nvc0_graph_isr(struct drm_device *);
static void nvc0_runk140_isr(struct drm_device *);
static int nvc0_graph_unload_context_to(struct drm_device *dev, u64 chan);

void
Expand Down Expand Up @@ -281,6 +282,7 @@ nvc0_graph_destroy(struct drm_device *dev)
return;

nouveau_irq_unregister(dev, 12);
nouveau_irq_unregister(dev, 25);

nouveau_gpuobj_ref(NULL, &priv->unk4188b8);
nouveau_gpuobj_ref(NULL, &priv->unk4188b4);
Expand Down Expand Up @@ -390,6 +392,7 @@ nvc0_graph_create(struct drm_device *dev)
}

nouveau_irq_register(dev, 12, nvc0_graph_isr);
nouveau_irq_register(dev, 25, nvc0_runk140_isr);
NVOBJ_CLASS(dev, 0x902d, GR); /* 2D */
NVOBJ_CLASS(dev, 0x9039, GR); /* M2MF */
NVOBJ_CLASS(dev, 0x9097, GR); /* 3D */
Expand Down Expand Up @@ -777,3 +780,19 @@ nvc0_graph_isr(struct drm_device *dev)

nv_wr32(dev, 0x400500, 0x00010001);
}

static void
nvc0_runk140_isr(struct drm_device *dev)
{
u32 units = nv_rd32(dev, 0x00017c) & 0x1f;

while (units) {
u32 unit = ffs(units) - 1;
u32 reg = 0x140000 + unit * 0x2000;
u32 st0 = nv_mask(dev, reg + 0x1020, 0, 0);
u32 st1 = nv_mask(dev, reg + 0x1420, 0, 0);

NV_INFO(dev, "PRUNK140: %d 0x%08x 0x%08x\n", unit, st0, st1);
units &= ~(1 << unit);
}
}

0 comments on commit 8776c35

Please sign in to comment.