]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h
65d445687038255d44b3ca1bb4bed21b38a617ae
[karo-tx-linux.git] / drivers / gpu / drm / nouveau / nvkm / engine / disp / nv50.h
1 #ifndef __NV50_DISP_H__
2 #define __NV50_DISP_H__
3 #define nv50_disp(p) container_of((p), struct nv50_disp, base)
4 #include "priv.h"
5 #include "dp.h"
6
7 struct nv50_disp {
8         const struct nv50_disp_func *func;
9         struct nvkm_disp base;
10
11         struct workqueue_struct *wq;
12         struct work_struct supervisor;
13         u32 super;
14
15         struct nvkm_event uevent;
16
17         struct {
18                 u32 lvdsconf;
19         } sor;
20
21         struct {
22                 u8 type[3];
23         } pior;
24
25         struct nv50_disp_chan *chan[17];
26 };
27
28 void nv50_disp_super_1(struct nv50_disp *);
29
30 int nv50_disp_new_(const struct nv50_disp_func *, struct nvkm_device *,
31                    int index, int heads, struct nvkm_disp **);
32 int gf119_disp_new_(const struct nv50_disp_func *, struct nvkm_device *,
33                     int index, struct nvkm_disp **);
34
35 struct nv50_disp_func {
36         void (*intr)(struct nv50_disp *);
37         void (*intr_error)(struct nv50_disp *, int chid);
38
39         const struct nvkm_event_func *uevent;
40         void (*super)(struct work_struct *);
41
42         const struct nvkm_disp_oclass *root;
43
44         struct {
45                 int (*new)(struct nvkm_disp *, int id);
46         } head;
47
48         struct {
49                 int nr;
50                 int (*new)(struct nvkm_disp *, int id);
51         } dac;
52
53         struct {
54                 int nr;
55                 int (*new)(struct nvkm_disp *, int id);
56         } sor;
57
58         struct {
59                 int nr;
60                 int (*new)(struct nvkm_disp *, int id);
61         } pior;
62 };
63
64 void nv50_disp_intr(struct nv50_disp *);
65 void nv50_disp_super(struct work_struct *);
66
67 void gf119_disp_intr(struct nv50_disp *);
68 void gf119_disp_super(struct work_struct *);
69 void gf119_disp_intr_error(struct nv50_disp *, int);
70
71 void nv50_disp_dptmds_war_2(struct nv50_disp *, struct dcb_output *);
72 void nv50_disp_dptmds_war_3(struct nv50_disp *, struct dcb_output *);
73 void nv50_disp_update_sppll1(struct nv50_disp *);
74 #endif