Lines Matching refs:obj

29 nv_rdport(void *obj, int head, u16 port)  in nv_rdport()  argument
31 struct nvkm_device *device = nv_device(obj); in nv_rdport()
34 return nv_rd08(obj, 0x601000 + port); in nv_rdport()
39 return nv_rd08(obj, 0x601000 + (head * 0x2000) + port); in nv_rdport()
46 return nv_rd08(obj, 0x0c0000 + (head * 0x2000) + port); in nv_rdport()
49 nv_error(obj, "unknown vga port 0x%04x\n", port); in nv_rdport()
54 nv_wrport(void *obj, int head, u16 port, u8 data) in nv_wrport() argument
56 struct nvkm_device *device = nv_device(obj); in nv_wrport()
59 nv_wr08(obj, 0x601000 + port, data); in nv_wrport()
64 nv_wr08(obj, 0x601000 + (head * 0x2000) + port, data); in nv_wrport()
71 nv_wr08(obj, 0x0c0000 + (head * 0x2000) + port, data); in nv_wrport()
73 nv_error(obj, "unknown vga port 0x%04x\n", port); in nv_wrport()
77 nv_rdvgas(void *obj, int head, u8 index) in nv_rdvgas() argument
79 nv_wrport(obj, head, 0x03c4, index); in nv_rdvgas()
80 return nv_rdport(obj, head, 0x03c5); in nv_rdvgas()
84 nv_wrvgas(void *obj, int head, u8 index, u8 value) in nv_wrvgas() argument
86 nv_wrport(obj, head, 0x03c4, index); in nv_wrvgas()
87 nv_wrport(obj, head, 0x03c5, value); in nv_wrvgas()
91 nv_rdvgag(void *obj, int head, u8 index) in nv_rdvgag() argument
93 nv_wrport(obj, head, 0x03ce, index); in nv_rdvgag()
94 return nv_rdport(obj, head, 0x03cf); in nv_rdvgag()
98 nv_wrvgag(void *obj, int head, u8 index, u8 value) in nv_wrvgag() argument
100 nv_wrport(obj, head, 0x03ce, index); in nv_wrvgag()
101 nv_wrport(obj, head, 0x03cf, value); in nv_wrvgag()
105 nv_rdvgac(void *obj, int head, u8 index) in nv_rdvgac() argument
107 nv_wrport(obj, head, 0x03d4, index); in nv_rdvgac()
108 return nv_rdport(obj, head, 0x03d5); in nv_rdvgac()
112 nv_wrvgac(void *obj, int head, u8 index, u8 value) in nv_wrvgac() argument
114 nv_wrport(obj, head, 0x03d4, index); in nv_wrvgac()
115 nv_wrport(obj, head, 0x03d5, value); in nv_wrvgac()
119 nv_rdvgai(void *obj, int head, u16 port, u8 index) in nv_rdvgai() argument
121 if (port == 0x03c4) return nv_rdvgas(obj, head, index); in nv_rdvgai()
122 if (port == 0x03ce) return nv_rdvgag(obj, head, index); in nv_rdvgai()
123 if (port == 0x03d4) return nv_rdvgac(obj, head, index); in nv_rdvgai()
124 nv_error(obj, "unknown indexed vga port 0x%04x\n", port); in nv_rdvgai()
129 nv_wrvgai(void *obj, int head, u16 port, u8 index, u8 value) in nv_wrvgai() argument
131 if (port == 0x03c4) nv_wrvgas(obj, head, index, value); in nv_wrvgai()
132 else if (port == 0x03ce) nv_wrvgag(obj, head, index, value); in nv_wrvgai()
133 else if (port == 0x03d4) nv_wrvgac(obj, head, index, value); in nv_wrvgai()
134 else nv_error(obj, "unknown indexed vga port 0x%04x\n", port); in nv_wrvgai()
138 nv_lockvgac(void *obj, bool lock) in nv_lockvgac() argument
140 struct nvkm_device *dev = nv_device(obj); in nv_lockvgac()
142 bool locked = !nv_rdvgac(obj, 0, 0x1f); in nv_lockvgac()
145 nv_wrvgac(obj, 0, 0x1f, data); in nv_lockvgac()
147 nv_wrvgac(obj, 0, 0x3f, data); in nv_lockvgac()
149 if (!(nv_rd32(obj, 0x001084) & 0x10000000)) in nv_lockvgac()
150 nv_wrvgac(obj, 1, 0x1f, data); in nv_lockvgac()
174 nv_rdvgaowner(void *obj) in nv_rdvgaowner() argument
176 if (nv_device(obj)->card_type < NV_50) { in nv_rdvgaowner()
177 if (nv_device(obj)->chipset == 0x11) { in nv_rdvgaowner()
178 u32 tied = nv_rd32(obj, 0x001084) & 0x10000000; in nv_rdvgaowner()
180 u8 slA = nv_rdvgac(obj, 0, 0x28) & 0x80; in nv_rdvgaowner()
181 u8 tvA = nv_rdvgac(obj, 0, 0x33) & 0x01; in nv_rdvgaowner()
182 u8 slB = nv_rdvgac(obj, 1, 0x28) & 0x80; in nv_rdvgaowner()
183 u8 tvB = nv_rdvgac(obj, 1, 0x33) & 0x01; in nv_rdvgaowner()
193 return nv_rdvgac(obj, 0, 0x44); in nv_rdvgaowner()
196 nv_error(obj, "rdvgaowner after nv4x\n"); in nv_rdvgaowner()
201 nv_wrvgaowner(void *obj, u8 select) in nv_wrvgaowner() argument
203 if (nv_device(obj)->card_type < NV_50) { in nv_wrvgaowner()
205 if (nv_device(obj)->chipset == 0x11) { in nv_wrvgaowner()
207 nv_rdvgac(obj, 0, 0x1f); in nv_wrvgaowner()
208 nv_rdvgac(obj, 1, 0x1f); in nv_wrvgaowner()
211 nv_wrvgac(obj, 0, 0x44, owner); in nv_wrvgaowner()
213 if (nv_device(obj)->chipset == 0x11) { in nv_wrvgaowner()
214 nv_wrvgac(obj, 0, 0x2e, owner); in nv_wrvgaowner()
215 nv_wrvgac(obj, 0, 0x2e, owner); in nv_wrvgaowner()
218 nv_error(obj, "wrvgaowner after nv4x\n"); in nv_wrvgaowner()