From: Martin Peres Date: Fri, 7 Dec 2012 01:26:02 +0000 (+0100) Subject: drm/nv41/bus: report useful data on mmio fault X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9d7175c808793b3e30db455da7529d3c05b00712;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drm/nv41/bus: report useful data on mmio fault Based on Ben Skeggs's nvc0 patch. Tested on my nv4b, 84 and 92. Signed-off-by: Martin Peres --- diff --git a/drivers/gpu/drm/nouveau/core/subdev/bus/nv31.c b/drivers/gpu/drm/nouveau/core/subdev/bus/nv31.c index d996b5dc0cb3..34132aef34e1 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bus/nv31.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bus/nv31.c @@ -42,8 +42,14 @@ nv31_bus_intr(struct nouveau_subdev *subdev) subdev->intr(subdev); } - if (stat & 0x00000008) { - nv_error(pbus, "MMIO FAULT\n"); /* NV41- */ + if (stat & 0x00000008) { /* NV41- */ + u32 addr = nv_rd32(pbus, 0x009084); + u32 data = nv_rd32(pbus, 0x009088); + + nv_error(pbus, "MMIO %s of 0x%08x FAULT at 0x%06x\n", + (addr & 0x00000002) ? "write" : "read", data, + (addr & 0x00fffffc)); + stat &= ~0x00000008; nv_wr32(pbus, 0x001100, 0x00000008); } diff --git a/drivers/gpu/drm/nouveau/core/subdev/bus/nv50.c b/drivers/gpu/drm/nouveau/core/subdev/bus/nv50.c index 0eed34f93e53..f5b2117fa8c6 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bus/nv50.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bus/nv50.c @@ -36,7 +36,13 @@ nv50_bus_intr(struct nouveau_subdev *subdev) u32 stat = nv_rd32(pbus, 0x001100) & nv_rd32(pbus, 0x001140); if (stat & 0x00000008) { - nv_error(pbus, "MMIO FAULT\n"); + u32 addr = nv_rd32(pbus, 0x009084); + u32 data = nv_rd32(pbus, 0x009088); + + nv_error(pbus, "MMIO %s of 0x%08x FAULT at 0x%06x\n", + (addr & 0x00000002) ? "write" : "read", data, + (addr & 0x00fffffc)); + stat &= ~0x00000008; nv_wr32(pbus, 0x001100, 0x00000008); }