| .. | .. |
|---|
| 1 | | -/* SPDX-License-Identifier: GPL-2.0 */ |
|---|
| 1 | +/* SPDX-License-Identifier: MIT */ |
|---|
| 2 | 2 | #ifndef __GK104_FIFO_H__ |
|---|
| 3 | 3 | #define __GK104_FIFO_H__ |
|---|
| 4 | 4 | #define gk104_fifo(p) container_of((p), struct gk104_fifo, base) |
|---|
| .. | .. |
|---|
| 45 | 45 | }; |
|---|
| 46 | 46 | |
|---|
| 47 | 47 | struct gk104_fifo_func { |
|---|
| 48 | | - void (*init_pbdma_timeout)(struct gk104_fifo *); |
|---|
| 48 | + struct { |
|---|
| 49 | + void (*fault)(struct nvkm_fifo *, int unit); |
|---|
| 50 | + } intr; |
|---|
| 51 | + |
|---|
| 52 | + const struct gk104_fifo_pbdma_func { |
|---|
| 53 | + int (*nr)(struct gk104_fifo *); |
|---|
| 54 | + void (*init)(struct gk104_fifo *); |
|---|
| 55 | + void (*init_timeout)(struct gk104_fifo *); |
|---|
| 56 | + } *pbdma; |
|---|
| 49 | 57 | |
|---|
| 50 | 58 | struct { |
|---|
| 51 | 59 | const struct nvkm_enum *access; |
|---|
| .. | .. |
|---|
| 61 | 69 | struct nvkm_memory *, u32 offset); |
|---|
| 62 | 70 | void (*chan)(struct gk104_fifo_chan *, |
|---|
| 63 | 71 | struct nvkm_memory *, u32 offset); |
|---|
| 72 | + void (*commit)(struct gk104_fifo *, int runl, |
|---|
| 73 | + struct nvkm_memory *, int entries); |
|---|
| 64 | 74 | } *runlist; |
|---|
| 65 | 75 | |
|---|
| 66 | 76 | struct gk104_fifo_user_user { |
|---|
| .. | .. |
|---|
| 81 | 91 | int index, int nr, struct nvkm_fifo **); |
|---|
| 82 | 92 | void gk104_fifo_runlist_insert(struct gk104_fifo *, struct gk104_fifo_chan *); |
|---|
| 83 | 93 | void gk104_fifo_runlist_remove(struct gk104_fifo *, struct gk104_fifo_chan *); |
|---|
| 84 | | -void gk104_fifo_runlist_commit(struct gk104_fifo *, int runl); |
|---|
| 94 | +void gk104_fifo_runlist_update(struct gk104_fifo *, int runl); |
|---|
| 85 | 95 | |
|---|
| 96 | +extern const struct gk104_fifo_pbdma_func gk104_fifo_pbdma; |
|---|
| 97 | +int gk104_fifo_pbdma_nr(struct gk104_fifo *); |
|---|
| 98 | +void gk104_fifo_pbdma_init(struct gk104_fifo *); |
|---|
| 86 | 99 | extern const struct nvkm_enum gk104_fifo_fault_access[]; |
|---|
| 87 | 100 | extern const struct nvkm_enum gk104_fifo_fault_engine[]; |
|---|
| 88 | 101 | extern const struct nvkm_enum gk104_fifo_fault_reason[]; |
|---|
| .. | .. |
|---|
| 91 | 104 | extern const struct gk104_fifo_runlist_func gk104_fifo_runlist; |
|---|
| 92 | 105 | void gk104_fifo_runlist_chan(struct gk104_fifo_chan *, |
|---|
| 93 | 106 | struct nvkm_memory *, u32); |
|---|
| 107 | +void gk104_fifo_runlist_commit(struct gk104_fifo *, int runl, |
|---|
| 108 | + struct nvkm_memory *, int); |
|---|
| 94 | 109 | |
|---|
| 95 | 110 | extern const struct gk104_fifo_runlist_func gk110_fifo_runlist; |
|---|
| 96 | 111 | void gk110_fifo_runlist_cgrp(struct nvkm_fifo_cgrp *, |
|---|
| 97 | 112 | struct nvkm_memory *, u32); |
|---|
| 98 | 113 | |
|---|
| 99 | | -void gk208_fifo_init_pbdma_timeout(struct gk104_fifo *); |
|---|
| 114 | +extern const struct gk104_fifo_pbdma_func gk208_fifo_pbdma; |
|---|
| 115 | +void gk208_fifo_pbdma_init_timeout(struct gk104_fifo *); |
|---|
| 100 | 116 | |
|---|
| 117 | +void gm107_fifo_intr_fault(struct nvkm_fifo *, int); |
|---|
| 101 | 118 | extern const struct nvkm_enum gm107_fifo_fault_engine[]; |
|---|
| 102 | 119 | extern const struct gk104_fifo_runlist_func gm107_fifo_runlist; |
|---|
| 103 | 120 | |
|---|
| 121 | +extern const struct gk104_fifo_pbdma_func gm200_fifo_pbdma; |
|---|
| 122 | +int gm200_fifo_pbdma_nr(struct gk104_fifo *); |
|---|
| 123 | + |
|---|
| 124 | +void gp100_fifo_intr_fault(struct nvkm_fifo *, int); |
|---|
| 104 | 125 | extern const struct nvkm_enum gp100_fifo_fault_engine[]; |
|---|
| 126 | + |
|---|
| 127 | +extern const struct nvkm_enum gv100_fifo_fault_access[]; |
|---|
| 128 | +extern const struct nvkm_enum gv100_fifo_fault_reason[]; |
|---|
| 129 | +extern const struct nvkm_enum gv100_fifo_fault_hubclient[]; |
|---|
| 130 | +extern const struct nvkm_enum gv100_fifo_fault_gpcclient[]; |
|---|
| 131 | +void gv100_fifo_runlist_cgrp(struct nvkm_fifo_cgrp *, |
|---|
| 132 | + struct nvkm_memory *, u32); |
|---|
| 133 | +void gv100_fifo_runlist_chan(struct gk104_fifo_chan *, |
|---|
| 134 | + struct nvkm_memory *, u32); |
|---|
| 105 | 135 | #endif |
|---|