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 "disp.h" 5 #include "atom.h" 6 #include "lut.h" 7 8 #include "nouveau_crtc.h" 9 10 struct nv50_head { 11 const struct nv50_head_func *func; 12 struct nouveau_crtc base; 13 struct nv50_lut olut; 14 }; 15 16 int nv50_head_create(struct drm_device *, int index); 17 void nv50_head_flush_set(struct nv50_head *, struct nv50_head_atom *); 18 void nv50_head_flush_clr(struct nv50_head *, struct nv50_head_atom *, bool y); 19 20 struct nv50_head_func { 21 void (*view)(struct nv50_head *, struct nv50_head_atom *); 22 void (*mode)(struct nv50_head *, struct nv50_head_atom *); 23 void (*olut)(struct nv50_head *, struct nv50_head_atom *); 24 bool olut_identity; 25 void (*olut_set)(struct nv50_head *, struct nv50_head_atom *); 26 void (*olut_clr)(struct nv50_head *); 27 void (*core_calc)(struct nv50_head *, struct nv50_head_atom *); 28 void (*core_set)(struct nv50_head *, struct nv50_head_atom *); 29 void (*core_clr)(struct nv50_head *); 30 int (*curs_layout)(struct nv50_head *, struct nv50_wndw_atom *, 31 struct nv50_head_atom *); 32 int (*curs_format)(struct nv50_head *, struct nv50_wndw_atom *, 33 struct nv50_head_atom *); 34 void (*curs_set)(struct nv50_head *, struct nv50_head_atom *); 35 void (*curs_clr)(struct nv50_head *); 36 void (*base)(struct nv50_head *, struct nv50_head_atom *); 37 void (*ovly)(struct nv50_head *, struct nv50_head_atom *); 38 void (*dither)(struct nv50_head *, struct nv50_head_atom *); 39 void (*procamp)(struct nv50_head *, struct nv50_head_atom *); 40 void (*or)(struct nv50_head *, struct nv50_head_atom *); 41 }; 42 43 extern const struct nv50_head_func head507d; 44 void head507d_view(struct nv50_head *, struct nv50_head_atom *); 45 void head507d_mode(struct nv50_head *, struct nv50_head_atom *); 46 void head507d_olut(struct nv50_head *, struct nv50_head_atom *); 47 void head507d_core_calc(struct nv50_head *, struct nv50_head_atom *); 48 void head507d_core_clr(struct nv50_head *); 49 int head507d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *, 50 struct nv50_head_atom *); 51 int head507d_curs_format(struct nv50_head *, struct nv50_wndw_atom *, 52 struct nv50_head_atom *); 53 void head507d_base(struct nv50_head *, struct nv50_head_atom *); 54 void head507d_ovly(struct nv50_head *, struct nv50_head_atom *); 55 void head507d_dither(struct nv50_head *, struct nv50_head_atom *); 56 void head507d_procamp(struct nv50_head *, struct nv50_head_atom *); 57 58 extern const struct nv50_head_func head827d; 59 60 extern const struct nv50_head_func head907d; 61 void head907d_view(struct nv50_head *, struct nv50_head_atom *); 62 void head907d_mode(struct nv50_head *, struct nv50_head_atom *); 63 void head907d_olut(struct nv50_head *, struct nv50_head_atom *); 64 void head907d_olut_set(struct nv50_head *, struct nv50_head_atom *); 65 void head907d_olut_clr(struct nv50_head *); 66 void head907d_core_set(struct nv50_head *, struct nv50_head_atom *); 67 void head907d_core_clr(struct nv50_head *); 68 void head907d_curs_set(struct nv50_head *, struct nv50_head_atom *); 69 void head907d_curs_clr(struct nv50_head *); 70 void head907d_ovly(struct nv50_head *, struct nv50_head_atom *); 71 void head907d_procamp(struct nv50_head *, struct nv50_head_atom *); 72 void head907d_or(struct nv50_head *, struct nv50_head_atom *); 73 74 extern const struct nv50_head_func head917d; 75 int head917d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *, 76 struct nv50_head_atom *); 77 78 extern const struct nv50_head_func headc37d; 79 void headc37d_view(struct nv50_head *, struct nv50_head_atom *); 80 void headc37d_core_set(struct nv50_head *, struct nv50_head_atom *); 81 void headc37d_core_clr(struct nv50_head *); 82 int headc37d_curs_format(struct nv50_head *, struct nv50_wndw_atom *, 83 struct nv50_head_atom *); 84 void headc37d_curs_set(struct nv50_head *, struct nv50_head_atom *); 85 void headc37d_curs_clr(struct nv50_head *); 86 void headc37d_dither(struct nv50_head *, struct nv50_head_atom *); 87 88 extern const struct nv50_head_func headc57d; 89 #endif 90