Lines Matching +full:flip +full:- +full:horizontal

21  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
73 #define NS2501_C0_HSYNC (1<<1) /* synchronize horizontal with input */
75 #define NS2501_C0_RESET (1<<7) /* reset the synchronization flip/flops */
100 #define NS2501_REG1C 0x1c /* low-part of the second register */
101 #define NS2501_REG1D 0x1d /* high-part of the second register */
104 * Scaler control registers. Horizontal at b8,b9,
106 * 2^16/control-value. The low-byte comes first.
108 #define NS2501_REG10 0x10 /* low-byte vertical scaler */
109 #define NS2501_REG11 0x11 /* high-byte vertical scaler */
110 #define NS2501_REGB8 0xb8 /* low-byte horizontal scaler */
111 #define NS2501_REGB9 0xb9 /* high-byte horizontal scaler */
120 #define NS2501_REGC1 0xc1 /* low-byte horizontal display start */
121 #define NS2501_REGC2 0xc2 /* high-byte horizontal display start */
122 #define NS2501_REGC3 0xc3 /* low-byte horizontal display stop */
123 #define NS2501_REGC4 0xc4 /* high-byte horizontal display stop */
124 #define NS2501_REGC5 0xc5 /* low-byte vertical display start */
125 #define NS2501_REGC6 0xc6 /* high-byte vertical display start */
126 #define NS2501_REGC7 0xc7 /* low-byte vertical display stop */
127 #define NS2501_REGC8 0xc8 /* high-byte vertical display stop */
136 #define NS2501_REG80 0x80 /* low-byte vsync-start */
137 #define NS2501_REG81 0x81 /* high-byte vsync-start */
142 * This is again a low-high register pair.
148 * The following registers define the end of the front-porch
149 * in horizontal and vertical position and hence allow to shift
152 #define NS2501_REG98 0x98 /* horizontal start of display + 256, low */
153 #define NS2501_REG99 0x99 /* horizontal start of display + 256, high */
200 * This is pretty much guess-work from reverse-engineering, so
210 u16 hstart; /* horizontal start, registers C1/C2 */
211 u16 hstop; /* horizontal total, registers C3/C4 */
216 u16 hpos; /* horizontal position + 256, 98/99 */
219 u16 hscale; /* horizontal scaling factor, b8/b9 */
317 /* 80-84 are part of the mode-specific configuration */
328 /* 8e,8f are part of the mode-specific configuration */
337 /* 98,99 are part of the mode-specific configuration */
340 /* 9c,9d are part of the mode-specific configuration */
361 /* b8,b9 are part of the mode-specific configuration */
383 #define NSPTR(d) ((NS2501Ptr)(d->DriverPrivate.ptr))
393 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_readb()
394 struct i2c_adapter *adapter = dvo->i2c_bus; in ns2501_readb()
400 .addr = dvo->target_addr, in ns2501_readb()
406 .addr = dvo->target_addr, in ns2501_readb()
421 if (!ns->quiet) { in ns2501_readb()
424 adapter->name, dvo->target_addr); in ns2501_readb()
438 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_writeb()
439 struct i2c_adapter *adapter = dvo->i2c_bus; in ns2501_writeb()
443 .addr = dvo->target_addr, in ns2501_writeb()
456 if (!ns->quiet) { in ns2501_writeb()
458 addr, adapter->name, dvo->target_addr); in ns2501_writeb()
481 dvo->i2c_bus = adapter; in ns2501_init()
482 dvo->dev_priv = ns; in ns2501_init()
483 ns->quiet = true; in ns2501_init()
490 ch, adapter->name, dvo->target_addr); in ns2501_init()
499 ch, adapter->name, dvo->target_addr); in ns2501_init()
502 ns->quiet = false; in ns2501_init()
530 mode->hdisplay, mode->htotal, mode->vdisplay, mode->vtotal); in ns2501_mode_valid()
538 if ((mode->hdisplay == 640 && mode->vdisplay == 480 && mode->clock == 25175) || in ns2501_mode_valid()
539 (mode->hdisplay == 800 && mode->vdisplay == 600 && mode->clock == 40000) || in ns2501_mode_valid()
540 (mode->hdisplay == 1024 && mode->vdisplay == 768 && mode->clock == 65000)) { in ns2501_mode_valid()
552 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_mode_set()
557 mode->hdisplay, mode->htotal, mode->vdisplay, mode->vtotal); in ns2501_mode_set()
574 adjusted_mode->crtc_clock, in ns2501_mode_set()
575 adjusted_mode->crtc_hdisplay, in ns2501_mode_set()
576 adjusted_mode->crtc_hblank_start, in ns2501_mode_set()
577 adjusted_mode->crtc_hblank_end, in ns2501_mode_set()
578 adjusted_mode->crtc_hsync_start, in ns2501_mode_set()
579 adjusted_mode->crtc_hsync_end, in ns2501_mode_set()
580 adjusted_mode->crtc_htotal, in ns2501_mode_set()
581 adjusted_mode->crtc_hskew, in ns2501_mode_set()
582 adjusted_mode->crtc_vdisplay, in ns2501_mode_set()
583 adjusted_mode->crtc_vblank_start, in ns2501_mode_set()
584 adjusted_mode->crtc_vblank_end, in ns2501_mode_set()
585 adjusted_mode->crtc_vsync_start, in ns2501_mode_set()
586 adjusted_mode->crtc_vsync_end, in ns2501_mode_set()
587 adjusted_mode->crtc_vtotal); in ns2501_mode_set()
589 if (mode->hdisplay == 640 && mode->vdisplay == 480) in ns2501_mode_set()
591 else if (mode->hdisplay == 800 && mode->vdisplay == 600) in ns2501_mode_set()
593 else if (mode->hdisplay == 1024 && mode->vdisplay == 768) in ns2501_mode_set()
602 /* Write the mode-agnostic values */ in ns2501_mode_set()
607 /* Write now the mode-specific configuration */ in ns2501_mode_set()
609 ns->conf = conf; in ns2501_mode_set()
611 ns2501_writeb(dvo, NS2501_REG8, conf->conf); in ns2501_mode_set()
612 ns2501_writeb(dvo, NS2501_REG1B, conf->pll_a); in ns2501_mode_set()
613 ns2501_writeb(dvo, NS2501_REG1C, conf->pll_b & 0xff); in ns2501_mode_set()
614 ns2501_writeb(dvo, NS2501_REG1D, conf->pll_b >> 8); in ns2501_mode_set()
615 ns2501_writeb(dvo, NS2501_REGC1, conf->hstart & 0xff); in ns2501_mode_set()
616 ns2501_writeb(dvo, NS2501_REGC2, conf->hstart >> 8); in ns2501_mode_set()
617 ns2501_writeb(dvo, NS2501_REGC3, conf->hstop & 0xff); in ns2501_mode_set()
618 ns2501_writeb(dvo, NS2501_REGC4, conf->hstop >> 8); in ns2501_mode_set()
619 ns2501_writeb(dvo, NS2501_REGC5, conf->vstart & 0xff); in ns2501_mode_set()
620 ns2501_writeb(dvo, NS2501_REGC6, conf->vstart >> 8); in ns2501_mode_set()
621 ns2501_writeb(dvo, NS2501_REGC7, conf->vstop & 0xff); in ns2501_mode_set()
622 ns2501_writeb(dvo, NS2501_REGC8, conf->vstop >> 8); in ns2501_mode_set()
623 ns2501_writeb(dvo, NS2501_REG80, conf->vsync & 0xff); in ns2501_mode_set()
624 ns2501_writeb(dvo, NS2501_REG81, conf->vsync >> 8); in ns2501_mode_set()
625 ns2501_writeb(dvo, NS2501_REG82, conf->vtotal & 0xff); in ns2501_mode_set()
626 ns2501_writeb(dvo, NS2501_REG83, conf->vtotal >> 8); in ns2501_mode_set()
627 ns2501_writeb(dvo, NS2501_REG98, conf->hpos & 0xff); in ns2501_mode_set()
628 ns2501_writeb(dvo, NS2501_REG99, conf->hpos >> 8); in ns2501_mode_set()
629 ns2501_writeb(dvo, NS2501_REG8E, conf->vpos & 0xff); in ns2501_mode_set()
630 ns2501_writeb(dvo, NS2501_REG8F, conf->vpos >> 8); in ns2501_mode_set()
631 ns2501_writeb(dvo, NS2501_REG9C, conf->voffs & 0xff); in ns2501_mode_set()
632 ns2501_writeb(dvo, NS2501_REG9D, conf->voffs >> 8); in ns2501_mode_set()
633 ns2501_writeb(dvo, NS2501_REGB8, conf->hscale & 0xff); in ns2501_mode_set()
634 ns2501_writeb(dvo, NS2501_REGB9, conf->hscale >> 8); in ns2501_mode_set()
635 ns2501_writeb(dvo, NS2501_REG10, conf->vscale & 0xff); in ns2501_mode_set()
636 ns2501_writeb(dvo, NS2501_REG11, conf->vscale >> 8); in ns2501_mode_set()
637 ns2501_writeb(dvo, NS2501_REGF9, conf->dither); in ns2501_mode_set()
638 ns2501_writeb(dvo, NS2501_REG41, conf->syncb); in ns2501_mode_set()
639 ns2501_writeb(dvo, NS2501_REGC0, conf->sync); in ns2501_mode_set()
656 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_dpms()
661 ns2501_writeb(dvo, NS2501_REGC0, ns->conf->sync | 0x08); in ns2501_dpms()
663 ns2501_writeb(dvo, NS2501_REG41, ns->conf->syncb); in ns2501_dpms()
669 ns->conf->conf | NS2501_8_BPAS); in ns2501_dpms()
670 if (!(ns->conf->conf & NS2501_8_BPAS)) in ns2501_dpms()
671 ns2501_writeb(dvo, NS2501_REG8, ns->conf->conf); in ns2501_dpms()
677 ns2501_writeb(dvo, NS2501_REGC0, ns->conf->sync); in ns2501_dpms()
692 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_destroy()
696 dvo->dev_priv = NULL; in ns2501_destroy()