Lines Matching refs:mode
16 static int lcdc_get_clk_delay(const struct display_timing *mode, int tcon) in lcdc_get_clk_delay() argument
20 delay = mode->vfront_porch.typ + mode->vsync_len.typ + in lcdc_get_clk_delay()
21 mode->vback_porch.typ; in lcdc_get_clk_delay()
22 if (mode->flags & DISPLAY_FLAGS_INTERLACED) in lcdc_get_clk_delay()
71 const struct display_timing *mode, in lcdc_tcon0_mode_set() argument
83 clk_delay = lcdc_get_clk_delay(mode, 0); in lcdc_tcon0_mode_set()
90 writel(SUNXI_LCDC_X(mode->hactive.typ) | in lcdc_tcon0_mode_set()
91 SUNXI_LCDC_Y(mode->vactive.typ), &lcdc->tcon0_timing_active); in lcdc_tcon0_mode_set()
93 bp = mode->hsync_len.typ + mode->hback_porch.typ; in lcdc_tcon0_mode_set()
94 total = mode->hactive.typ + mode->hfront_porch.typ + bp; in lcdc_tcon0_mode_set()
98 bp = mode->vsync_len.typ + mode->vback_porch.typ; in lcdc_tcon0_mode_set()
99 total = mode->vactive.typ + mode->vfront_porch.typ + bp; in lcdc_tcon0_mode_set()
104 writel(SUNXI_LCDC_X(mode->hsync_len.typ) | in lcdc_tcon0_mode_set()
105 SUNXI_LCDC_Y(mode->vsync_len.typ), &lcdc->tcon0_timing_sync); in lcdc_tcon0_mode_set()
134 if (mode->flags & DISPLAY_FLAGS_HSYNC_LOW) in lcdc_tcon0_mode_set()
136 if (mode->flags & DISPLAY_FLAGS_VSYNC_LOW) in lcdc_tcon0_mode_set()
149 const struct display_timing *mode, in lcdc_tcon1_mode_set() argument
160 clk_delay = lcdc_get_clk_delay(mode, 1); in lcdc_tcon1_mode_set()
162 ((mode->flags & DISPLAY_FLAGS_INTERLACED) ? in lcdc_tcon1_mode_set()
166 yres = mode->vactive.typ; in lcdc_tcon1_mode_set()
167 if (mode->flags & DISPLAY_FLAGS_INTERLACED) in lcdc_tcon1_mode_set()
169 writel(SUNXI_LCDC_X(mode->hactive.typ) | SUNXI_LCDC_Y(yres), in lcdc_tcon1_mode_set()
171 writel(SUNXI_LCDC_X(mode->hactive.typ) | SUNXI_LCDC_Y(yres), in lcdc_tcon1_mode_set()
173 writel(SUNXI_LCDC_X(mode->hactive.typ) | SUNXI_LCDC_Y(yres), in lcdc_tcon1_mode_set()
176 bp = mode->hsync_len.typ + mode->hback_porch.typ; in lcdc_tcon1_mode_set()
177 total = mode->hactive.typ + mode->hfront_porch.typ + bp; in lcdc_tcon1_mode_set()
181 bp = mode->vsync_len.typ + mode->vback_porch.typ; in lcdc_tcon1_mode_set()
182 total = mode->vactive.typ + mode->vfront_porch.typ + bp; in lcdc_tcon1_mode_set()
183 if (!(mode->flags & DISPLAY_FLAGS_INTERLACED)) in lcdc_tcon1_mode_set()
188 writel(SUNXI_LCDC_X(mode->hsync_len.typ) | in lcdc_tcon1_mode_set()
189 SUNXI_LCDC_Y(mode->vsync_len.typ), &lcdc->tcon1_timing_sync); in lcdc_tcon1_mode_set()
193 if (mode->flags & DISPLAY_FLAGS_HSYNC_HIGH) in lcdc_tcon1_mode_set()
195 if (mode->flags & DISPLAY_FLAGS_VSYNC_HIGH) in lcdc_tcon1_mode_set()