Lines Matching refs:var
114 struct fb_var_screeninfo *var = &info->var; in acornfb_set_timing() local
122 vidc.h_sync_width = var->hsync_len - 8; in acornfb_set_timing()
123 vidc.h_border_start = vidc.h_sync_width + var->left_margin + 8 - 12; in acornfb_set_timing()
125 vidc.h_display_end = vidc.h_display_start + var->xres; in acornfb_set_timing()
127 vidc.h_cycle = vidc.h_border_end + var->right_margin + 12 - 8; in acornfb_set_timing()
129 vidc.v_sync_width = var->vsync_len - 1; in acornfb_set_timing()
130 vidc.v_border_start = vidc.v_sync_width + var->upper_margin; in acornfb_set_timing()
132 vidc.v_display_end = vidc.v_display_start + var->yres; in acornfb_set_timing()
136 vcr = var->vsync_len + var->upper_margin + var->yres + in acornfb_set_timing()
137 var->lower_margin; in acornfb_set_timing()
139 if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) { in acornfb_set_timing()
145 switch (var->bits_per_pixel) { in acornfb_set_timing()
155 acornfb_vidc20_find_rates(&vidc, var); in acornfb_set_timing()
156 fsize = var->vsync_len + var->upper_margin + var->lower_margin - 1; in acornfb_set_timing()
185 if (var->sync & FB_SYNC_COMP_HIGH_ACT) /* should be FB_SYNC_COMP */ in acornfb_set_timing()
188 if (var->sync & FB_SYNC_HOR_HIGH_ACT) in acornfb_set_timing()
193 if (var->sync & FB_SYNC_VERT_HIGH_ACT) in acornfb_set_timing()
201 words_per_line = var->xres * var->bits_per_pixel / 32; in acornfb_set_timing()
223 printk(KERN_DEBUG "VIDC registers for %dx%dx%d:\n", var->xres, in acornfb_set_timing()
224 var->yres, var->bits_per_pixel); in acornfb_set_timing()
276 pseudo_val = regno << info->var.red.offset; in acornfb_setcolreg()
277 pseudo_val |= regno << info->var.green.offset; in acornfb_setcolreg()
278 pseudo_val |= regno << info->var.blue.offset; in acornfb_setcolreg()
290 if (info->var.bits_per_pixel == 16) { in acornfb_setcolreg()
316 acornfb_adjust_timing(struct fb_info *info, struct fb_var_screeninfo *var, u_int fontht) in acornfb_adjust_timing() argument
321 var->xres = (var->xres + 1) & ~1; in acornfb_adjust_timing()
326 var->xres_virtual = var->xres; in acornfb_adjust_timing()
327 var->xoffset = 0; in acornfb_adjust_timing()
341 font_line_len = var->xres * var->bits_per_pixel * fontht / 8; in acornfb_adjust_timing()
342 min_size = var->xres * var->yres * var->bits_per_pixel / 8; in acornfb_adjust_timing()
362 if (var->accel_flags & FB_ACCELF_TEXT) { in acornfb_adjust_timing()
368 var->yres_virtual = size / (font_line_len / fontht); in acornfb_adjust_timing()
370 var->yres_virtual = nr_y; in acornfb_adjust_timing()
371 } else if (var->yres_virtual > nr_y) in acornfb_adjust_timing()
372 var->yres_virtual = nr_y; in acornfb_adjust_timing()
379 if (var->yres > var->yres_virtual) in acornfb_adjust_timing()
380 var->yres = var->yres_virtual; in acornfb_adjust_timing()
382 if (var->vmode & FB_VMODE_YWRAP) { in acornfb_adjust_timing()
383 if (var->yoffset > var->yres_virtual) in acornfb_adjust_timing()
384 var->yoffset = var->yres_virtual; in acornfb_adjust_timing()
386 if (var->yoffset + var->yres > var->yres_virtual) in acornfb_adjust_timing()
387 var->yoffset = var->yres_virtual - var->yres; in acornfb_adjust_timing()
391 var->hsync_len = (var->hsync_len + 1) & ~1; in acornfb_adjust_timing()
395 if (var->left_margin & 1) { in acornfb_adjust_timing()
396 var->left_margin += 1; in acornfb_adjust_timing()
397 var->right_margin -= 1; in acornfb_adjust_timing()
401 if (var->right_margin & 1) in acornfb_adjust_timing()
402 var->right_margin += 1; in acornfb_adjust_timing()
405 if (var->vsync_len < 1) in acornfb_adjust_timing()
406 var->vsync_len = 1; in acornfb_adjust_timing()
412 acornfb_validate_timing(struct fb_var_screeninfo *var, in acornfb_validate_timing() argument
424 hs = 1953125000 / var->pixclock; in acornfb_validate_timing()
426 (var->xres + var->left_margin + var->right_margin + var->hsync_len); in acornfb_validate_timing()
428 (var->yres + var->upper_margin + var->lower_margin + var->vsync_len); in acornfb_validate_timing()
435 acornfb_update_dma(struct fb_info *info, struct fb_var_screeninfo *var) in acornfb_update_dma() argument
437 u_int off = var->yoffset * info->fix.line_length; in acornfb_update_dma()
447 acornfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) in acornfb_check_var() argument
457 var->red.msb_right = 0; in acornfb_check_var()
458 var->green.msb_right = 0; in acornfb_check_var()
459 var->blue.msb_right = 0; in acornfb_check_var()
460 var->transp.msb_right = 0; in acornfb_check_var()
462 switch (var->bits_per_pixel) { in acornfb_check_var()
464 var->red.offset = 0; in acornfb_check_var()
465 var->red.length = var->bits_per_pixel; in acornfb_check_var()
466 var->green = var->red; in acornfb_check_var()
467 var->blue = var->red; in acornfb_check_var()
468 var->transp.offset = 0; in acornfb_check_var()
469 var->transp.length = 0; in acornfb_check_var()
474 var->red.offset = 0; in acornfb_check_var()
475 var->red.length = 5; in acornfb_check_var()
476 var->green.offset = 5; in acornfb_check_var()
477 var->green.length = 5; in acornfb_check_var()
478 var->blue.offset = 10; in acornfb_check_var()
479 var->blue.length = 5; in acornfb_check_var()
480 var->transp.offset = 15; in acornfb_check_var()
481 var->transp.length = 1; in acornfb_check_var()
485 var->red.offset = 0; in acornfb_check_var()
486 var->red.length = 8; in acornfb_check_var()
487 var->green.offset = 8; in acornfb_check_var()
488 var->green.length = 8; in acornfb_check_var()
489 var->blue.offset = 16; in acornfb_check_var()
490 var->blue.length = 8; in acornfb_check_var()
491 var->transp.offset = 24; in acornfb_check_var()
492 var->transp.length = 4; in acornfb_check_var()
502 if (!acornfb_valid_pixrate(var)) in acornfb_check_var()
509 err = acornfb_adjust_timing(info, var, fontht); in acornfb_check_var()
517 return acornfb_validate_timing(var, &info->monspecs); in acornfb_check_var()
522 switch (info->var.bits_per_pixel) { in acornfb_set_par()
553 info->fix.line_length = (info->var.xres * info->var.bits_per_pixel) / 8; in acornfb_set_par()
584 acornfb_update_dma(info, &info->var); in acornfb_set_par()
591 acornfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) in acornfb_pan_display() argument
593 u_int y_bottom = var->yoffset; in acornfb_pan_display()
595 if (!(var->vmode & FB_VMODE_YWRAP)) in acornfb_pan_display()
596 y_bottom += info->var.yres; in acornfb_pan_display()
598 if (y_bottom > info->var.yres_virtual) in acornfb_pan_display()
601 acornfb_update_dma(info, var); in acornfb_pan_display()
710 memset(&fb_info.var, 0, sizeof(fb_info.var)); in acornfb_init_fbinfo()
713 fb_info.var.red.length = 8; in acornfb_init_fbinfo()
714 fb_info.var.transp.length = 4; in acornfb_init_fbinfo()
716 fb_info.var.green = fb_info.var.red; in acornfb_init_fbinfo()
717 fb_info.var.blue = fb_info.var.red; in acornfb_init_fbinfo()
718 fb_info.var.nonstd = 0; in acornfb_init_fbinfo()
719 fb_info.var.activate = FB_ACTIVATE_NOW; in acornfb_init_fbinfo()
720 fb_info.var.height = -1; in acornfb_init_fbinfo()
721 fb_info.var.width = -1; in acornfb_init_fbinfo()
722 fb_info.var.vmode = FB_VMODE_NONINTERLACED; in acornfb_init_fbinfo()
723 fb_info.var.accel_flags = FB_ACCELF_TEXT; in acornfb_init_fbinfo()
788 fb_info.var.width = simple_strtoul(p + 1, &p, 0); in acornfb_parse_mon()
793 fb_info.var.height = simple_strtoul(p + 1, NULL, 0); in acornfb_parse_mon()
1024 rc = fb_find_mode(&fb_info.var, &fb_info, NULL, modedb, in acornfb_probe()
1033 rc = fb_find_mode(&fb_info.var, &fb_info, NULL, NULL, 0, in acornfb_probe()
1041 rc = fb_find_mode(&fb_info.var, &fb_info, NULL, modedb, in acornfb_probe()
1047 rc = fb_find_mode(&fb_info.var, &fb_info, NULL, NULL, 0, in acornfb_probe()
1060 h_sync = 1953125000 / fb_info.var.pixclock; in acornfb_probe()
1061 h_sync = h_sync * 512 / (fb_info.var.xres + fb_info.var.left_margin + in acornfb_probe()
1062 fb_info.var.right_margin + fb_info.var.hsync_len); in acornfb_probe()
1063 v_sync = h_sync / (fb_info.var.yres + fb_info.var.upper_margin + in acornfb_probe()
1064 fb_info.var.lower_margin + fb_info.var.vsync_len); in acornfb_probe()
1069 VIDC_NAME, fb_info.var.xres, fb_info.var.yres, in acornfb_probe()
1078 if (fb_set_var(&fb_info, &fb_info.var)) in acornfb_probe()