.. | .. |
---|
28 | 28 | #include <core/gpuobj.h> |
---|
29 | 29 | #include <subdev/timer.h> |
---|
30 | 30 | |
---|
31 | | -static int |
---|
| 31 | +int |
---|
32 | 32 | gv100_disp_wndw_cnt(struct nvkm_disp *disp, unsigned long *pmask) |
---|
33 | 33 | { |
---|
34 | 34 | struct nvkm_device *device = disp->engine.subdev.device; |
---|
.. | .. |
---|
36 | 36 | return (nvkm_rd32(device, 0x610074) & 0x03f00000) >> 20; |
---|
37 | 37 | } |
---|
38 | 38 | |
---|
39 | | -static void |
---|
| 39 | +void |
---|
40 | 40 | gv100_disp_super(struct work_struct *work) |
---|
41 | 41 | { |
---|
42 | 42 | struct nv50_disp *disp = |
---|
.. | .. |
---|
101 | 101 | u32 stat = nvkm_rd32(device, 0x611020 + (chid * 12)); |
---|
102 | 102 | u32 type = (stat & 0x00007000) >> 12; |
---|
103 | 103 | u32 mthd = (stat & 0x00000fff) << 2; |
---|
104 | | - u32 data = nvkm_rd32(device, 0x611024 + (chid * 12)); |
---|
105 | | - u32 code = nvkm_rd32(device, 0x611028 + (chid * 12)); |
---|
| 104 | + const struct nvkm_enum *reason = |
---|
| 105 | + nvkm_enum_find(nv50_disp_intr_error_type, type); |
---|
106 | 106 | |
---|
107 | | - nvkm_error(subdev, "chid %d %08x [type %d mthd %04x] " |
---|
108 | | - "data %08x code %08x\n", |
---|
109 | | - chid, stat, type, mthd, data, code); |
---|
| 107 | + /*TODO: Suspect 33->41 are for WRBK channel exceptions, but we |
---|
| 108 | + * don't support those currently. |
---|
| 109 | + * |
---|
| 110 | + * CORE+WIN CHIDs map directly to the FE_EXCEPT() slots. |
---|
| 111 | + */ |
---|
| 112 | + if (chid <= 32) { |
---|
| 113 | + u32 data = nvkm_rd32(device, 0x611024 + (chid * 12)); |
---|
| 114 | + u32 code = nvkm_rd32(device, 0x611028 + (chid * 12)); |
---|
| 115 | + nvkm_error(subdev, "chid %d stat %08x reason %d [%s] " |
---|
| 116 | + "mthd %04x data %08x code %08x\n", |
---|
| 117 | + chid, stat, type, reason ? reason->name : "", |
---|
| 118 | + mthd, data, code); |
---|
| 119 | + } else { |
---|
| 120 | + nvkm_error(subdev, "chid %d stat %08x reason %d [%s] " |
---|
| 121 | + "mthd %04x\n", |
---|
| 122 | + chid, stat, type, reason ? reason->name : "", mthd); |
---|
| 123 | + } |
---|
110 | 124 | |
---|
111 | 125 | if (chid < ARRAY_SIZE(disp->chan) && disp->chan[chid]) { |
---|
112 | 126 | switch (mthd) { |
---|
.. | .. |
---|
140 | 154 | */ |
---|
141 | 155 | if (stat & 0x00000008) |
---|
142 | 156 | stat &= ~0x00000008; |
---|
| 157 | + |
---|
| 158 | + if (stat & 0x00000080) { |
---|
| 159 | + u32 error = nvkm_mask(device, 0x611848, 0x00000000, 0x00000000); |
---|
| 160 | + nvkm_warn(subdev, "error %08x\n", error); |
---|
| 161 | + stat &= ~0x00000080; |
---|
| 162 | + } |
---|
143 | 163 | |
---|
144 | 164 | if (stat & 0x00000100) { |
---|
145 | 165 | unsigned long wndws = nvkm_rd32(device, 0x611858); |
---|
.. | .. |
---|
257 | 277 | } |
---|
258 | 278 | } |
---|
259 | 279 | |
---|
260 | | -static void |
---|
| 280 | +void |
---|
261 | 281 | gv100_disp_intr(struct nv50_disp *disp) |
---|
262 | 282 | { |
---|
263 | 283 | struct nvkm_subdev *subdev = &disp->base.engine.subdev; |
---|
.. | .. |
---|
297 | 317 | nvkm_warn(subdev, "intr %08x\n", stat); |
---|
298 | 318 | } |
---|
299 | 319 | |
---|
300 | | -static void |
---|
| 320 | +void |
---|
301 | 321 | gv100_disp_fini(struct nv50_disp *disp) |
---|
302 | 322 | { |
---|
303 | 323 | struct nvkm_device *device = disp->base.engine.subdev.device; |
---|