1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NV50_DISP_H__
3 #define __NV50_DISP_H__
4 #define nv50_disp(p) container_of((p), struct nv50_disp, base)
9 const struct nv50_disp_func *func;
10 struct nvkm_disp base;
12 struct workqueue_struct *wq;
13 struct work_struct supervisor;
16 struct nvkm_event uevent;
35 struct nvkm_gpuobj *inst;
36 struct nvkm_ramht *ramht;
38 struct nv50_disp_chan *chan[81];
41 void nv50_disp_super_1(struct nv50_disp *);
42 void nv50_disp_super_1_0(struct nv50_disp *, struct nvkm_head *);
43 void nv50_disp_super_2_0(struct nv50_disp *, struct nvkm_head *);
44 void nv50_disp_super_2_1(struct nv50_disp *, struct nvkm_head *);
45 void nv50_disp_super_2_2(struct nv50_disp *, struct nvkm_head *);
46 void nv50_disp_super_3_0(struct nv50_disp *, struct nvkm_head *);
48 int nv50_disp_new_(const struct nv50_disp_func *, struct nvkm_device *,
49 int index, struct nvkm_disp **);
51 struct nv50_disp_func {
52 int (*init)(struct nv50_disp *);
53 void (*fini)(struct nv50_disp *);
54 void (*intr)(struct nv50_disp *);
55 void (*intr_error)(struct nv50_disp *, int chid);
57 const struct nvkm_event_func *uevent;
58 void (*super)(struct work_struct *);
60 const struct nvkm_disp_oclass *root;
63 int (*cnt)(struct nvkm_disp *, unsigned long *mask);
64 int (*new)(struct nvkm_disp *, int id);
65 } wndw, head, dac, sor, pior;
70 int nv50_disp_init(struct nv50_disp *);
71 void nv50_disp_fini(struct nv50_disp *);
72 void nv50_disp_intr(struct nv50_disp *);
73 void nv50_disp_super(struct work_struct *);
75 int gf119_disp_init(struct nv50_disp *);
76 void gf119_disp_fini(struct nv50_disp *);
77 void gf119_disp_intr(struct nv50_disp *);
78 void gf119_disp_super(struct work_struct *);
79 void gf119_disp_intr_error(struct nv50_disp *, int);
81 void nv50_disp_dptmds_war_2(struct nv50_disp *, struct dcb_output *);
82 void nv50_disp_dptmds_war_3(struct nv50_disp *, struct dcb_output *);
83 void nv50_disp_update_sppll1(struct nv50_disp *);
85 extern const struct nvkm_event_func nv50_disp_chan_uevent;
86 int nv50_disp_chan_uevent_ctor(struct nvkm_object *, void *, u32,
87 struct nvkm_notify *);
88 void nv50_disp_chan_uevent_send(struct nv50_disp *, int);
90 extern const struct nvkm_event_func gf119_disp_chan_uevent;
91 extern const struct nvkm_event_func gv100_disp_chan_uevent;