1 #ifndef __NVKM_DISP_IOR_H__
2 #define __NVKM_DISP_IOR_H__
6 const struct nvkm_ior_func *func;
7 struct nvkm_disp *disp;
16 struct list_head head;
18 struct nvkm_ior_state {
41 struct nvkm_ior_func {
42 void (*state)(struct nvkm_ior *, struct nvkm_ior_state *);
43 void (*power)(struct nvkm_ior *, bool normal, bool pu,
44 bool data, bool vsync, bool hsync);
45 int (*sense)(struct nvkm_ior *, u32 loadval);
48 void (*ctrl)(struct nvkm_ior *, int head, bool enable,
49 u8 max_ac_packet, u8 rekey, u8 *avi, u8 avi_size,
50 u8 *vendor, u8 vendor_size);
58 int nvkm_ior_new_(const struct nvkm_ior_func *func, struct nvkm_disp *,
59 enum nvkm_ior_type type, int id);
60 void nvkm_ior_del(struct nvkm_ior **);
61 struct nvkm_ior *nvkm_ior_find(struct nvkm_disp *, enum nvkm_ior_type, int id);
64 nv50_ior_base(struct nvkm_ior *ior)
66 return ior->id * 0x800;
69 void nv50_dac_power(struct nvkm_ior *, bool, bool, bool, bool, bool);
70 int nv50_dac_sense(struct nvkm_ior *, u32);
72 void nv50_sor_state(struct nvkm_ior *, struct nvkm_ior_state *);
73 void nv50_sor_power(struct nvkm_ior *, bool, bool, bool, bool, bool);
75 void g94_sor_state(struct nvkm_ior *, struct nvkm_ior_state *);
76 void gf119_sor_state(struct nvkm_ior *, struct nvkm_ior_state *);
78 void g84_hdmi_ctrl(struct nvkm_ior *, int, bool, u8, u8, u8 *, u8 , u8 *, u8);
79 void gt215_hdmi_ctrl(struct nvkm_ior *, int, bool, u8, u8, u8 *, u8 , u8 *, u8);
80 void gf119_hdmi_ctrl(struct nvkm_ior *, int, bool, u8, u8, u8 *, u8 , u8 *, u8);
81 void gk104_hdmi_ctrl(struct nvkm_ior *, int, bool, u8, u8, u8 *, u8 , u8 *, u8);
83 #define IOR_MSG(i,l,f,a...) do { \
84 struct nvkm_ior *_ior = (i); \
85 nvkm_##l(&_ior->disp->engine.subdev, "%s: "f, _ior->name, ##a); \
87 #define IOR_WARN(i,f,a...) IOR_MSG((i), warn, f, ##a)
88 #define IOR_DBG(i,f,a...) IOR_MSG((i), debug, f, ##a)
90 int nv50_dac_new(struct nvkm_disp *, int);
91 int gf119_dac_new(struct nvkm_disp *, int);
93 int nv50_pior_new(struct nvkm_disp *, int);
95 int nv50_sor_new(struct nvkm_disp *, int);
96 int g84_sor_new(struct nvkm_disp *, int);
97 int g94_sor_new(struct nvkm_disp *, int);
98 int mcp77_sor_new(struct nvkm_disp *, int);
99 int gt215_sor_new(struct nvkm_disp *, int);
100 int mcp89_sor_new(struct nvkm_disp *, int);
101 int gf119_sor_new(struct nvkm_disp *, int);
102 int gk104_sor_new(struct nvkm_disp *, int);
103 int gm107_sor_new(struct nvkm_disp *, int);
104 int gm200_sor_new(struct nvkm_disp *, int);