]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - drivers/gpu/drm/nouveau/dispnv50/head.h
drm/nouveau/kms/nv50: workaround EFI GOP window channel format differences
[mirror_ubuntu-hirsute-kernel.git] / drivers / gpu / drm / nouveau / dispnv50 / head.h
CommitLineData
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
14struct 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 22struct nv50_head *nv50_head_create(struct drm_device *, int index);
12885ecb 23void nv50_head_flush_set(struct nv50_head *head, struct nv50_head_atom *asyh);
c9a3ca5d 24void nv50_head_flush_set_wndw(struct nv50_head *head, struct nv50_head_atom *asyh);
12885ecb
LP
25void nv50_head_flush_clr(struct nv50_head *head,
26 struct nv50_head_atom *asyh, bool flush);
1590700d
BS
27
28struct 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
53extern const struct nv50_head_func head507d;
1f772f5a 54int head507d_view(struct nv50_head *, struct nv50_head_atom *);
caa966a7 55int head507d_mode(struct nv50_head *, struct nv50_head_atom *);
13199270 56bool head507d_olut(struct nv50_head *, struct nv50_head_atom *, int);
09e1b78a 57void head507d_core_calc(struct nv50_head *, struct nv50_head_atom *);
aabe253e 58int head507d_core_clr(struct nv50_head *);
01d380ab
BS
59int head507d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *,
60 struct nv50_head_atom *);
61int head507d_curs_format(struct nv50_head *, struct nv50_wndw_atom *,
62 struct nv50_head_atom *);
93f7f054 63int head507d_base(struct nv50_head *, struct nv50_head_atom *);
db2a2069 64int head507d_ovly(struct nv50_head *, struct nv50_head_atom *);
2f819f2b 65int head507d_dither(struct nv50_head *, struct nv50_head_atom *);
246db5fd 66int head507d_procamp(struct nv50_head *, struct nv50_head_atom *);
09e1b78a
BS
67
68extern const struct nv50_head_func head827d;
69
70extern const struct nv50_head_func head907d;
1f772f5a 71int head907d_view(struct nv50_head *, struct nv50_head_atom *);
caa966a7 72int head907d_mode(struct nv50_head *, struct nv50_head_atom *);
13199270 73bool head907d_olut(struct nv50_head *, struct nv50_head_atom *, int);
a5df7630 74int head907d_olut_set(struct nv50_head *, struct nv50_head_atom *);
4fbf03a3 75int head907d_olut_clr(struct nv50_head *);
a38870a2 76int head907d_core_set(struct nv50_head *, struct nv50_head_atom *);
aabe253e 77int head907d_core_clr(struct nv50_head *);
9549c14b 78int head907d_curs_set(struct nv50_head *, struct nv50_head_atom *);
bc5af56a 79int head907d_curs_clr(struct nv50_head *);
db2a2069 80int head907d_ovly(struct nv50_head *, struct nv50_head_atom *);
246db5fd 81int head907d_procamp(struct nv50_head *, struct nv50_head_atom *);
ff37116e 82int head907d_or(struct nv50_head *, struct nv50_head_atom *);
09e1b78a
BS
83
84extern const struct nv50_head_func head917d;
facaed62
BS
85int head917d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *,
86 struct nv50_head_atom *);
87
88extern const struct nv50_head_func headc37d;
1f772f5a 89int headc37d_view(struct nv50_head *, struct nv50_head_atom *);
563737c5
BS
90int headc37d_curs_format(struct nv50_head *, struct nv50_wndw_atom *,
91 struct nv50_head_atom *);
9549c14b 92int headc37d_curs_set(struct nv50_head *, struct nv50_head_atom *);
bc5af56a 93int headc37d_curs_clr(struct nv50_head *);
2f819f2b 94int headc37d_dither(struct nv50_head *, struct nv50_head_atom *);
dbdaf719 95void headc37d_static_wndw_map(struct nv50_head *, struct nv50_head_atom *);
563737c5
BS
96
97extern const struct nv50_head_func headc57d;
1590700d 98#endif