Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[deliverable/linux.git] / drivers / gpu / drm / nouveau / nvkm / engine / disp / nv50.h
CommitLineData
70cabe4a
BS
1#ifndef __NV50_DISP_H__
2#define __NV50_DISP_H__
0ce41e3c 3#define nv50_disp(p) container_of((p), struct nv50_disp, base)
a8f8b489 4#include "priv.h"
878da15a
BS
5struct nvkm_output;
6struct nvkm_output_dp;
a8f8b489 7
878da15a 8#define NV50_DISP_MTHD_ struct nvkm_object *object, \
fd166a18 9 struct nv50_disp *disp, void *data, u32 size
bf0eb898
BS
10#define NV50_DISP_MTHD_V0 NV50_DISP_MTHD_, int head
11#define NV50_DISP_MTHD_V1 NV50_DISP_MTHD_, int head, struct nvkm_output *outp
12
fd166a18 13struct nv50_disp {
70aa8670 14 const struct nv50_disp_func *func;
878da15a 15 struct nvkm_disp base;
5cc027f6
BS
16
17 struct work_struct supervisor;
18 u32 super;
19
b38a2322
BS
20 struct nvkm_event uevent;
21
70cabe4a 22 struct {
4a230fa6 23 u32 lvdsconf;
70cabe4a 24 } sor;
70aa8670 25
a2bc283f 26 struct {
a2bc283f 27 u8 type[3];
a2bc283f 28 } pior;
0ce41e3c
BS
29
30 struct nv50_disp_chan *chan[17];
70cabe4a
BS
31};
32
2a7909c0 33int nv50_disp_root_scanoutpos(NV50_DISP_MTHD_V0);
d2fa7d32 34
2a7909c0 35int gf119_disp_root_scanoutpos(NV50_DISP_MTHD_V0);
35b21d39 36
bf0eb898 37int nv50_dac_power(NV50_DISP_MTHD_V1);
c4abd317 38int nv50_dac_sense(NV50_DISP_MTHD_V1);
35b21d39 39
878da15a 40int gt215_hda_eld(NV50_DISP_MTHD_V1);
2a7909c0 41int gf119_hda_eld(NV50_DISP_MTHD_V1);
a4feaf4e 42
878da15a
BS
43int g84_hdmi_ctrl(NV50_DISP_MTHD_V1);
44int gt215_hdmi_ctrl(NV50_DISP_MTHD_V1);
2a7909c0 45int gf119_hdmi_ctrl(NV50_DISP_MTHD_V1);
878da15a 46int gk104_hdmi_ctrl(NV50_DISP_MTHD_V1);
a4feaf4e 47
d55b4af9 48int nv50_sor_power(NV50_DISP_MTHD_V1);
67cb49c4 49int nv50_pior_power(NV50_DISP_MTHD_V1);
a2bc283f 50
70aa8670
BS
51int nv50_disp_new_(const struct nv50_disp_func *, struct nvkm_device *,
52 int index, int heads, struct nvkm_disp **);
53int gf119_disp_new_(const struct nv50_disp_func *, struct nvkm_device *,
54 int index, struct nvkm_disp **);
55
56struct nv50_disp_func_outp {
57 int (* crt)(struct nvkm_disp *, int index, struct dcb_output *,
58 struct nvkm_output **);
59 int (* tv)(struct nvkm_disp *, int index, struct dcb_output *,
60 struct nvkm_output **);
61 int (*tmds)(struct nvkm_disp *, int index, struct dcb_output *,
62 struct nvkm_output **);
63 int (*lvds)(struct nvkm_disp *, int index, struct dcb_output *,
64 struct nvkm_output **);
65 int (* dp)(struct nvkm_disp *, int index, struct dcb_output *,
66 struct nvkm_output **);
67};
68
69struct nv50_disp_func {
70 void (*intr)(struct nv50_disp *);
fd47877f 71 void (*intr_error)(struct nv50_disp *, int chid);
70aa8670
BS
72
73 const struct nvkm_event_func *uevent;
74 void (*super)(struct work_struct *);
75
76 const struct nvkm_disp_oclass *root;
77
78 struct {
79 void (*vblank_init)(struct nv50_disp *, int head);
80 void (*vblank_fini)(struct nv50_disp *, int head);
81 int (*scanoutpos)(NV50_DISP_MTHD_V0);
82 } head;
83
84 struct {
85 const struct nv50_disp_func_outp internal;
86 const struct nv50_disp_func_outp external;
87 } outp;
88
89 struct {
90 int nr;
91 int (*power)(NV50_DISP_MTHD_V1);
92 int (*sense)(NV50_DISP_MTHD_V1);
93 } dac;
94
95 struct {
96 int nr;
97 int (*power)(NV50_DISP_MTHD_V1);
98 int (*hda_eld)(NV50_DISP_MTHD_V1);
99 int (*hdmi)(NV50_DISP_MTHD_V1);
100 void (*magic)(struct nvkm_output *);
101 } sor;
102
103 struct {
104 int nr;
105 int (*power)(NV50_DISP_MTHD_V1);
106 } pior;
107};
108
109void nv50_disp_vblank_init(struct nv50_disp *, int);
110void nv50_disp_vblank_fini(struct nv50_disp *, int);
111void nv50_disp_intr(struct nv50_disp *);
5cc027f6 112void nv50_disp_intr_supervisor(struct work_struct *);
70cabe4a 113
70aa8670
BS
114void gf119_disp_vblank_init(struct nv50_disp *, int);
115void gf119_disp_vblank_fini(struct nv50_disp *, int);
116void gf119_disp_intr(struct nv50_disp *);
2a7909c0 117void gf119_disp_intr_supervisor(struct work_struct *);
fd47877f 118void gf119_disp_intr_error(struct nv50_disp *, int);
70cabe4a 119#endif
This page took 0.290052 seconds and 5 git commands to generate.