Lines Matching +full:flip +full:- +full:horizontal
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
75 #define NS2501_C0_HSYNC (1<<1) /* synchronize horizontal with input */
77 #define NS2501_C0_RESET (1<<7) /* reset the synchronization flip/flops */
102 #define NS2501_REG1C 0x1c /* low-part of the second register */
103 #define NS2501_REG1D 0x1d /* high-part of the second register */
106 * Scaler control registers. Horizontal at b8,b9,
108 * 2^16/control-value. The low-byte comes first.
110 #define NS2501_REG10 0x10 /* low-byte vertical scaler */
111 #define NS2501_REG11 0x11 /* high-byte vertical scaler */
112 #define NS2501_REGB8 0xb8 /* low-byte horizontal scaler */
113 #define NS2501_REGB9 0xb9 /* high-byte horizontal scaler */
122 #define NS2501_REGC1 0xc1 /* low-byte horizontal display start */
123 #define NS2501_REGC2 0xc2 /* high-byte horizontal display start */
124 #define NS2501_REGC3 0xc3 /* low-byte horizontal display stop */
125 #define NS2501_REGC4 0xc4 /* high-byte horizontal display stop */
126 #define NS2501_REGC5 0xc5 /* low-byte vertical display start */
127 #define NS2501_REGC6 0xc6 /* high-byte vertical display start */
128 #define NS2501_REGC7 0xc7 /* low-byte vertical display stop */
129 #define NS2501_REGC8 0xc8 /* high-byte vertical display stop */
138 #define NS2501_REG80 0x80 /* low-byte vsync-start */
139 #define NS2501_REG81 0x81 /* high-byte vsync-start */
144 * This is again a low-high register pair.
150 * The following registers define the end of the front-porch
151 * in horizontal and vertical position and hence allow to shift
154 #define NS2501_REG98 0x98 /* horizontal start of display + 256, low */
155 #define NS2501_REG99 0x99 /* horizontal start of display + 256, high */
202 * This is pretty much guess-work from reverse-engineering, so
212 u16 hstart; /* horizontal start, registers C1/C2 */
213 u16 hstop; /* horizontal total, registers C3/C4 */
218 u16 hpos; /* horizontal position + 256, 98/99 */
221 u16 hscale; /* horizontal scaling factor, b8/b9 */
319 /* 80-84 are part of the mode-specific configuration */
330 /* 8e,8f are part of the mode-specific configuration */
339 /* 98,99 are part of the mode-specific configuration */
342 /* 9c,9d are part of the mode-specific configuration */
363 /* b8,b9 are part of the mode-specific configuration */
385 #define NSPTR(d) ((NS2501Ptr)(d->DriverPrivate.ptr))
395 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_readb()
396 struct i2c_adapter *adapter = dvo->i2c_bus; in ns2501_readb()
402 .addr = dvo->slave_addr, in ns2501_readb()
408 .addr = dvo->slave_addr, in ns2501_readb()
423 if (!ns->quiet) { in ns2501_readb()
426 adapter->name, dvo->slave_addr); in ns2501_readb()
440 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_writeb()
441 struct i2c_adapter *adapter = dvo->i2c_bus; in ns2501_writeb()
445 .addr = dvo->slave_addr, in ns2501_writeb()
458 if (!ns->quiet) { in ns2501_writeb()
460 addr, adapter->name, dvo->slave_addr); in ns2501_writeb()
483 dvo->i2c_bus = adapter; in ns2501_init()
484 dvo->dev_priv = ns; in ns2501_init()
485 ns->quiet = true; in ns2501_init()
492 ch, adapter->name, dvo->slave_addr); in ns2501_init()
501 ch, adapter->name, dvo->slave_addr); in ns2501_init()
504 ns->quiet = false; in ns2501_init()
532 mode->hdisplay, mode->htotal, mode->vdisplay, mode->vtotal); in ns2501_mode_valid()
540 if ((mode->hdisplay == 640 && mode->vdisplay == 480 && mode->clock == 25175) || in ns2501_mode_valid()
541 (mode->hdisplay == 800 && mode->vdisplay == 600 && mode->clock == 40000) || in ns2501_mode_valid()
542 (mode->hdisplay == 1024 && mode->vdisplay == 768 && mode->clock == 65000)) { in ns2501_mode_valid()
554 struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv); in ns2501_mode_set()
559 mode->hdisplay, mode->htotal, mode->vdisplay, mode->vtotal); in ns2501_mode_set()
576 adjusted_mode->crtc_clock, in ns2501_mode_set()
577 adjusted_mode->crtc_hdisplay, in ns2501_mode_set()
578 adjusted_mode->crtc_hblank_start, in ns2501_mode_set()
579 adjusted_mode->crtc_hblank_end, in ns2501_mode_set()
580 adjusted_mode->crtc_hsync_start, in ns2501_mode_set()
581 adjusted_mode->crtc_hsync_end, in ns2501_mode_set()
582 adjusted_mode->crtc_htotal, in ns2501_mode_set()
583 adjusted_mode->crtc_hskew, in ns2501_mode_set()
584 adjusted_mode->crtc_vdisplay, in ns2501_mode_set()
585 adjusted_mode->crtc_vblank_start, in ns2501_mode_set()
586 adjusted_mode->crtc_vblank_end, in ns2501_mode_set()
587 adjusted_mode->crtc_vsync_start, in ns2501_mode_set()
588 adjusted_mode->crtc_vsync_end, in ns2501_mode_set()
589 adjusted_mode->crtc_vtotal); in ns2501_mode_set()
591 if (mode->hdisplay == 640 && mode->vdisplay == 480) in ns2501_mode_set()
593 else if (mode->hdisplay == 800 && mode->vdisplay == 600) in ns2501_mode_set()
595 else if (mode->hdisplay == 1024 && mode->vdisplay == 768) in ns2501_mode_set()
604 /* Write the mode-agnostic values */ in ns2501_mode_set()
609 /* Write now the mode-specific configuration */ in ns2501_mode_set()
611 ns->conf = conf; in ns2501_mode_set()
613 ns2501_writeb(dvo, NS2501_REG8, conf->conf); in ns2501_mode_set()
614 ns2501_writeb(dvo, NS2501_REG1B, conf->pll_a); in ns2501_mode_set()
615 ns2501_writeb(dvo, NS2501_REG1C, conf->pll_b & 0xff); in ns2501_mode_set()
616 ns2501_writeb(dvo, NS2501_REG1D, conf->pll_b >> 8); in ns2501_mode_set()
617 ns2501_writeb(dvo, NS2501_REGC1, conf->hstart & 0xff); in ns2501_mode_set()
618 ns2501_writeb(dvo, NS2501_REGC2, conf->hstart >> 8); in ns2501_mode_set()
619 ns2501_writeb(dvo, NS2501_REGC3, conf->hstop & 0xff); in ns2501_mode_set()
620 ns2501_writeb(dvo, NS2501_REGC4, conf->hstop >> 8); in ns2501_mode_set()
621 ns2501_writeb(dvo, NS2501_REGC5, conf->vstart & 0xff); in ns2501_mode_set()
622 ns2501_writeb(dvo, NS2501_REGC6, conf->vstart >> 8); in ns2501_mode_set()
623 ns2501_writeb(dvo, NS2501_REGC7, conf->vstop & 0xff); in ns2501_mode_set()
624 ns2501_writeb(dvo, NS2501_REGC8, conf->vstop >> 8); in ns2501_mode_set()
625 ns2501_writeb(dvo, NS2501_REG80, conf->vsync & 0xff); in ns2501_mode_set()
626 ns2501_writeb(dvo, NS2501_REG81, conf->vsync >> 8); in ns2501_mode_set()
627 ns2501_writeb(dvo, NS2501_REG82, conf->vtotal & 0xff); in ns2501_mode_set()
628 ns2501_writeb(dvo, NS2501_REG83, conf->vtotal >> 8); in ns2501_mode_set()
629 ns2501_writeb(dvo, NS2501_REG98, conf->hpos & 0xff); in ns2501_mode_set()
630 ns2501_writeb(dvo, NS2501_REG99, conf->hpos >> 8); in ns2501_mode_set()
631 ns2501_writeb(dvo, NS2501_REG8E, conf->vpos & 0xff); in ns2501_mode_set()
632 ns2501_writeb(dvo, NS2501_REG8F, conf->vpos >> 8); in ns2501_mode_set()
633 ns2501_writeb(dvo, NS2501_REG9C, conf->voffs & 0xff); in ns2501_mode_set()
634 ns2501_writeb(dvo, NS2501_REG9D, conf->voffs >> 8); in ns2501_mode_set()
635 ns2501_writeb(dvo, NS2501_REGB8, conf->hscale & 0xff); in ns2501_mode_set()
636 ns2501_writeb(dvo, NS2501_REGB9, conf->hscale >> 8); in ns2501_mode_set()
637 ns2501_writeb(dvo, NS2501_REG10, conf->vscale & 0xff); in ns2501_mode_set()
638 ns2501_writeb(dvo, NS2501_REG11, conf->vscale >> 8); in ns2501_mode_set()
639 ns2501_writeb(dvo, NS2501_REGF9, conf->dither); in ns2501_mode_set()
640 ns2501_writeb(dvo, NS2501_REG41, conf->syncb); in ns2501_mode_set()
641 ns2501_writeb(dvo, NS2501_REGC0, conf->sync); in ns2501_mode_set()
658 struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv); in ns2501_dpms()
663 ns2501_writeb(dvo, NS2501_REGC0, ns->conf->sync | 0x08); in ns2501_dpms()
665 ns2501_writeb(dvo, NS2501_REG41, ns->conf->syncb); in ns2501_dpms()
671 ns->conf->conf | NS2501_8_BPAS); in ns2501_dpms()
672 if (!(ns->conf->conf & NS2501_8_BPAS)) in ns2501_dpms()
673 ns2501_writeb(dvo, NS2501_REG8, ns->conf->conf); in ns2501_dpms()
679 ns2501_writeb(dvo, NS2501_REGC0, ns->conf->sync); in ns2501_dpms()
694 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_destroy()
698 dvo->dev_priv = NULL; in ns2501_destroy()