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)
4 #include <linux/workqueue.h>
11 #include "nouveau_crtc.h"
12 #include "nouveau_encoder.h"
15 const struct nv50_head_func *func;
16 struct nouveau_crtc base;
19 struct nv50_msto *msto;
22 struct nv50_head *nv50_head_create(struct drm_device *, int index);
23 void nv50_head_flush_set(struct nv50_head *head, struct nv50_head_atom *asyh);
24 void nv50_head_flush_clr(struct nv50_head *head,
25 struct nv50_head_atom *asyh, bool flush);
27 struct nv50_head_func {
28 int (*view)(struct nv50_head *, struct nv50_head_atom *);
29 int (*mode)(struct nv50_head *, struct nv50_head_atom *);
30 bool (*olut)(struct nv50_head *, struct nv50_head_atom *, int);
33 int (*olut_set)(struct nv50_head *, struct nv50_head_atom *);
34 int (*olut_clr)(struct nv50_head *);
35 void (*core_calc)(struct nv50_head *, struct nv50_head_atom *);
36 int (*core_set)(struct nv50_head *, struct nv50_head_atom *);
37 int (*core_clr)(struct nv50_head *);
38 int (*curs_layout)(struct nv50_head *, struct nv50_wndw_atom *,
39 struct nv50_head_atom *);
40 int (*curs_format)(struct nv50_head *, struct nv50_wndw_atom *,
41 struct nv50_head_atom *);
42 int (*curs_set)(struct nv50_head *, struct nv50_head_atom *);
43 int (*curs_clr)(struct nv50_head *);
44 int (*base)(struct nv50_head *, struct nv50_head_atom *);
45 int (*ovly)(struct nv50_head *, struct nv50_head_atom *);
46 void (*dither)(struct nv50_head *, struct nv50_head_atom *);
47 void (*procamp)(struct nv50_head *, struct nv50_head_atom *);
48 void (*or)(struct nv50_head *, struct nv50_head_atom *);
49 void (*static_wndw_map)(struct nv50_head *, struct nv50_head_atom *);
52 extern const struct nv50_head_func head507d;
53 int head507d_view(struct nv50_head *, struct nv50_head_atom *);
54 int head507d_mode(struct nv50_head *, struct nv50_head_atom *);
55 bool head507d_olut(struct nv50_head *, struct nv50_head_atom *, int);
56 void head507d_core_calc(struct nv50_head *, struct nv50_head_atom *);
57 int head507d_core_clr(struct nv50_head *);
58 int head507d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *,
59 struct nv50_head_atom *);
60 int head507d_curs_format(struct nv50_head *, struct nv50_wndw_atom *,
61 struct nv50_head_atom *);
62 int head507d_base(struct nv50_head *, struct nv50_head_atom *);
63 int head507d_ovly(struct nv50_head *, struct nv50_head_atom *);
64 void head507d_dither(struct nv50_head *, struct nv50_head_atom *);
65 void head507d_procamp(struct nv50_head *, struct nv50_head_atom *);
67 extern const struct nv50_head_func head827d;
69 extern const struct nv50_head_func head907d;
70 int head907d_view(struct nv50_head *, struct nv50_head_atom *);
71 int head907d_mode(struct nv50_head *, struct nv50_head_atom *);
72 bool head907d_olut(struct nv50_head *, struct nv50_head_atom *, int);
73 int head907d_olut_set(struct nv50_head *, struct nv50_head_atom *);
74 int head907d_olut_clr(struct nv50_head *);
75 int head907d_core_set(struct nv50_head *, struct nv50_head_atom *);
76 int head907d_core_clr(struct nv50_head *);
77 int head907d_curs_set(struct nv50_head *, struct nv50_head_atom *);
78 int head907d_curs_clr(struct nv50_head *);
79 int head907d_ovly(struct nv50_head *, struct nv50_head_atom *);
80 void head907d_procamp(struct nv50_head *, struct nv50_head_atom *);
81 void head907d_or(struct nv50_head *, struct nv50_head_atom *);
83 extern const struct nv50_head_func head917d;
84 int head917d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *,
85 struct nv50_head_atom *);
87 extern const struct nv50_head_func headc37d;
88 int headc37d_view(struct nv50_head *, struct nv50_head_atom *);
89 int headc37d_curs_format(struct nv50_head *, struct nv50_wndw_atom *,
90 struct nv50_head_atom *);
91 int headc37d_curs_set(struct nv50_head *, struct nv50_head_atom *);
92 int headc37d_curs_clr(struct nv50_head *);
93 void headc37d_dither(struct nv50_head *, struct nv50_head_atom *);
94 void headc37d_static_wndw_map(struct nv50_head *, struct nv50_head_atom *);
96 extern const struct nv50_head_func headc57d;