Lines Matching refs:sig

203 		struct ipu_di_signal_cfg *sig)  in ipu_di_sync_config_interlaced()  argument
205 u32 h_total = sig->mode.hactive + sig->mode.hsync_len + in ipu_di_sync_config_interlaced()
206 sig->mode.hback_porch + sig->mode.hfront_porch; in ipu_di_sync_config_interlaced()
207 u32 v_total = sig->mode.vactive + sig->mode.vsync_len + in ipu_di_sync_config_interlaced()
208 sig->mode.vback_porch + sig->mode.vfront_porch; in ipu_di_sync_config_interlaced()
220 .cnt_down = sig->mode.hsync_len * 2, in ipu_di_sync_config_interlaced()
227 .cnt_down = sig->mode.vsync_len * 2, in ipu_di_sync_config_interlaced()
240 .offset_count = (sig->mode.vsync_len + in ipu_di_sync_config_interlaced()
241 sig->mode.vback_porch) / 2, in ipu_di_sync_config_interlaced()
243 .repeat_count = sig->mode.vactive / 2, in ipu_di_sync_config_interlaced()
248 .offset_count = sig->mode.hsync_len + in ipu_di_sync_config_interlaced()
249 sig->mode.hback_porch, in ipu_di_sync_config_interlaced()
251 .repeat_count = sig->mode.hactive, in ipu_di_sync_config_interlaced()
266 struct ipu_di_signal_cfg *sig, int div) in ipu_di_sync_config_noninterlaced() argument
268 u32 h_total = sig->mode.hactive + sig->mode.hsync_len + in ipu_di_sync_config_noninterlaced()
269 sig->mode.hback_porch + sig->mode.hfront_porch; in ipu_di_sync_config_noninterlaced()
270 u32 v_total = sig->mode.vactive + sig->mode.vsync_len + in ipu_di_sync_config_noninterlaced()
271 sig->mode.vback_porch + sig->mode.vfront_porch; in ipu_di_sync_config_noninterlaced()
281 .offset_count = div * sig->v_to_h_sync, in ipu_di_sync_config_noninterlaced()
285 .cnt_down = sig->mode.hsync_len * 2, in ipu_di_sync_config_noninterlaced()
292 .cnt_down = sig->mode.vsync_len * 2, in ipu_di_sync_config_noninterlaced()
296 .offset_count = sig->mode.vsync_len + in ipu_di_sync_config_noninterlaced()
297 sig->mode.vback_porch, in ipu_di_sync_config_noninterlaced()
299 .repeat_count = sig->mode.vactive, in ipu_di_sync_config_noninterlaced()
304 .offset_count = sig->mode.hsync_len + in ipu_di_sync_config_noninterlaced()
305 sig->mode.hback_porch, in ipu_di_sync_config_noninterlaced()
307 .repeat_count = sig->mode.hactive, in ipu_di_sync_config_noninterlaced()
328 .offset_count = sig->mode.vsync_len + in ipu_di_sync_config_noninterlaced()
329 sig->mode.vback_porch, in ipu_di_sync_config_noninterlaced()
331 .repeat_count = sig->mode.vactive, in ipu_di_sync_config_noninterlaced()
337 .offset_count = div * sig->v_to_h_sync + 18, /* magic value from Freescale TVE driver */ in ipu_di_sync_config_noninterlaced()
341 .cnt_down = sig->mode.hsync_len * 2, in ipu_di_sync_config_noninterlaced()
345 .offset_count = sig->mode.hsync_len + in ipu_di_sync_config_noninterlaced()
346 sig->mode.hback_porch, in ipu_di_sync_config_noninterlaced()
348 .repeat_count = sig->mode.hactive, in ipu_di_sync_config_noninterlaced()
358 .cnt_down = sig->mode.vsync_len * 2, in ipu_di_sync_config_noninterlaced()
363 .offset_count = div * sig->v_to_h_sync + 18, /* magic value from Freescale TVE driver */ in ipu_di_sync_config_noninterlaced()
367 .cnt_down = sig->mode.hsync_len * 2, in ipu_di_sync_config_noninterlaced()
376 .cnt_down = sig->mode.vsync_len * 2, in ipu_di_sync_config_noninterlaced()
383 if (sig->hsync_pin == 2 && sig->vsync_pin == 3) in ipu_di_sync_config_noninterlaced()
390 const struct ipu_di_signal_cfg *sig) in ipu_di_config_clock() argument
396 if (sig->clkflags & IPU_DI_CLKMODE_EXT) { in ipu_di_config_clock()
404 if (sig->clkflags & IPU_DI_CLKMODE_SYNC) { in ipu_di_config_clock()
424 clk_set_rate(clk, sig->mode.pixelclock); in ipu_di_config_clock()
427 div = DIV_ROUND_CLOSEST(in_rate, sig->mode.pixelclock); in ipu_di_config_clock()
444 div = DIV_ROUND_CLOSEST(clkrate, sig->mode.pixelclock); in ipu_di_config_clock()
448 error = rate / (sig->mode.pixelclock / 1000); in ipu_di_config_clock()
464 clk_set_rate(clk, sig->mode.pixelclock); in ipu_di_config_clock()
467 div = DIV_ROUND_CLOSEST(in_rate, sig->mode.pixelclock); in ipu_di_config_clock()
494 sig->mode.pixelclock, in ipu_di_config_clock()
560 int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) in ipu_di_init_sync_panel() argument
567 di->id, sig->mode.hactive, sig->mode.vactive); in ipu_di_init_sync_panel()
572 sig->mode.pixelclock); in ipu_di_init_sync_panel()
576 ipu_di_config_clock(di, sig); in ipu_di_init_sync_panel()
591 if (sig->mode.flags & DISPLAY_FLAGS_INTERLACED) { in ipu_di_init_sync_panel()
592 ipu_di_sync_config_interlaced(di, sig); in ipu_di_init_sync_panel()
599 ipu_di_sync_config_noninterlaced(di, sig, div); in ipu_di_init_sync_panel()
607 if (!(sig->hsync_pin == 2 && sig->vsync_pin == 3)) in ipu_di_init_sync_panel()
611 if (sig->mode.flags & DISPLAY_FLAGS_HSYNC_HIGH) in ipu_di_init_sync_panel()
612 di_gen |= ipu_di_gen_polarity(sig->hsync_pin); in ipu_di_init_sync_panel()
613 if (sig->mode.flags & DISPLAY_FLAGS_VSYNC_HIGH) in ipu_di_init_sync_panel()
614 di_gen |= ipu_di_gen_polarity(sig->vsync_pin); in ipu_di_init_sync_panel()
616 if (sig->clk_pol) in ipu_di_init_sync_panel()
627 if (sig->enable_pol) in ipu_di_init_sync_panel()
629 if (sig->data_pol) in ipu_di_init_sync_panel()