drm/nvd0/disp: hook evo up to debugging
authorBen Skeggs <bskeggs@redhat.com>
Fri, 11 Nov 2011 10:26:44 +0000 (20:26 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 21 Dec 2011 09:01:32 +0000 (19:01 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvd0_display.c

index a54f96751e1fd0c18cdc164b483e4d6c2d606545..5d01f1b64e267ab8e2d51acdd6cbfaa34c14c929 100644 (file)
@@ -84,6 +84,9 @@ evo_wait(struct drm_device *dev, int id, int nr)
                put = 0;
        }
 
+       if (nouveau_reg_debug & NOUVEAU_REG_DEBUG_EVO)
+               NV_INFO(dev, "Evo%d: %p START\n", id, disp->evo[id].ptr + put);
+
        return disp->evo[id].ptr + put;
 }
 
@@ -91,6 +94,16 @@ static void
 evo_kick(u32 *push, struct drm_device *dev, int id)
 {
        struct nvd0_display *disp = nvd0_display(dev);
+
+       if (nouveau_reg_debug & NOUVEAU_REG_DEBUG_EVO) {
+               u32 curp = nv_rd32(dev, 0x640000 + (id * 0x1000)) >> 2;
+               u32 *cur = disp->evo[id].ptr + curp;
+
+               while (cur < push)
+                       NV_INFO(dev, "Evo%d: 0x%08x\n", id, *cur++);
+               NV_INFO(dev, "Evo%d: %p KICK!\n", id, push);
+       }
+
        nv_wr32(dev, 0x640000 + (id * 0x1000), (push - disp->evo[id].ptr) << 2);
 }