• Home
  • Raw
  • Download

Lines Matching refs:dvo

90 static void enable_dvo(struct intel_dvo_device *dvo)  in enable_dvo()  argument
92 struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv); in enable_dvo()
93 struct i2c_adapter *adapter = dvo->i2c_bus; in enable_dvo()
118 static void restore_dvo(struct intel_dvo_device *dvo) in restore_dvo() argument
120 struct i2c_adapter *adapter = dvo->i2c_bus; in restore_dvo()
125 struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv); in restore_dvo()
139 static bool ns2501_readb(struct intel_dvo_device *dvo, int addr, uint8_t * ch) in ns2501_readb() argument
141 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_readb()
142 struct i2c_adapter *adapter = dvo->i2c_bus; in ns2501_readb()
148 .addr = dvo->slave_addr, in ns2501_readb()
154 .addr = dvo->slave_addr, in ns2501_readb()
172 adapter->name, dvo->slave_addr); in ns2501_readb()
184 static bool ns2501_writeb(struct intel_dvo_device *dvo, int addr, uint8_t ch) in ns2501_writeb() argument
186 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_writeb()
187 struct i2c_adapter *adapter = dvo->i2c_bus; in ns2501_writeb()
191 .addr = dvo->slave_addr, in ns2501_writeb()
206 addr, adapter->name, dvo->slave_addr); in ns2501_writeb()
218 static bool ns2501_init(struct intel_dvo_device *dvo, in ns2501_init() argument
229 dvo->i2c_bus = adapter; in ns2501_init()
230 dvo->dev_priv = ns; in ns2501_init()
233 if (!ns2501_readb(dvo, NS2501_VID_LO, &ch)) in ns2501_init()
238 ch, adapter->name, dvo->slave_addr); in ns2501_init()
242 if (!ns2501_readb(dvo, NS2501_DID_LO, &ch)) in ns2501_init()
247 ch, adapter->name, dvo->slave_addr); in ns2501_init()
263 static enum drm_connector_status ns2501_detect(struct intel_dvo_device *dvo) in ns2501_detect() argument
275 static enum drm_mode_status ns2501_mode_valid(struct intel_dvo_device *dvo, in ns2501_mode_valid() argument
298 static void ns2501_mode_set(struct intel_dvo_device *dvo, in ns2501_mode_set() argument
304 struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv); in ns2501_mode_set()
333 ok &= ns2501_writeb(dvo, 0x11, 0xc8); // 0xc7 also works. in ns2501_mode_set()
334 ok &= ns2501_writeb(dvo, 0x1b, 0x19); in ns2501_mode_set()
335 ok &= ns2501_writeb(dvo, 0x1c, 0x62); // VBIOS left 0x64 here, but 0x62 works nicer in ns2501_mode_set()
336 ok &= ns2501_writeb(dvo, 0x1d, 0x02); in ns2501_mode_set()
338 ok &= ns2501_writeb(dvo, 0x34, 0x03); in ns2501_mode_set()
339 ok &= ns2501_writeb(dvo, 0x35, 0xff); in ns2501_mode_set()
341 ok &= ns2501_writeb(dvo, 0x80, 0x27); in ns2501_mode_set()
342 ok &= ns2501_writeb(dvo, 0x81, 0x03); in ns2501_mode_set()
343 ok &= ns2501_writeb(dvo, 0x82, 0x41); in ns2501_mode_set()
344 ok &= ns2501_writeb(dvo, 0x83, 0x05); in ns2501_mode_set()
346 ok &= ns2501_writeb(dvo, 0x8d, 0x02); in ns2501_mode_set()
347 ok &= ns2501_writeb(dvo, 0x8e, 0x04); in ns2501_mode_set()
348 ok &= ns2501_writeb(dvo, 0x8f, 0x00); in ns2501_mode_set()
350 ok &= ns2501_writeb(dvo, 0x90, 0xfe); /* vertical. VBIOS left 0xff here, but 0xfe works better */ in ns2501_mode_set()
351 ok &= ns2501_writeb(dvo, 0x91, 0x07); in ns2501_mode_set()
352 ok &= ns2501_writeb(dvo, 0x94, 0x00); in ns2501_mode_set()
353 ok &= ns2501_writeb(dvo, 0x95, 0x00); in ns2501_mode_set()
355 ok &= ns2501_writeb(dvo, 0x96, 0x00); in ns2501_mode_set()
357 ok &= ns2501_writeb(dvo, 0x99, 0x00); in ns2501_mode_set()
358 ok &= ns2501_writeb(dvo, 0x9a, 0x88); in ns2501_mode_set()
360 ok &= ns2501_writeb(dvo, 0x9c, 0x23); /* Looks like first and last line of the image. */ in ns2501_mode_set()
361 ok &= ns2501_writeb(dvo, 0x9d, 0x00); in ns2501_mode_set()
362 ok &= ns2501_writeb(dvo, 0x9e, 0x25); in ns2501_mode_set()
363 ok &= ns2501_writeb(dvo, 0x9f, 0x03); in ns2501_mode_set()
365 ok &= ns2501_writeb(dvo, 0xa4, 0x80); in ns2501_mode_set()
367 ok &= ns2501_writeb(dvo, 0xb6, 0x00); in ns2501_mode_set()
369 ok &= ns2501_writeb(dvo, 0xb9, 0xc8); /* horizontal? */ in ns2501_mode_set()
370 ok &= ns2501_writeb(dvo, 0xba, 0x00); /* horizontal? */ in ns2501_mode_set()
372 ok &= ns2501_writeb(dvo, 0xc0, 0x05); /* horizontal? */ in ns2501_mode_set()
373 ok &= ns2501_writeb(dvo, 0xc1, 0xd7); in ns2501_mode_set()
375 ok &= ns2501_writeb(dvo, 0xc2, 0x00); in ns2501_mode_set()
376 ok &= ns2501_writeb(dvo, 0xc3, 0xf8); in ns2501_mode_set()
378 ok &= ns2501_writeb(dvo, 0xc4, 0x03); in ns2501_mode_set()
379 ok &= ns2501_writeb(dvo, 0xc5, 0x1a); in ns2501_mode_set()
381 ok &= ns2501_writeb(dvo, 0xc6, 0x00); in ns2501_mode_set()
382 ok &= ns2501_writeb(dvo, 0xc7, 0x73); in ns2501_mode_set()
383 ok &= ns2501_writeb(dvo, 0xc8, 0x02); in ns2501_mode_set()
398 ok &= ns2501_writeb(dvo, 0x11, 0xa0); in ns2501_mode_set()
399 ok &= ns2501_writeb(dvo, 0x1b, 0x11); in ns2501_mode_set()
400 ok &= ns2501_writeb(dvo, 0x1c, 0x54); in ns2501_mode_set()
401 ok &= ns2501_writeb(dvo, 0x1d, 0x03); in ns2501_mode_set()
403 ok &= ns2501_writeb(dvo, 0x34, 0x03); in ns2501_mode_set()
404 ok &= ns2501_writeb(dvo, 0x35, 0xff); in ns2501_mode_set()
406 ok &= ns2501_writeb(dvo, 0x80, 0xff); in ns2501_mode_set()
407 ok &= ns2501_writeb(dvo, 0x81, 0x07); in ns2501_mode_set()
408 ok &= ns2501_writeb(dvo, 0x82, 0x3d); in ns2501_mode_set()
409 ok &= ns2501_writeb(dvo, 0x83, 0x05); in ns2501_mode_set()
411 ok &= ns2501_writeb(dvo, 0x8d, 0x02); in ns2501_mode_set()
412 ok &= ns2501_writeb(dvo, 0x8e, 0x10); in ns2501_mode_set()
413 ok &= ns2501_writeb(dvo, 0x8f, 0x00); in ns2501_mode_set()
415 ok &= ns2501_writeb(dvo, 0x90, 0xff); /* vertical */ in ns2501_mode_set()
416 ok &= ns2501_writeb(dvo, 0x91, 0x07); in ns2501_mode_set()
417 ok &= ns2501_writeb(dvo, 0x94, 0x00); in ns2501_mode_set()
418 ok &= ns2501_writeb(dvo, 0x95, 0x00); in ns2501_mode_set()
420 ok &= ns2501_writeb(dvo, 0x96, 0x05); in ns2501_mode_set()
422 ok &= ns2501_writeb(dvo, 0x99, 0x00); in ns2501_mode_set()
423 ok &= ns2501_writeb(dvo, 0x9a, 0x88); in ns2501_mode_set()
425 ok &= ns2501_writeb(dvo, 0x9c, 0x24); in ns2501_mode_set()
426 ok &= ns2501_writeb(dvo, 0x9d, 0x00); in ns2501_mode_set()
427 ok &= ns2501_writeb(dvo, 0x9e, 0x25); in ns2501_mode_set()
428 ok &= ns2501_writeb(dvo, 0x9f, 0x03); in ns2501_mode_set()
430 ok &= ns2501_writeb(dvo, 0xa4, 0x84); in ns2501_mode_set()
432 ok &= ns2501_writeb(dvo, 0xb6, 0x09); in ns2501_mode_set()
434 ok &= ns2501_writeb(dvo, 0xb9, 0xa0); /* horizontal? */ in ns2501_mode_set()
435 ok &= ns2501_writeb(dvo, 0xba, 0x00); /* horizontal? */ in ns2501_mode_set()
437 ok &= ns2501_writeb(dvo, 0xc0, 0x05); /* horizontal? */ in ns2501_mode_set()
438 ok &= ns2501_writeb(dvo, 0xc1, 0x90); in ns2501_mode_set()
440 ok &= ns2501_writeb(dvo, 0xc2, 0x00); in ns2501_mode_set()
441 ok &= ns2501_writeb(dvo, 0xc3, 0x0f); in ns2501_mode_set()
443 ok &= ns2501_writeb(dvo, 0xc4, 0x03); in ns2501_mode_set()
444 ok &= ns2501_writeb(dvo, 0xc5, 0x16); in ns2501_mode_set()
446 ok &= ns2501_writeb(dvo, 0xc6, 0x00); in ns2501_mode_set()
447 ok &= ns2501_writeb(dvo, 0xc7, 0x02); in ns2501_mode_set()
448 ok &= ns2501_writeb(dvo, 0xc8, 0x02); in ns2501_mode_set()
469 ok &= ns2501_writeb(dvo, 0x37, 0x44); in ns2501_mode_set()
478 ok &= ns2501_writeb(dvo, NS2501_REG8, ns->reg_8_shadow); in ns2501_mode_set()
482 restore_dvo(dvo); in ns2501_mode_set()
483 enable_dvo(dvo); in ns2501_mode_set()
492 restore_dvo(dvo); in ns2501_mode_set()
496 static bool ns2501_get_hw_state(struct intel_dvo_device *dvo) in ns2501_get_hw_state() argument
500 if (!ns2501_readb(dvo, NS2501_REG8, &ch)) in ns2501_get_hw_state()
510 static void ns2501_dpms(struct intel_dvo_device *dvo, bool enable) in ns2501_dpms() argument
514 struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv); in ns2501_dpms()
533 ok &= ns2501_writeb(dvo, NS2501_REG8, ch); in ns2501_dpms()
535 ns2501_writeb(dvo, 0x34, in ns2501_dpms()
538 ns2501_writeb(dvo, 0x35, in ns2501_dpms()
542 restore_dvo(dvo); in ns2501_dpms()
543 enable_dvo(dvo); in ns2501_dpms()
549 restore_dvo(dvo); in ns2501_dpms()
553 static void ns2501_dump_regs(struct intel_dvo_device *dvo) in ns2501_dump_regs() argument
557 ns2501_readb(dvo, NS2501_FREQ_LO, &val); in ns2501_dump_regs()
559 ns2501_readb(dvo, NS2501_FREQ_HI, &val); in ns2501_dump_regs()
561 ns2501_readb(dvo, NS2501_REG8, &val); in ns2501_dump_regs()
563 ns2501_readb(dvo, NS2501_REG9, &val); in ns2501_dump_regs()
565 ns2501_readb(dvo, NS2501_REGC, &val); in ns2501_dump_regs()
569 static void ns2501_destroy(struct intel_dvo_device *dvo) in ns2501_destroy() argument
571 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_destroy()
575 dvo->dev_priv = NULL; in ns2501_destroy()