1 #ifndef __NV50_DISP_CHAN_H__
2 #define __NV50_DISP_CHAN_H__
3 #define nv50_disp_chan(p) container_of((p), struct nv50_disp_chan, object)
6 struct nv50_disp_chan {
7 const struct nv50_disp_chan_func *func;
8 const struct nv50_disp_chan_mthd *mthd;
9 struct nv50_disp_root *root;
17 struct nvkm_object object;
20 struct nv50_disp_chan_func {
21 void *(*dtor)(struct nv50_disp_chan *);
22 int (*init)(struct nv50_disp_chan *);
23 void (*fini)(struct nv50_disp_chan *);
24 int (*child_get)(struct nv50_disp_chan *, int index,
25 struct nvkm_oclass *);
26 int (*child_new)(struct nv50_disp_chan *, const struct nvkm_oclass *,
27 void *data, u32 size, struct nvkm_object **);
30 int nv50_disp_chan_ctor(const struct nv50_disp_chan_func *,
31 const struct nv50_disp_chan_mthd *,
32 struct nv50_disp_root *, int ctrl, int user, int head,
33 const struct nvkm_oclass *, struct nv50_disp_chan *);
34 int nv50_disp_chan_new_(const struct nv50_disp_chan_func *,
35 const struct nv50_disp_chan_mthd *,
36 struct nv50_disp_root *, int ctrl, int user, int head,
37 const struct nvkm_oclass *, struct nvkm_object **);
39 extern const struct nv50_disp_chan_func nv50_disp_pioc_func;
40 extern const struct nv50_disp_chan_func gf119_disp_pioc_func;
42 extern const struct nvkm_event_func nv50_disp_chan_uevent;
43 int nv50_disp_chan_uevent_ctor(struct nvkm_object *, void *, u32,
44 struct nvkm_notify *);
45 void nv50_disp_chan_uevent_send(struct nv50_disp *, int);
47 extern const struct nvkm_event_func gf119_disp_chan_uevent;
49 struct nv50_disp_mthd_list {
59 struct nv50_disp_chan_mthd {
66 const struct nv50_disp_mthd_list *mthd;
70 void nv50_disp_chan_mthd(struct nv50_disp_chan *, int debug);
72 extern const struct nv50_disp_mthd_list nv50_disp_core_mthd_base;
73 extern const struct nv50_disp_mthd_list nv50_disp_core_mthd_sor;
74 extern const struct nv50_disp_mthd_list nv50_disp_core_mthd_pior;
75 extern const struct nv50_disp_mthd_list nv50_disp_base_mthd_image;
77 extern const struct nv50_disp_chan_mthd g84_disp_core_chan_mthd;
78 extern const struct nv50_disp_mthd_list g84_disp_core_mthd_dac;
79 extern const struct nv50_disp_mthd_list g84_disp_core_mthd_head;
80 extern const struct nv50_disp_chan_mthd g84_disp_base_chan_mthd;
81 extern const struct nv50_disp_chan_mthd g84_disp_ovly_chan_mthd;
83 extern const struct nv50_disp_chan_mthd g94_disp_core_chan_mthd;
85 extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_base;
86 extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_dac;
87 extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_sor;
88 extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_pior;
89 extern const struct nv50_disp_chan_mthd gf119_disp_base_chan_mthd;
91 extern const struct nv50_disp_chan_mthd gk104_disp_core_chan_mthd;
92 extern const struct nv50_disp_chan_mthd gk104_disp_ovly_chan_mthd;
94 struct nv50_disp_pioc_oclass {
95 int (*ctor)(const struct nv50_disp_chan_func *,
96 const struct nv50_disp_chan_mthd *,
97 struct nv50_disp_root *, int ctrl, int user,
98 const struct nvkm_oclass *, void *data, u32 size,
99 struct nvkm_object **);
100 struct nvkm_sclass base;
101 const struct nv50_disp_chan_func *func;
102 const struct nv50_disp_chan_mthd *mthd;
109 extern const struct nv50_disp_pioc_oclass nv50_disp_oimm_oclass;
110 extern const struct nv50_disp_pioc_oclass nv50_disp_curs_oclass;
112 extern const struct nv50_disp_pioc_oclass g84_disp_oimm_oclass;
113 extern const struct nv50_disp_pioc_oclass g84_disp_curs_oclass;
115 extern const struct nv50_disp_pioc_oclass gt215_disp_oimm_oclass;
116 extern const struct nv50_disp_pioc_oclass gt215_disp_curs_oclass;
118 extern const struct nv50_disp_pioc_oclass gf119_disp_oimm_oclass;
119 extern const struct nv50_disp_pioc_oclass gf119_disp_curs_oclass;
121 extern const struct nv50_disp_pioc_oclass gk104_disp_oimm_oclass;
122 extern const struct nv50_disp_pioc_oclass gk104_disp_curs_oclass;
124 extern const struct nv50_disp_pioc_oclass gp102_disp_oimm_oclass;
125 extern const struct nv50_disp_pioc_oclass gp102_disp_curs_oclass;
127 int nv50_disp_curs_new(const struct nv50_disp_chan_func *,
128 const struct nv50_disp_chan_mthd *,
129 struct nv50_disp_root *, int ctrl, int user,
130 const struct nvkm_oclass *, void *data, u32 size,
131 struct nvkm_object **);
132 int nv50_disp_oimm_new(const struct nv50_disp_chan_func *,
133 const struct nv50_disp_chan_mthd *,
134 struct nv50_disp_root *, int ctrl, int user,
135 const struct nvkm_oclass *, void *data, u32 size,
136 struct nvkm_object **);