WIP FPC-III support
[linux/fpc-iii.git] / drivers / gpu / drm / nouveau / nvkm / subdev / fault / priv.h
blobf6f1dd7eee1ff5dd394c4b3f5efdc1ce3cb039c8
1 #ifndef __NVKM_FAULT_PRIV_H__
2 #define __NVKM_FAULT_PRIV_H__
3 #define nvkm_fault_buffer(p) container_of((p), struct nvkm_fault_buffer, object)
4 #define nvkm_fault(p) container_of((p), struct nvkm_fault, subdev)
5 #include <subdev/fault.h>
7 #include <core/event.h>
8 #include <core/object.h>
10 struct nvkm_fault_buffer {
11 struct nvkm_object object;
12 struct nvkm_fault *fault;
13 int id;
14 int entries;
15 u32 get;
16 u32 put;
17 struct nvkm_memory *mem;
18 u64 addr;
21 int nvkm_fault_new_(const struct nvkm_fault_func *, struct nvkm_device *,
22 int index, struct nvkm_fault **);
24 struct nvkm_fault_func {
25 int (*oneinit)(struct nvkm_fault *);
26 void (*init)(struct nvkm_fault *);
27 void (*fini)(struct nvkm_fault *);
28 void (*intr)(struct nvkm_fault *);
29 struct {
30 int nr;
31 u32 entry_size;
32 void (*info)(struct nvkm_fault_buffer *);
33 u64 (*pin)(struct nvkm_fault_buffer *);
34 void (*init)(struct nvkm_fault_buffer *);
35 void (*fini)(struct nvkm_fault_buffer *);
36 void (*intr)(struct nvkm_fault_buffer *, bool enable);
37 } buffer;
38 struct {
39 struct nvkm_sclass base;
40 int rp;
41 } user;
44 void gp100_fault_buffer_intr(struct nvkm_fault_buffer *, bool enable);
45 void gp100_fault_buffer_fini(struct nvkm_fault_buffer *);
46 void gp100_fault_buffer_init(struct nvkm_fault_buffer *);
47 u64 gp100_fault_buffer_pin(struct nvkm_fault_buffer *);
48 void gp100_fault_buffer_info(struct nvkm_fault_buffer *);
49 void gp100_fault_intr(struct nvkm_fault *);
51 u64 gp10b_fault_buffer_pin(struct nvkm_fault_buffer *);
53 int gv100_fault_oneinit(struct nvkm_fault *);
55 int nvkm_ufault_new(struct nvkm_device *, const struct nvkm_oclass *,
56 void *, u32, struct nvkm_object **);
57 #endif