]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blame - drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-kernels.git] / drivers / gpu / drm / nouveau / nvkm / engine / disp / nv50.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
70cabe4a
BS
2#ifndef __NV50_DISP_H__
3#define __NV50_DISP_H__
0ce41e3c 4#define nv50_disp(p) container_of((p), struct nv50_disp, base)
a8f8b489 5#include "priv.h"
327c5581 6struct nvkm_head;
a8f8b489 7
fd166a18 8struct nv50_disp {
70aa8670 9 const struct nv50_disp_func *func;
878da15a 10 struct nvkm_disp base;
5cc027f6 11
3607bfd3 12 struct workqueue_struct *wq;
5cc027f6
BS
13 struct work_struct supervisor;
14 u32 super;
15
b38a2322
BS
16 struct nvkm_event uevent;
17
70cabe4a 18 struct {
4a230fa6 19 u32 lvdsconf;
70cabe4a 20 } sor;
70aa8670 21
a2bc283f 22 struct {
a2bc283f 23 u8 type[3];
a2bc283f 24 } pior;
0ce41e3c 25
a90e049c 26 struct nv50_disp_chan *chan[21];
70cabe4a
BS
27};
28
29c0ca73 29void nv50_disp_super_1(struct nv50_disp *);
327c5581 30void nv50_disp_super_1_0(struct nv50_disp *, struct nvkm_head *);
d52e948c 31void nv50_disp_super_2_0(struct nv50_disp *, struct nvkm_head *);
1f0c9eaf 32void nv50_disp_super_2_1(struct nv50_disp *, struct nvkm_head *);
8d7ef84d 33void nv50_disp_super_2_2(struct nv50_disp *, struct nvkm_head *);
0d93cd92 34void nv50_disp_super_3_0(struct nv50_disp *, struct nvkm_head *);
29c0ca73 35
70aa8670
BS
36int nv50_disp_new_(const struct nv50_disp_func *, struct nvkm_device *,
37 int index, int heads, struct nvkm_disp **);
38int gf119_disp_new_(const struct nv50_disp_func *, struct nvkm_device *,
39 int index, struct nvkm_disp **);
40
70aa8670
BS
41struct nv50_disp_func {
42 void (*intr)(struct nv50_disp *);
fd47877f 43 void (*intr_error)(struct nv50_disp *, int chid);
70aa8670
BS
44
45 const struct nvkm_event_func *uevent;
46 void (*super)(struct work_struct *);
47
48 const struct nvkm_disp_oclass *root;
49
50 struct {
a1c93078 51 int (*new)(struct nvkm_disp *, int id);
70aa8670
BS
52 } head;
53
70aa8670
BS
54 struct {
55 int nr;
78f1ad6f 56 int (*new)(struct nvkm_disp *, int id);
70aa8670
BS
57 } dac;
58
59 struct {
60 int nr;
78f1ad6f 61 int (*new)(struct nvkm_disp *, int id);
70aa8670
BS
62 } sor;
63
64 struct {
65 int nr;
78f1ad6f 66 int (*new)(struct nvkm_disp *, int id);
70aa8670
BS
67 } pior;
68};
69
70aa8670 70void nv50_disp_intr(struct nv50_disp *);
af85389c 71void nv50_disp_super(struct work_struct *);
70cabe4a 72
70aa8670 73void gf119_disp_intr(struct nv50_disp *);
af85389c 74void gf119_disp_super(struct work_struct *);
fd47877f 75void gf119_disp_intr_error(struct nv50_disp *, int);
af85389c
BS
76
77void nv50_disp_dptmds_war_2(struct nv50_disp *, struct dcb_output *);
78void nv50_disp_dptmds_war_3(struct nv50_disp *, struct dcb_output *);
79void nv50_disp_update_sppll1(struct nv50_disp *);
70cabe4a 80#endif