drm/nv50: check for vm traps on every gr irq
authorBen Skeggs <bskeggs@redhat.com>
Mon, 7 Mar 2011 23:57:17 +0000 (09:57 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 14 Mar 2011 06:32:30 +0000 (16:32 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nv04_fifo.c
drivers/gpu/drm/nouveau/nv50_fb.c
drivers/gpu/drm/nouveau/nv50_graph.c
drivers/gpu/drm/nouveau/nv84_crypt.c

index 00aff226397d0519863a16f0dc9e7f7d7385cf7d..8efefed58c159de4d83dd22ea1c802790e5f746f 100644 (file)
@@ -1076,7 +1076,7 @@ extern void nv40_fb_set_tile_region(struct drm_device *dev, int i);
 /* nv50_fb.c */
 extern int  nv50_fb_init(struct drm_device *);
 extern void nv50_fb_takedown(struct drm_device *);
-extern void nv50_fb_vm_trap(struct drm_device *, int display, const char *);
+extern void nv50_fb_vm_trap(struct drm_device *, int display);
 
 /* nvc0_fb.c */
 extern int  nvc0_fb_init(struct drm_device *);
index dfa600c46186606f1b6230c948f82c61306cd1a5..db465a3ee1b2720e73d4043ac245f16102c3514a 100644 (file)
@@ -516,7 +516,7 @@ nv04_fifo_isr(struct drm_device *dev)
 
                if (dev_priv->card_type == NV_50) {
                        if (status & 0x00000010) {
-                               nv50_fb_vm_trap(dev, 1, "PFIFO_BAR_FAULT");
+                               nv50_fb_vm_trap(dev, nouveau_ratelimit());
                                status &= ~0x00000010;
                                nv_wr32(dev, 0x002100, 0x00000010);
                        }
index 705f59743db84bc159de2bfd8d8a1993ac219bed..bdd2afe29205711ea30e43cbf4490d057d8a1585 100644 (file)
@@ -210,7 +210,7 @@ static struct nouveau_enum vm_fault[] = {
 };
 
 void
-nv50_fb_vm_trap(struct drm_device *dev, int display, const char *name)
+nv50_fb_vm_trap(struct drm_device *dev, int display)
 {
        struct drm_nouveau_private *dev_priv = dev->dev_private;
        const struct nouveau_enum *en, *cl;
index a8be5184477a6189714c8985e8bdacc143de1d95..8675b00caf1890b37b81a3245c6ebcb3a636df28 100644 (file)
@@ -702,7 +702,6 @@ nv50_pgraph_tp_trap(struct drm_device *dev, int type, uint32_t ustatus_old,
                tps++;
                switch (type) {
                case 6: /* texture error... unknown for now */
-                       nv50_fb_vm_trap(dev, display, name);
                        if (display) {
                                NV_ERROR(dev, "magic set %d:\n", i);
                                for (r = ustatus_addr + 4; r <= ustatus_addr + 0x10; r += 4)
@@ -725,7 +724,6 @@ nv50_pgraph_tp_trap(struct drm_device *dev, int type, uint32_t ustatus_old,
                        uint32_t e1c = nv_rd32(dev, ustatus_addr + 0x14);
                        uint32_t e20 = nv_rd32(dev, ustatus_addr + 0x18);
                        uint32_t e24 = nv_rd32(dev, ustatus_addr + 0x1c);
-                       nv50_fb_vm_trap(dev, display, name);
                        /* 2d engine destination */
                        if (ustatus & 0x00000010) {
                                if (display) {
@@ -1068,6 +1066,7 @@ nv50_graph_isr(struct drm_device *dev)
                        NV_INFO(dev, "PGRAPH - ch %d (0x%010llx) subc %d "
                                     "class 0x%04x mthd 0x%04x data 0x%08x\n",
                                chid, inst, subc, class, mthd, data);
+                       nv50_fb_vm_trap(dev, 1);
                }
        }
 
index ec18ae1c38862088a9ecf3257003abb36da7396b..fabc7fd30b1d9150e7f532f7cf58de8e5f9f247f 100644 (file)
@@ -136,5 +136,5 @@ nv84_crypt_isr(struct drm_device *dev)
        nv_wr32(dev, 0x102130, stat);
        nv_wr32(dev, 0x10200c, 0x10);
 
-       nv50_fb_vm_trap(dev, show, "PCRYPT");
+       nv50_fb_vm_trap(dev, show);
 }