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