• Home
  • Raw
  • Download

Lines Matching refs:var

143 acornfb_valid_pixrate(struct fb_var_screeninfo *var)  in acornfb_valid_pixrate()  argument
145 u_long pixclock = var->pixclock; in acornfb_valid_pixrate()
148 if (!var->pixclock) in acornfb_valid_pixrate()
172 acornfb_set_timing(struct fb_var_screeninfo *var) in acornfb_set_timing() argument
184 pclk = acornfb_valid_pixrate(var); in acornfb_set_timing()
188 bandwidth = var->pixclock * 8 / var->bits_per_pixel; in acornfb_set_timing()
199 switch (var->bits_per_pixel) { in acornfb_set_timing()
222 if (var->sync & FB_SYNC_COMP_HIGH_ACT) /* should be FB_SYNC_COMP */ in acornfb_set_timing()
225 if (!(var->sync & FB_SYNC_HOR_HIGH_ACT)) in acornfb_set_timing()
228 if (!(var->sync & FB_SYNC_VERT_HIGH_ACT)) in acornfb_set_timing()
232 sync_len = var->hsync_len; in acornfb_set_timing()
233 display_start = sync_len + var->left_margin; in acornfb_set_timing()
234 display_end = display_start + var->xres; in acornfb_set_timing()
235 cycle = display_end + var->right_margin; in acornfb_set_timing()
238 is_interlaced = (var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED; in acornfb_set_timing()
244 var->right_margin += 2; in acornfb_set_timing()
256 sync_len = var->vsync_len; in acornfb_set_timing()
257 display_start = sync_len + var->upper_margin; in acornfb_set_timing()
258 display_end = display_start + var->yres; in acornfb_set_timing()
259 cycle = display_end + var->lower_margin; in acornfb_set_timing()
298 printk(KERN_DEBUG "VIDC registers for %dx%dx%d:\n", var->xres, in acornfb_set_timing()
299 var->yres, var->bits_per_pixel); in acornfb_set_timing()
358 struct fb_var_screeninfo *var = &info->var; in acornfb_set_timing() local
366 vidc.h_sync_width = var->hsync_len - 8; in acornfb_set_timing()
367 vidc.h_border_start = vidc.h_sync_width + var->left_margin + 8 - 12; in acornfb_set_timing()
369 vidc.h_display_end = vidc.h_display_start + var->xres; in acornfb_set_timing()
371 vidc.h_cycle = vidc.h_border_end + var->right_margin + 12 - 8; in acornfb_set_timing()
373 vidc.v_sync_width = var->vsync_len - 1; in acornfb_set_timing()
374 vidc.v_border_start = vidc.v_sync_width + var->upper_margin; in acornfb_set_timing()
376 vidc.v_display_end = vidc.v_display_start + var->yres; in acornfb_set_timing()
380 vcr = var->vsync_len + var->upper_margin + var->yres + in acornfb_set_timing()
381 var->lower_margin; in acornfb_set_timing()
383 if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) { in acornfb_set_timing()
389 switch (var->bits_per_pixel) { in acornfb_set_timing()
399 acornfb_vidc20_find_rates(&vidc, var); in acornfb_set_timing()
400 fsize = var->vsync_len + var->upper_margin + var->lower_margin - 1; in acornfb_set_timing()
429 if (var->sync & FB_SYNC_COMP_HIGH_ACT) /* should be FB_SYNC_COMP */ in acornfb_set_timing()
432 if (var->sync & FB_SYNC_HOR_HIGH_ACT) in acornfb_set_timing()
437 if (var->sync & FB_SYNC_VERT_HIGH_ACT) in acornfb_set_timing()
445 words_per_line = var->xres * var->bits_per_pixel / 32; in acornfb_set_timing()
467 printk(KERN_DEBUG "VIDC registers for %dx%dx%d:\n", var->xres, in acornfb_set_timing()
468 var->yres, var->bits_per_pixel); in acornfb_set_timing()
520 pseudo_val = regno << info->var.red.offset; in acornfb_setcolreg()
521 pseudo_val |= regno << info->var.green.offset; in acornfb_setcolreg()
522 pseudo_val |= regno << info->var.blue.offset; in acornfb_setcolreg()
534 if (info->var.bits_per_pixel == 16) { in acornfb_setcolreg()
560 acornfb_adjust_timing(struct fb_info *info, struct fb_var_screeninfo *var, u_int fontht) in acornfb_adjust_timing() argument
565 var->xres = (var->xres + 1) & ~1; in acornfb_adjust_timing()
570 var->xres_virtual = var->xres; in acornfb_adjust_timing()
571 var->xoffset = 0; in acornfb_adjust_timing()
585 font_line_len = var->xres * var->bits_per_pixel * fontht / 8; in acornfb_adjust_timing()
586 min_size = var->xres * var->yres * var->bits_per_pixel / 8; in acornfb_adjust_timing()
606 if (var->accel_flags & FB_ACCELF_TEXT) { in acornfb_adjust_timing()
612 var->yres_virtual = size / (font_line_len / fontht); in acornfb_adjust_timing()
614 var->yres_virtual = nr_y; in acornfb_adjust_timing()
615 } else if (var->yres_virtual > nr_y) in acornfb_adjust_timing()
616 var->yres_virtual = nr_y; in acornfb_adjust_timing()
623 if (var->yres > var->yres_virtual) in acornfb_adjust_timing()
624 var->yres = var->yres_virtual; in acornfb_adjust_timing()
626 if (var->vmode & FB_VMODE_YWRAP) { in acornfb_adjust_timing()
627 if (var->yoffset > var->yres_virtual) in acornfb_adjust_timing()
628 var->yoffset = var->yres_virtual; in acornfb_adjust_timing()
630 if (var->yoffset + var->yres > var->yres_virtual) in acornfb_adjust_timing()
631 var->yoffset = var->yres_virtual - var->yres; in acornfb_adjust_timing()
635 var->hsync_len = (var->hsync_len + 1) & ~1; in acornfb_adjust_timing()
639 if ((var->left_margin & 1) == 0) { in acornfb_adjust_timing()
640 var->left_margin -= 1; in acornfb_adjust_timing()
641 var->right_margin += 1; in acornfb_adjust_timing()
645 var->right_margin |= 1; in acornfb_adjust_timing()
648 if (var->left_margin & 1) { in acornfb_adjust_timing()
649 var->left_margin += 1; in acornfb_adjust_timing()
650 var->right_margin -= 1; in acornfb_adjust_timing()
654 if (var->right_margin & 1) in acornfb_adjust_timing()
655 var->right_margin += 1; in acornfb_adjust_timing()
658 if (var->vsync_len < 1) in acornfb_adjust_timing()
659 var->vsync_len = 1; in acornfb_adjust_timing()
665 acornfb_validate_timing(struct fb_var_screeninfo *var, in acornfb_validate_timing() argument
677 hs = 1953125000 / var->pixclock; in acornfb_validate_timing()
679 (var->xres + var->left_margin + var->right_margin + var->hsync_len); in acornfb_validate_timing()
681 (var->yres + var->upper_margin + var->lower_margin + var->vsync_len); in acornfb_validate_timing()
688 acornfb_update_dma(struct fb_info *info, struct fb_var_screeninfo *var) in acornfb_update_dma() argument
690 u_int off = var->yoffset * info->fix.line_length; in acornfb_update_dma()
700 acornfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) in acornfb_check_var() argument
710 var->red.msb_right = 0; in acornfb_check_var()
711 var->green.msb_right = 0; in acornfb_check_var()
712 var->blue.msb_right = 0; in acornfb_check_var()
713 var->transp.msb_right = 0; in acornfb_check_var()
715 switch (var->bits_per_pixel) { in acornfb_check_var()
717 var->red.offset = 0; in acornfb_check_var()
718 var->red.length = var->bits_per_pixel; in acornfb_check_var()
719 var->green = var->red; in acornfb_check_var()
720 var->blue = var->red; in acornfb_check_var()
721 var->transp.offset = 0; in acornfb_check_var()
722 var->transp.length = 0; in acornfb_check_var()
727 var->red.offset = 0; in acornfb_check_var()
728 var->red.length = 5; in acornfb_check_var()
729 var->green.offset = 5; in acornfb_check_var()
730 var->green.length = 5; in acornfb_check_var()
731 var->blue.offset = 10; in acornfb_check_var()
732 var->blue.length = 5; in acornfb_check_var()
733 var->transp.offset = 15; in acornfb_check_var()
734 var->transp.length = 1; in acornfb_check_var()
738 var->red.offset = 0; in acornfb_check_var()
739 var->red.length = 8; in acornfb_check_var()
740 var->green.offset = 8; in acornfb_check_var()
741 var->green.length = 8; in acornfb_check_var()
742 var->blue.offset = 16; in acornfb_check_var()
743 var->blue.length = 8; in acornfb_check_var()
744 var->transp.offset = 24; in acornfb_check_var()
745 var->transp.length = 4; in acornfb_check_var()
755 if (!acornfb_valid_pixrate(var)) in acornfb_check_var()
762 err = acornfb_adjust_timing(info, var, fontht); in acornfb_check_var()
770 return acornfb_validate_timing(var, &info->monspecs); in acornfb_check_var()
775 switch (info->var.bits_per_pixel) { in acornfb_set_par()
810 info->fix.line_length = (info->var.xres * info->var.bits_per_pixel) / 8; in acornfb_set_par()
841 acornfb_update_dma(info, &info->var); in acornfb_set_par()
848 acornfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) in acornfb_pan_display() argument
850 u_int y_bottom = var->yoffset; in acornfb_pan_display()
852 if (!(var->vmode & FB_VMODE_YWRAP)) in acornfb_pan_display()
853 y_bottom += info->var.yres; in acornfb_pan_display()
855 if (y_bottom > info->var.yres_virtual) in acornfb_pan_display()
858 acornfb_update_dma(info, var); in acornfb_pan_display()
969 memset(&fb_info.var, 0, sizeof(fb_info.var)); in acornfb_init_fbinfo()
972 fb_info.var.red.length = 8; in acornfb_init_fbinfo()
973 fb_info.var.transp.length = 4; in acornfb_init_fbinfo()
975 fb_info.var.red.length = 4; in acornfb_init_fbinfo()
976 fb_info.var.transp.length = 1; in acornfb_init_fbinfo()
978 fb_info.var.green = fb_info.var.red; in acornfb_init_fbinfo()
979 fb_info.var.blue = fb_info.var.red; in acornfb_init_fbinfo()
980 fb_info.var.nonstd = 0; in acornfb_init_fbinfo()
981 fb_info.var.activate = FB_ACTIVATE_NOW; in acornfb_init_fbinfo()
982 fb_info.var.height = -1; in acornfb_init_fbinfo()
983 fb_info.var.width = -1; in acornfb_init_fbinfo()
984 fb_info.var.vmode = FB_VMODE_NONINTERLACED; in acornfb_init_fbinfo()
985 fb_info.var.accel_flags = FB_ACCELF_TEXT; in acornfb_init_fbinfo()
1050 fb_info.var.width = simple_strtoul(p + 1, &p, 0); in acornfb_parse_mon()
1055 fb_info.var.height = simple_strtoul(p + 1, NULL, 0); in acornfb_parse_mon()
1330 rc = fb_find_mode(&fb_info.var, &fb_info, NULL, modedb, in acornfb_probe()
1339 rc = fb_find_mode(&fb_info.var, &fb_info, NULL, NULL, 0, in acornfb_probe()
1347 rc = fb_find_mode(&fb_info.var, &fb_info, NULL, modedb, in acornfb_probe()
1353 rc = fb_find_mode(&fb_info.var, &fb_info, NULL, NULL, 0, in acornfb_probe()
1366 h_sync = 1953125000 / fb_info.var.pixclock; in acornfb_probe()
1367 h_sync = h_sync * 512 / (fb_info.var.xres + fb_info.var.left_margin + in acornfb_probe()
1368 fb_info.var.right_margin + fb_info.var.hsync_len); in acornfb_probe()
1369 v_sync = h_sync / (fb_info.var.yres + fb_info.var.upper_margin + in acornfb_probe()
1370 fb_info.var.lower_margin + fb_info.var.vsync_len); in acornfb_probe()
1376 VIDC_NAME, fb_info.var.xres, fb_info.var.yres, in acornfb_probe()
1385 if (fb_set_var(&fb_info, &fb_info.var)) in acornfb_probe()