Lines Matching full:timing
37 struct gbe_timing_info timing; member
412 static void gbefb_setup_flatpanel(struct gbe_timing_info *timing) in gbefb_setup_flatpanel() argument
418 (timing->flags & FB_SYNC_HOR_HIGH_ACT) ? 0 : 1); in gbefb_setup_flatpanel()
420 (timing->flags & FB_SYNC_VERT_HIGH_ACT) ? 0 : 1); in gbefb_setup_flatpanel()
428 timing->pll_m = 4; in gbefb_setup_flatpanel()
429 timing->pll_n = 1; in gbefb_setup_flatpanel()
430 timing->pll_p = 0; in gbefb_setup_flatpanel()
457 struct gbe_timing_info *timing) in compute_gbe_timing() argument
468 /* Determine valid resolution and timing in compute_gbe_timing()
504 /* set video timing information */ in compute_gbe_timing()
505 if (timing) { in compute_gbe_timing()
506 timing->width = var->xres; in compute_gbe_timing()
507 timing->height = var->yres; in compute_gbe_timing()
508 timing->pll_m = best_m; in compute_gbe_timing()
509 timing->pll_n = best_n; in compute_gbe_timing()
510 timing->pll_p = best_p; in compute_gbe_timing()
511 timing->cfreq = gbe_pll->clock_rate * 1000 * timing->pll_m / in compute_gbe_timing()
512 (timing->pll_n << timing->pll_p); in compute_gbe_timing()
513 timing->htotal = var->left_margin + var->xres + in compute_gbe_timing()
515 timing->vtotal = var->upper_margin + var->yres + in compute_gbe_timing()
517 timing->fields_sec = 1000 * timing->cfreq / timing->htotal * in compute_gbe_timing()
518 1000 / timing->vtotal; in compute_gbe_timing()
519 timing->hblank_start = var->xres; in compute_gbe_timing()
520 timing->vblank_start = var->yres; in compute_gbe_timing()
521 timing->hblank_end = timing->htotal; in compute_gbe_timing()
522 timing->hsync_start = var->xres + var->right_margin + 1; in compute_gbe_timing()
523 timing->hsync_end = timing->hsync_start + var->hsync_len; in compute_gbe_timing()
524 timing->vblank_end = timing->vtotal; in compute_gbe_timing()
525 timing->vsync_start = var->yres + var->lower_margin + 1; in compute_gbe_timing()
526 timing->vsync_end = timing->vsync_start + var->vsync_len; in compute_gbe_timing()
532 static void gbe_set_timing_info(struct gbe_timing_info *timing) in gbe_set_timing_info() argument
539 SET_GBE_FIELD(DOTCLK, M, val, timing->pll_m - 1); in gbe_set_timing_info()
540 SET_GBE_FIELD(DOTCLK, N, val, timing->pll_n - 1); in gbe_set_timing_info()
541 SET_GBE_FIELD(DOTCLK, P, val, timing->pll_p); in gbe_set_timing_info()
548 SET_GBE_FIELD(VT_XYMAX, MAXX, val, timing->htotal); in gbe_set_timing_info()
549 SET_GBE_FIELD(VT_XYMAX, MAXY, val, timing->vtotal); in gbe_set_timing_info()
552 /* setup video timing signals */ in gbe_set_timing_info()
554 SET_GBE_FIELD(VT_VSYNC, VSYNC_ON, val, timing->vsync_start); in gbe_set_timing_info()
555 SET_GBE_FIELD(VT_VSYNC, VSYNC_OFF, val, timing->vsync_end); in gbe_set_timing_info()
558 SET_GBE_FIELD(VT_HSYNC, HSYNC_ON, val, timing->hsync_start); in gbe_set_timing_info()
559 SET_GBE_FIELD(VT_HSYNC, HSYNC_OFF, val, timing->hsync_end); in gbe_set_timing_info()
562 SET_GBE_FIELD(VT_VBLANK, VBLANK_ON, val, timing->vblank_start); in gbe_set_timing_info()
563 SET_GBE_FIELD(VT_VBLANK, VBLANK_OFF, val, timing->vblank_end); in gbe_set_timing_info()
567 timing->hblank_start - 5); in gbe_set_timing_info()
569 timing->hblank_end - 3); in gbe_set_timing_info()
572 /* setup internal timing signals */ in gbe_set_timing_info()
574 SET_GBE_FIELD(VT_VCMAP, VCMAP_ON, val, timing->vblank_start); in gbe_set_timing_info()
575 SET_GBE_FIELD(VT_VCMAP, VCMAP_OFF, val, timing->vblank_end); in gbe_set_timing_info()
578 SET_GBE_FIELD(VT_HCMAP, HCMAP_ON, val, timing->hblank_start); in gbe_set_timing_info()
579 SET_GBE_FIELD(VT_HCMAP, HCMAP_OFF, val, timing->hblank_end); in gbe_set_timing_info()
583 temp = timing->vblank_start - timing->vblank_end - 1; in gbe_set_timing_info()
588 gbefb_setup_flatpanel(timing); in gbe_set_timing_info()
591 if (timing->hblank_end >= 20) in gbe_set_timing_info()
593 timing->hblank_end - 20); in gbe_set_timing_info()
596 timing->htotal - (20 - timing->hblank_end)); in gbe_set_timing_info()
601 if (timing->hblank_end >= GBE_CRS_MAGIC) in gbe_set_timing_info()
603 timing->hblank_end - GBE_CRS_MAGIC); in gbe_set_timing_info()
606 timing->htotal - (GBE_CRS_MAGIC - in gbe_set_timing_info()
607 timing->hblank_end)); in gbe_set_timing_info()
612 SET_GBE_FIELD(VC_START_XY, VC_STARTX, val, timing->hblank_end - 4); in gbe_set_timing_info()
616 temp = timing->hblank_end - GBE_PIXEN_MAGIC_ON; in gbe_set_timing_info()
618 temp += timing->htotal; /* allow blank to wrap around */ in gbe_set_timing_info()
622 ((temp + timing->width - in gbe_set_timing_info()
623 GBE_PIXEN_MAGIC_OFF) % timing->htotal)); in gbe_set_timing_info()
627 SET_GBE_FIELD(VT_VPIXEN, VPIXEN_ON, val, timing->vblank_end); in gbe_set_timing_info()
628 SET_GBE_FIELD(VT_VPIXEN, VPIXEN_OFF, val, timing->vblank_start); in gbe_set_timing_info()
651 compute_gbe_timing(&info->var, &par->timing); in gbefb_set_par()
655 xpmax = par->timing.width; in gbefb_set_par()
656 ypmax = par->timing.height; in gbefb_set_par()
661 /* set timing info */ in gbefb_set_par()
662 gbe_set_timing_info(&par->timing); in gbefb_set_par()
904 struct gbe_timing_info timing; in gbefb_check_var() local
924 ret = compute_gbe_timing(var, &timing); in gbefb_check_var()
986 var->left_margin = timing.htotal - timing.hsync_end; in gbefb_check_var()
987 var->right_margin = timing.hsync_start - timing.width; in gbefb_check_var()
988 var->upper_margin = timing.vtotal - timing.vsync_end; in gbefb_check_var()
989 var->lower_margin = timing.vsync_start - timing.height; in gbefb_check_var()
990 var->hsync_len = timing.hsync_end - timing.hsync_start; in gbefb_check_var()
991 var->vsync_len = timing.vsync_end - timing.vsync_start; in gbefb_check_var()