]>
Commit | Line | Data |
---|---|---|
1590700d BS |
1 | #ifndef __NV50_KMS_HEAD_H__ |
2 | #define __NV50_KMS_HEAD_H__ | |
3 | #define nv50_head(c) container_of((c), struct nv50_head, base.base) | |
12885ecb LP |
4 | #include <linux/workqueue.h> |
5 | ||
1590700d BS |
6 | #include "disp.h" |
7 | #include "atom.h" | |
12885ecb | 8 | #include "crc.h" |
119608a7 | 9 | #include "lut.h" |
1590700d BS |
10 | |
11 | #include "nouveau_crtc.h" | |
12885ecb | 12 | #include "nouveau_encoder.h" |
1590700d BS |
13 | |
14 | struct nv50_head { | |
15 | const struct nv50_head_func *func; | |
16 | struct nouveau_crtc base; | |
12885ecb | 17 | struct nv50_crc crc; |
119608a7 | 18 | struct nv50_lut olut; |
5ff0cb1c | 19 | struct nv50_msto *msto; |
1590700d BS |
20 | }; |
21 | ||
5ff0cb1c | 22 | struct nv50_head *nv50_head_create(struct drm_device *, int index); |
12885ecb | 23 | void nv50_head_flush_set(struct nv50_head *head, struct nv50_head_atom *asyh); |
c9a3ca5d | 24 | void nv50_head_flush_set_wndw(struct nv50_head *head, struct nv50_head_atom *asyh); |
12885ecb LP |
25 | void nv50_head_flush_clr(struct nv50_head *head, |
26 | struct nv50_head_atom *asyh, bool flush); | |
1590700d BS |
27 | |
28 | struct nv50_head_func { | |
1f772f5a | 29 | int (*view)(struct nv50_head *, struct nv50_head_atom *); |
caa966a7 | 30 | int (*mode)(struct nv50_head *, struct nv50_head_atom *); |
13199270 | 31 | bool (*olut)(struct nv50_head *, struct nv50_head_atom *, int); |
cb55cd0c | 32 | bool olut_identity; |
13199270 | 33 | int olut_size; |
a5df7630 | 34 | int (*olut_set)(struct nv50_head *, struct nv50_head_atom *); |
4fbf03a3 | 35 | int (*olut_clr)(struct nv50_head *); |
09e1b78a | 36 | void (*core_calc)(struct nv50_head *, struct nv50_head_atom *); |
a38870a2 | 37 | int (*core_set)(struct nv50_head *, struct nv50_head_atom *); |
aabe253e | 38 | int (*core_clr)(struct nv50_head *); |
01d380ab BS |
39 | int (*curs_layout)(struct nv50_head *, struct nv50_wndw_atom *, |
40 | struct nv50_head_atom *); | |
41 | int (*curs_format)(struct nv50_head *, struct nv50_wndw_atom *, | |
42 | struct nv50_head_atom *); | |
9549c14b | 43 | int (*curs_set)(struct nv50_head *, struct nv50_head_atom *); |
bc5af56a | 44 | int (*curs_clr)(struct nv50_head *); |
93f7f054 | 45 | int (*base)(struct nv50_head *, struct nv50_head_atom *); |
db2a2069 | 46 | int (*ovly)(struct nv50_head *, struct nv50_head_atom *); |
2f819f2b | 47 | int (*dither)(struct nv50_head *, struct nv50_head_atom *); |
246db5fd | 48 | int (*procamp)(struct nv50_head *, struct nv50_head_atom *); |
ff37116e | 49 | int (*or)(struct nv50_head *, struct nv50_head_atom *); |
dbdaf719 | 50 | void (*static_wndw_map)(struct nv50_head *, struct nv50_head_atom *); |
1590700d BS |
51 | }; |
52 | ||
53 | extern const struct nv50_head_func head507d; | |
1f772f5a | 54 | int head507d_view(struct nv50_head *, struct nv50_head_atom *); |
caa966a7 | 55 | int head507d_mode(struct nv50_head *, struct nv50_head_atom *); |
13199270 | 56 | bool head507d_olut(struct nv50_head *, struct nv50_head_atom *, int); |
09e1b78a | 57 | void head507d_core_calc(struct nv50_head *, struct nv50_head_atom *); |
aabe253e | 58 | int head507d_core_clr(struct nv50_head *); |
01d380ab BS |
59 | int head507d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *, |
60 | struct nv50_head_atom *); | |
61 | int head507d_curs_format(struct nv50_head *, struct nv50_wndw_atom *, | |
62 | struct nv50_head_atom *); | |
93f7f054 | 63 | int head507d_base(struct nv50_head *, struct nv50_head_atom *); |
db2a2069 | 64 | int head507d_ovly(struct nv50_head *, struct nv50_head_atom *); |
2f819f2b | 65 | int head507d_dither(struct nv50_head *, struct nv50_head_atom *); |
246db5fd | 66 | int head507d_procamp(struct nv50_head *, struct nv50_head_atom *); |
09e1b78a BS |
67 | |
68 | extern const struct nv50_head_func head827d; | |
69 | ||
70 | extern const struct nv50_head_func head907d; | |
1f772f5a | 71 | int head907d_view(struct nv50_head *, struct nv50_head_atom *); |
caa966a7 | 72 | int head907d_mode(struct nv50_head *, struct nv50_head_atom *); |
13199270 | 73 | bool head907d_olut(struct nv50_head *, struct nv50_head_atom *, int); |
a5df7630 | 74 | int head907d_olut_set(struct nv50_head *, struct nv50_head_atom *); |
4fbf03a3 | 75 | int head907d_olut_clr(struct nv50_head *); |
a38870a2 | 76 | int head907d_core_set(struct nv50_head *, struct nv50_head_atom *); |
aabe253e | 77 | int head907d_core_clr(struct nv50_head *); |
9549c14b | 78 | int head907d_curs_set(struct nv50_head *, struct nv50_head_atom *); |
bc5af56a | 79 | int head907d_curs_clr(struct nv50_head *); |
db2a2069 | 80 | int head907d_ovly(struct nv50_head *, struct nv50_head_atom *); |
246db5fd | 81 | int head907d_procamp(struct nv50_head *, struct nv50_head_atom *); |
ff37116e | 82 | int head907d_or(struct nv50_head *, struct nv50_head_atom *); |
09e1b78a BS |
83 | |
84 | extern const struct nv50_head_func head917d; | |
facaed62 BS |
85 | int head917d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *, |
86 | struct nv50_head_atom *); | |
87 | ||
88 | extern const struct nv50_head_func headc37d; | |
1f772f5a | 89 | int headc37d_view(struct nv50_head *, struct nv50_head_atom *); |
563737c5 BS |
90 | int headc37d_curs_format(struct nv50_head *, struct nv50_wndw_atom *, |
91 | struct nv50_head_atom *); | |
9549c14b | 92 | int headc37d_curs_set(struct nv50_head *, struct nv50_head_atom *); |
bc5af56a | 93 | int headc37d_curs_clr(struct nv50_head *); |
2f819f2b | 94 | int headc37d_dither(struct nv50_head *, struct nv50_head_atom *); |
dbdaf719 | 95 | void headc37d_static_wndw_map(struct nv50_head *, struct nv50_head_atom *); |
563737c5 BS |
96 | |
97 | extern const struct nv50_head_func headc57d; | |
1590700d | 98 | #endif |