License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-2.6/btrfs-unstable.git] / drivers / gpu / drm / nouveau / nvkm / engine / disp / channv50.h
blob5701b3221a54e093f3ba383ba1e9b7ddf5570817
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NV50_DISP_CHAN_H__
3 #define __NV50_DISP_CHAN_H__
4 #define nv50_disp_chan(p) container_of((p), struct nv50_disp_chan, object)
5 #include "nv50.h"
7 struct nv50_disp_chan {
8 const struct nv50_disp_chan_func *func;
9 const struct nv50_disp_chan_mthd *mthd;
10 struct nv50_disp_root *root;
12 struct {
13 int ctrl;
14 int user;
15 } chid;
16 int head;
18 struct nvkm_object object;
21 struct nv50_disp_chan_func {
22 void *(*dtor)(struct nv50_disp_chan *);
23 int (*init)(struct nv50_disp_chan *);
24 void (*fini)(struct nv50_disp_chan *);
25 int (*child_get)(struct nv50_disp_chan *, int index,
26 struct nvkm_oclass *);
27 int (*child_new)(struct nv50_disp_chan *, const struct nvkm_oclass *,
28 void *data, u32 size, struct nvkm_object **);
31 int nv50_disp_chan_ctor(const struct nv50_disp_chan_func *,
32 const struct nv50_disp_chan_mthd *,
33 struct nv50_disp_root *, int ctrl, int user, int head,
34 const struct nvkm_oclass *, struct nv50_disp_chan *);
35 int nv50_disp_chan_new_(const struct nv50_disp_chan_func *,
36 const struct nv50_disp_chan_mthd *,
37 struct nv50_disp_root *, int ctrl, int user, int head,
38 const struct nvkm_oclass *, struct nvkm_object **);
40 extern const struct nv50_disp_chan_func nv50_disp_pioc_func;
41 extern const struct nv50_disp_chan_func gf119_disp_pioc_func;
43 extern const struct nvkm_event_func nv50_disp_chan_uevent;
44 int nv50_disp_chan_uevent_ctor(struct nvkm_object *, void *, u32,
45 struct nvkm_notify *);
46 void nv50_disp_chan_uevent_send(struct nv50_disp *, int);
48 extern const struct nvkm_event_func gf119_disp_chan_uevent;
50 struct nv50_disp_mthd_list {
51 u32 mthd;
52 u32 addr;
53 struct {
54 u32 mthd;
55 u32 addr;
56 const char *name;
57 } data[];
60 struct nv50_disp_chan_mthd {
61 const char *name;
62 u32 addr;
63 s32 prev;
64 struct {
65 const char *name;
66 int nr;
67 const struct nv50_disp_mthd_list *mthd;
68 } data[];
71 void nv50_disp_chan_mthd(struct nv50_disp_chan *, int debug);
73 extern const struct nv50_disp_mthd_list nv50_disp_core_mthd_base;
74 extern const struct nv50_disp_mthd_list nv50_disp_core_mthd_sor;
75 extern const struct nv50_disp_mthd_list nv50_disp_core_mthd_pior;
76 extern const struct nv50_disp_mthd_list nv50_disp_base_mthd_image;
78 extern const struct nv50_disp_chan_mthd g84_disp_core_chan_mthd;
79 extern const struct nv50_disp_mthd_list g84_disp_core_mthd_dac;
80 extern const struct nv50_disp_mthd_list g84_disp_core_mthd_head;
81 extern const struct nv50_disp_chan_mthd g84_disp_base_chan_mthd;
82 extern const struct nv50_disp_chan_mthd g84_disp_ovly_chan_mthd;
84 extern const struct nv50_disp_chan_mthd g94_disp_core_chan_mthd;
86 extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_base;
87 extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_dac;
88 extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_sor;
89 extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_pior;
90 extern const struct nv50_disp_chan_mthd gf119_disp_base_chan_mthd;
92 extern const struct nv50_disp_chan_mthd gk104_disp_core_chan_mthd;
93 extern const struct nv50_disp_chan_mthd gk104_disp_ovly_chan_mthd;
95 struct nv50_disp_pioc_oclass {
96 int (*ctor)(const struct nv50_disp_chan_func *,
97 const struct nv50_disp_chan_mthd *,
98 struct nv50_disp_root *, int ctrl, int user,
99 const struct nvkm_oclass *, void *data, u32 size,
100 struct nvkm_object **);
101 struct nvkm_sclass base;
102 const struct nv50_disp_chan_func *func;
103 const struct nv50_disp_chan_mthd *mthd;
104 struct {
105 int ctrl;
106 int user;
107 } chid;
110 extern const struct nv50_disp_pioc_oclass nv50_disp_oimm_oclass;
111 extern const struct nv50_disp_pioc_oclass nv50_disp_curs_oclass;
113 extern const struct nv50_disp_pioc_oclass g84_disp_oimm_oclass;
114 extern const struct nv50_disp_pioc_oclass g84_disp_curs_oclass;
116 extern const struct nv50_disp_pioc_oclass gt215_disp_oimm_oclass;
117 extern const struct nv50_disp_pioc_oclass gt215_disp_curs_oclass;
119 extern const struct nv50_disp_pioc_oclass gf119_disp_oimm_oclass;
120 extern const struct nv50_disp_pioc_oclass gf119_disp_curs_oclass;
122 extern const struct nv50_disp_pioc_oclass gk104_disp_oimm_oclass;
123 extern const struct nv50_disp_pioc_oclass gk104_disp_curs_oclass;
125 extern const struct nv50_disp_pioc_oclass gp102_disp_oimm_oclass;
126 extern const struct nv50_disp_pioc_oclass gp102_disp_curs_oclass;
128 int nv50_disp_curs_new(const struct nv50_disp_chan_func *,
129 const struct nv50_disp_chan_mthd *,
130 struct nv50_disp_root *, int ctrl, int user,
131 const struct nvkm_oclass *, void *data, u32 size,
132 struct nvkm_object **);
133 int nv50_disp_oimm_new(const struct nv50_disp_chan_func *,
134 const struct nv50_disp_chan_mthd *,
135 struct nv50_disp_root *, int ctrl, int user,
136 const struct nvkm_oclass *, void *data, u32 size,
137 struct nvkm_object **);
138 #endif