| .. | .. |
|---|
| 25 | 25 | #include "changk104.h" |
|---|
| 26 | 26 | |
|---|
| 27 | 27 | #include <core/gpuobj.h> |
|---|
| 28 | +#include <subdev/fault.h> |
|---|
| 28 | 29 | |
|---|
| 29 | 30 | #include <nvif/class.h> |
|---|
| 30 | 31 | |
|---|
| .. | .. |
|---|
| 41 | 42 | .size = 8, |
|---|
| 42 | 43 | .cgrp = gk110_fifo_runlist_cgrp, |
|---|
| 43 | 44 | .chan = gm107_fifo_runlist_chan, |
|---|
| 45 | + .commit = gk104_fifo_runlist_commit, |
|---|
| 44 | 46 | }; |
|---|
| 45 | 47 | |
|---|
| 46 | 48 | const struct nvkm_enum |
|---|
| .. | .. |
|---|
| 66 | 68 | {} |
|---|
| 67 | 69 | }; |
|---|
| 68 | 70 | |
|---|
| 71 | +void |
|---|
| 72 | +gm107_fifo_intr_fault(struct nvkm_fifo *fifo, int unit) |
|---|
| 73 | +{ |
|---|
| 74 | + struct nvkm_device *device = fifo->engine.subdev.device; |
|---|
| 75 | + u32 inst = nvkm_rd32(device, 0x002800 + (unit * 0x10)); |
|---|
| 76 | + u32 valo = nvkm_rd32(device, 0x002804 + (unit * 0x10)); |
|---|
| 77 | + u32 vahi = nvkm_rd32(device, 0x002808 + (unit * 0x10)); |
|---|
| 78 | + u32 type = nvkm_rd32(device, 0x00280c + (unit * 0x10)); |
|---|
| 79 | + struct nvkm_fault_data info; |
|---|
| 80 | + |
|---|
| 81 | + info.inst = (u64)inst << 12; |
|---|
| 82 | + info.addr = ((u64)vahi << 32) | valo; |
|---|
| 83 | + info.time = 0; |
|---|
| 84 | + info.engine = unit; |
|---|
| 85 | + info.valid = 1; |
|---|
| 86 | + info.gpc = (type & 0x1f000000) >> 24; |
|---|
| 87 | + info.client = (type & 0x00003f00) >> 8; |
|---|
| 88 | + info.access = (type & 0x00000080) >> 7; |
|---|
| 89 | + info.hub = (type & 0x00000040) >> 6; |
|---|
| 90 | + info.reason = (type & 0x0000000f); |
|---|
| 91 | + |
|---|
| 92 | + nvkm_fifo_fault(fifo, &info); |
|---|
| 93 | +} |
|---|
| 94 | + |
|---|
| 69 | 95 | static const struct gk104_fifo_func |
|---|
| 70 | 96 | gm107_fifo = { |
|---|
| 71 | | - .init_pbdma_timeout = gk208_fifo_init_pbdma_timeout, |
|---|
| 97 | + .intr.fault = gm107_fifo_intr_fault, |
|---|
| 98 | + .pbdma = &gk208_fifo_pbdma, |
|---|
| 72 | 99 | .fault.access = gk104_fifo_fault_access, |
|---|
| 73 | 100 | .fault.engine = gm107_fifo_fault_engine, |
|---|
| 74 | 101 | .fault.reason = gk104_fifo_fault_reason, |
|---|