Lines Matching full:dvo

69  * Register c0 controls how the DVO synchronizes with
73 #define NS2501_C0_ENABLE (1<<0) /* enable the DVO sync in general */
86 * this register controls the dithering of the DVO
160 * backlight and the DVO output. To enable the corresponding
163 #define NS2501_REG34 0x34 /* DVO enable functions, first register */
164 #define NS2501_REG35 0x35 /* DVO enable functions, second register */
165 #define NS2501_34_ENABLE_OUTPUT (1<<0) /* enable DVO output */
200 * the DVO, given a specific output configuration.
225 * DVO configuration values, partially based on what the BIOS
293 * Fujitsu S6010 in the DVO control registers. Their
390 ** DVO with the above function.
392 static bool ns2501_readb(struct intel_dvo_device *dvo, int addr, u8 *ch) in ns2501_readb() argument
394 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_readb()
395 struct i2c_adapter *adapter = dvo->i2c_bus; in ns2501_readb()
401 .addr = dvo->target_addr, in ns2501_readb()
407 .addr = dvo->target_addr, in ns2501_readb()
425 adapter->name, dvo->target_addr); in ns2501_readb()
435 ** DVO with the above function.
437 static bool ns2501_writeb(struct intel_dvo_device *dvo, int addr, u8 ch) in ns2501_writeb() argument
439 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_writeb()
440 struct i2c_adapter *adapter = dvo->i2c_bus; in ns2501_writeb()
444 .addr = dvo->target_addr, in ns2501_writeb()
459 addr, adapter->name, dvo->target_addr); in ns2501_writeb()
471 static bool ns2501_init(struct intel_dvo_device *dvo, in ns2501_init() argument
482 dvo->i2c_bus = adapter; in ns2501_init()
483 dvo->dev_priv = ns; in ns2501_init()
486 if (!ns2501_readb(dvo, NS2501_VID_LO, &ch)) in ns2501_init()
491 ch, adapter->name, dvo->target_addr); in ns2501_init()
495 if (!ns2501_readb(dvo, NS2501_DID_LO, &ch)) in ns2501_init()
500 ch, adapter->name, dvo->target_addr); in ns2501_init()
505 DRM_DEBUG_KMS("init ns2501 dvo controller successfully!\n"); in ns2501_init()
514 static enum drm_connector_status ns2501_detect(struct intel_dvo_device *dvo) in ns2501_detect() argument
526 static enum drm_mode_status ns2501_mode_valid(struct intel_dvo_device *dvo, in ns2501_mode_valid() argument
548 static void ns2501_mode_set(struct intel_dvo_device *dvo, in ns2501_mode_set() argument
553 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_mode_set()
601 ns2501_writeb(dvo, regs_init[i].offset, regs_init[i].value); in ns2501_mode_set()
605 ns2501_writeb(dvo, mode_agnostic_values[i].offset, in ns2501_mode_set()
612 ns2501_writeb(dvo, NS2501_REG8, conf->conf); in ns2501_mode_set()
613 ns2501_writeb(dvo, NS2501_REG1B, conf->pll_a); in ns2501_mode_set()
614 ns2501_writeb(dvo, NS2501_REG1C, conf->pll_b & 0xff); in ns2501_mode_set()
615 ns2501_writeb(dvo, NS2501_REG1D, conf->pll_b >> 8); in ns2501_mode_set()
616 ns2501_writeb(dvo, NS2501_REGC1, conf->hstart & 0xff); in ns2501_mode_set()
617 ns2501_writeb(dvo, NS2501_REGC2, conf->hstart >> 8); in ns2501_mode_set()
618 ns2501_writeb(dvo, NS2501_REGC3, conf->hstop & 0xff); in ns2501_mode_set()
619 ns2501_writeb(dvo, NS2501_REGC4, conf->hstop >> 8); in ns2501_mode_set()
620 ns2501_writeb(dvo, NS2501_REGC5, conf->vstart & 0xff); in ns2501_mode_set()
621 ns2501_writeb(dvo, NS2501_REGC6, conf->vstart >> 8); in ns2501_mode_set()
622 ns2501_writeb(dvo, NS2501_REGC7, conf->vstop & 0xff); in ns2501_mode_set()
623 ns2501_writeb(dvo, NS2501_REGC8, conf->vstop >> 8); in ns2501_mode_set()
624 ns2501_writeb(dvo, NS2501_REG80, conf->vsync & 0xff); in ns2501_mode_set()
625 ns2501_writeb(dvo, NS2501_REG81, conf->vsync >> 8); in ns2501_mode_set()
626 ns2501_writeb(dvo, NS2501_REG82, conf->vtotal & 0xff); in ns2501_mode_set()
627 ns2501_writeb(dvo, NS2501_REG83, conf->vtotal >> 8); in ns2501_mode_set()
628 ns2501_writeb(dvo, NS2501_REG98, conf->hpos & 0xff); in ns2501_mode_set()
629 ns2501_writeb(dvo, NS2501_REG99, conf->hpos >> 8); in ns2501_mode_set()
630 ns2501_writeb(dvo, NS2501_REG8E, conf->vpos & 0xff); in ns2501_mode_set()
631 ns2501_writeb(dvo, NS2501_REG8F, conf->vpos >> 8); in ns2501_mode_set()
632 ns2501_writeb(dvo, NS2501_REG9C, conf->voffs & 0xff); in ns2501_mode_set()
633 ns2501_writeb(dvo, NS2501_REG9D, conf->voffs >> 8); in ns2501_mode_set()
634 ns2501_writeb(dvo, NS2501_REGB8, conf->hscale & 0xff); in ns2501_mode_set()
635 ns2501_writeb(dvo, NS2501_REGB9, conf->hscale >> 8); in ns2501_mode_set()
636 ns2501_writeb(dvo, NS2501_REG10, conf->vscale & 0xff); in ns2501_mode_set()
637 ns2501_writeb(dvo, NS2501_REG11, conf->vscale >> 8); in ns2501_mode_set()
638 ns2501_writeb(dvo, NS2501_REGF9, conf->dither); in ns2501_mode_set()
639 ns2501_writeb(dvo, NS2501_REG41, conf->syncb); in ns2501_mode_set()
640 ns2501_writeb(dvo, NS2501_REGC0, conf->sync); in ns2501_mode_set()
644 static bool ns2501_get_hw_state(struct intel_dvo_device *dvo) in ns2501_get_hw_state() argument
648 if (!ns2501_readb(dvo, NS2501_REG8, &ch)) in ns2501_get_hw_state()
655 static void ns2501_dpms(struct intel_dvo_device *dvo, bool enable) in ns2501_dpms() argument
657 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_dpms()
659 DRM_DEBUG_KMS("Trying set the dpms of the DVO to %i\n", enable); in ns2501_dpms()
662 ns2501_writeb(dvo, NS2501_REGC0, ns->conf->sync | 0x08); in ns2501_dpms()
664 ns2501_writeb(dvo, NS2501_REG41, ns->conf->syncb); in ns2501_dpms()
666 ns2501_writeb(dvo, NS2501_REG34, NS2501_34_ENABLE_OUTPUT); in ns2501_dpms()
669 ns2501_writeb(dvo, NS2501_REG8, in ns2501_dpms()
672 ns2501_writeb(dvo, NS2501_REG8, ns->conf->conf); in ns2501_dpms()
675 ns2501_writeb(dvo, NS2501_REG34, in ns2501_dpms()
678 ns2501_writeb(dvo, NS2501_REGC0, ns->conf->sync); in ns2501_dpms()
680 ns2501_writeb(dvo, NS2501_REG34, NS2501_34_ENABLE_OUTPUT); in ns2501_dpms()
683 ns2501_writeb(dvo, NS2501_REG8, NS2501_8_VEN | NS2501_8_HEN | in ns2501_dpms()
687 ns2501_writeb(dvo, NS2501_REG34, 0x00); in ns2501_dpms()
691 static void ns2501_destroy(struct intel_dvo_device *dvo) in ns2501_destroy() argument
693 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_destroy()
697 dvo->dev_priv = NULL; in ns2501_destroy()