1 #ifndef __NV50_DISP_H__
2 #define __NV50_DISP_H__
3 #define nv50_disp(p) container_of((p), struct nv50_disp, base)
7 #define NV50_DISP_MTHD_ struct nvkm_object *object, \
8 struct nv50_disp *disp, void *data, u32 size
9 #define NV50_DISP_MTHD_V1 NV50_DISP_MTHD_, int head, struct nvkm_output *outp
12 const struct nv50_disp_func *func;
13 struct nvkm_disp base;
15 struct work_struct supervisor;
18 struct nvkm_event uevent;
28 struct nv50_disp_chan *chan[17];
31 int nv50_dac_power(NV50_DISP_MTHD_V1);
32 int nv50_dac_sense(NV50_DISP_MTHD_V1);
34 int gt215_hda_eld(NV50_DISP_MTHD_V1);
35 int gf119_hda_eld(NV50_DISP_MTHD_V1);
37 int g84_hdmi_ctrl(NV50_DISP_MTHD_V1);
38 int gt215_hdmi_ctrl(NV50_DISP_MTHD_V1);
39 int gf119_hdmi_ctrl(NV50_DISP_MTHD_V1);
40 int gk104_hdmi_ctrl(NV50_DISP_MTHD_V1);
42 int nv50_sor_power(NV50_DISP_MTHD_V1);
43 int nv50_pior_power(NV50_DISP_MTHD_V1);
45 int nv50_disp_new_(const struct nv50_disp_func *, struct nvkm_device *,
46 int index, int heads, struct nvkm_disp **);
47 int gf119_disp_new_(const struct nv50_disp_func *, struct nvkm_device *,
48 int index, struct nvkm_disp **);
50 struct nv50_disp_func_outp {
51 int (* crt)(struct nvkm_disp *, int index, struct dcb_output *,
52 struct nvkm_output **);
53 int (* tv)(struct nvkm_disp *, int index, struct dcb_output *,
54 struct nvkm_output **);
55 int (*tmds)(struct nvkm_disp *, int index, struct dcb_output *,
56 struct nvkm_output **);
57 int (*lvds)(struct nvkm_disp *, int index, struct dcb_output *,
58 struct nvkm_output **);
59 int (* dp)(struct nvkm_disp *, int index, struct dcb_output *,
60 struct nvkm_output **);
63 struct nv50_disp_func {
64 void (*intr)(struct nv50_disp *);
65 void (*intr_error)(struct nv50_disp *, int chid);
67 const struct nvkm_event_func *uevent;
68 void (*super)(struct work_struct *);
70 const struct nvkm_disp_oclass *root;
73 int (*new)(struct nvkm_disp *, int id);
77 const struct nv50_disp_func_outp internal;
78 const struct nv50_disp_func_outp external;
83 int (*power)(NV50_DISP_MTHD_V1);
84 int (*sense)(NV50_DISP_MTHD_V1);
89 int (*power)(NV50_DISP_MTHD_V1);
90 int (*hda_eld)(NV50_DISP_MTHD_V1);
91 int (*hdmi)(NV50_DISP_MTHD_V1);
92 void (*magic)(struct nvkm_output *);
97 int (*power)(NV50_DISP_MTHD_V1);
101 void nv50_disp_intr(struct nv50_disp *);
102 void nv50_disp_super(struct work_struct *);
104 void gf119_disp_intr(struct nv50_disp *);
105 void gf119_disp_super(struct work_struct *);
106 void gf119_disp_intr_error(struct nv50_disp *, int);
108 void nv50_disp_dptmds_war_2(struct nv50_disp *, struct dcb_output *);
109 void nv50_disp_dptmds_war_3(struct nv50_disp *, struct dcb_output *);
110 void nv50_disp_update_sppll1(struct nv50_disp *);