| .. | .. |
|---|
| 24 | 24 | #include "gk104.h" |
|---|
| 25 | 25 | #include "changk104.h" |
|---|
| 26 | 26 | |
|---|
| 27 | +#include <subdev/fault.h> |
|---|
| 28 | + |
|---|
| 27 | 29 | #include <nvif/class.h> |
|---|
| 28 | 30 | |
|---|
| 29 | 31 | const struct nvkm_enum |
|---|
| .. | .. |
|---|
| 50 | 52 | {} |
|---|
| 51 | 53 | }; |
|---|
| 52 | 54 | |
|---|
| 55 | +void |
|---|
| 56 | +gp100_fifo_intr_fault(struct nvkm_fifo *fifo, int unit) |
|---|
| 57 | +{ |
|---|
| 58 | + struct nvkm_device *device = fifo->engine.subdev.device; |
|---|
| 59 | + u32 inst = nvkm_rd32(device, 0x002800 + (unit * 0x10)); |
|---|
| 60 | + u32 valo = nvkm_rd32(device, 0x002804 + (unit * 0x10)); |
|---|
| 61 | + u32 vahi = nvkm_rd32(device, 0x002808 + (unit * 0x10)); |
|---|
| 62 | + u32 type = nvkm_rd32(device, 0x00280c + (unit * 0x10)); |
|---|
| 63 | + struct nvkm_fault_data info; |
|---|
| 64 | + |
|---|
| 65 | + info.inst = (u64)inst << 12; |
|---|
| 66 | + info.addr = ((u64)vahi << 32) | valo; |
|---|
| 67 | + info.time = 0; |
|---|
| 68 | + info.engine = unit; |
|---|
| 69 | + info.valid = 1; |
|---|
| 70 | + info.gpc = (type & 0x1f000000) >> 24; |
|---|
| 71 | + info.hub = (type & 0x00100000) >> 20; |
|---|
| 72 | + info.access = (type & 0x00070000) >> 16; |
|---|
| 73 | + info.client = (type & 0x00007f00) >> 8; |
|---|
| 74 | + info.reason = (type & 0x0000001f); |
|---|
| 75 | + |
|---|
| 76 | + nvkm_fifo_fault(fifo, &info); |
|---|
| 77 | +} |
|---|
| 78 | + |
|---|
| 53 | 79 | static const struct gk104_fifo_func |
|---|
| 54 | 80 | gp100_fifo = { |
|---|
| 55 | | - .init_pbdma_timeout = gk208_fifo_init_pbdma_timeout, |
|---|
| 81 | + .intr.fault = gp100_fifo_intr_fault, |
|---|
| 82 | + .pbdma = &gm200_fifo_pbdma, |
|---|
| 56 | 83 | .fault.access = gk104_fifo_fault_access, |
|---|
| 57 | 84 | .fault.engine = gp100_fifo_fault_engine, |
|---|
| 58 | 85 | .fault.reason = gk104_fifo_fault_reason, |
|---|