Rev 2342 | Rev 5060 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2342 | Rev 3031 | ||
---|---|---|---|
Line 206... | Line 206... | ||
206 | /* don't do much */ |
206 | /* don't do much */ |
207 | return; |
207 | return; |
208 | } |
208 | } |
Line 209... | Line 209... | ||
209 | 209 | ||
210 | /* set the SIL164 power state */ |
210 | /* set the SIL164 power state */ |
211 | static void sil164_dpms(struct intel_dvo_device *dvo, int mode) |
211 | static void sil164_dpms(struct intel_dvo_device *dvo, bool enable) |
212 | { |
212 | { |
213 | int ret; |
213 | int ret; |
Line 214... | Line 214... | ||
214 | unsigned char ch; |
214 | unsigned char ch; |
215 | 215 | ||
216 | ret = sil164_readb(dvo, SIL164_REG8, &ch); |
216 | ret = sil164_readb(dvo, SIL164_REG8, &ch); |
Line 217... | Line 217... | ||
217 | if (ret == false) |
217 | if (ret == false) |
218 | return; |
218 | return; |
219 | 219 | ||
220 | if (mode == DRM_MODE_DPMS_ON) |
220 | if (enable) |
Line 221... | Line 221... | ||
221 | ch |= SIL164_8_PD; |
221 | ch |= SIL164_8_PD; |
222 | else |
222 | else |
223 | ch &= ~SIL164_8_PD; |
223 | ch &= ~SIL164_8_PD; |
Line -... | Line 224... | ||
- | 224 | ||
- | 225 | sil164_writeb(dvo, SIL164_REG8, ch); |
|
- | 226 | return; |
|
- | 227 | } |
|
- | 228 | ||
- | 229 | static bool sil164_get_hw_state(struct intel_dvo_device *dvo) |
|
- | 230 | { |
|
- | 231 | int ret; |
|
- | 232 | unsigned char ch; |
|
- | 233 | ||
- | 234 | ret = sil164_readb(dvo, SIL164_REG8, &ch); |
|
- | 235 | if (ret == false) |
|
- | 236 | return false; |
|
- | 237 | ||
- | 238 | if (ch & SIL164_8_PD) |
|
224 | 239 | return true; |
|
225 | sil164_writeb(dvo, SIL164_REG8, ch); |
240 | else |
226 | return; |
241 | return false; |
Line 227... | Line 242... | ||
227 | } |
242 | } |
Line 256... | Line 271... | ||
256 | .init = sil164_init, |
271 | .init = sil164_init, |
257 | .detect = sil164_detect, |
272 | .detect = sil164_detect, |
258 | .mode_valid = sil164_mode_valid, |
273 | .mode_valid = sil164_mode_valid, |
259 | .mode_set = sil164_mode_set, |
274 | .mode_set = sil164_mode_set, |
260 | .dpms = sil164_dpms, |
275 | .dpms = sil164_dpms, |
- | 276 | .get_hw_state = sil164_get_hw_state, |
|
261 | .dump_regs = sil164_dump_regs, |
277 | .dump_regs = sil164_dump_regs, |
262 | .destroy = sil164_destroy, |
278 | .destroy = sil164_destroy, |
263 | };0) |
279 | };0) |