1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NV50_DISP_H__
3 #define __NV50_DISP_H__
4 #define nv50_disp(p) container_of((p), struct nv50_disp, base)
11 const struct nv50_disp_func *func;
12 struct nvkm_disp base;
14 struct workqueue_struct *wq;
15 struct work_struct supervisor;
18 struct nvkm_event uevent;
37 struct nvkm_gpuobj *inst;
38 struct nvkm_ramht *ramht;
40 struct nv50_disp_chan *chan[81];
43 void nv50_disp_super_1(struct nv50_disp *);
44 void nv50_disp_super_1_0(struct nv50_disp *, struct nvkm_head *);
45 void nv50_disp_super_2_0(struct nv50_disp *, struct nvkm_head *);
46 void nv50_disp_super_2_1(struct nv50_disp *, struct nvkm_head *);
47 void nv50_disp_super_2_2(struct nv50_disp *, struct nvkm_head *);
48 void nv50_disp_super_3_0(struct nv50_disp *, struct nvkm_head *);
50 int nv50_disp_new_(const struct nv50_disp_func *, struct nvkm_device *,
51 int index, struct nvkm_disp **);
53 struct nv50_disp_func {
54 int (*init)(struct nv50_disp *);
55 void (*fini)(struct nv50_disp *);
56 void (*intr)(struct nv50_disp *);
57 void (*intr_error)(struct nv50_disp *, int chid);
59 const struct nvkm_event_func *uevent;
60 void (*super)(struct work_struct *);
62 const struct nvkm_disp_oclass *root;
65 int (*cnt)(struct nvkm_disp *, unsigned long *mask);
66 int (*new)(struct nvkm_disp *, int id);
67 } wndw, head, dac, sor, pior;
72 int nv50_disp_init(struct nv50_disp *);
73 void nv50_disp_fini(struct nv50_disp *);
74 void nv50_disp_intr(struct nv50_disp *);
75 void nv50_disp_super(struct work_struct *);
76 extern const struct nvkm_enum nv50_disp_intr_error_type[];
78 int gf119_disp_init(struct nv50_disp *);
79 void gf119_disp_fini(struct nv50_disp *);
80 void gf119_disp_intr(struct nv50_disp *);
81 void gf119_disp_super(struct work_struct *);
82 void gf119_disp_intr_error(struct nv50_disp *, int);
84 void gv100_disp_fini(struct nv50_disp *);
85 void gv100_disp_intr(struct nv50_disp *);
86 void gv100_disp_super(struct work_struct *);
87 int gv100_disp_wndw_cnt(struct nvkm_disp *, unsigned long *);
89 void nv50_disp_dptmds_war_2(struct nv50_disp *, struct dcb_output *);
90 void nv50_disp_dptmds_war_3(struct nv50_disp *, struct dcb_output *);
91 void nv50_disp_update_sppll1(struct nv50_disp *);
93 extern const struct nvkm_event_func nv50_disp_chan_uevent;
94 int nv50_disp_chan_uevent_ctor(struct nvkm_object *, void *, u32,
95 struct nvkm_notify *);
96 void nv50_disp_chan_uevent_send(struct nv50_disp *, int);
98 extern const struct nvkm_event_func gf119_disp_chan_uevent;
99 extern const struct nvkm_event_func gv100_disp_chan_uevent;