Lines Matching refs:var

392 static int i740fb_decode_var(const struct fb_var_screeninfo *var,
396 * Get the video params out of 'var'.
408 var->xres, var->yres, var->xres_virtual, var->xres_virtual);
410 var->xoffset, var->yoffset, var->bits_per_pixel,
411 var->grayscale);
413 var->activate, var->nonstd, var->vmode);
415 var->pixclock, var->hsync_len, var->vsync_len);
417 var->left_margin, var->right_margin, var->upper_margin,
418 var->lower_margin);
421 bpp = var->bits_per_pixel;
425 if ((1000000 / var->pixclock) > DACSPEED8) {
427 1000000 / var->pixclock, DACSPEED8);
435 if ((1000000 / var->pixclock) > DACSPEED16) {
437 1000000 / var->pixclock, DACSPEED16);
444 if ((1000000 / var->pixclock) > dacspeed24) {
446 1000000 / var->pixclock, dacspeed24);
452 if ((1000000 / var->pixclock) > DACSPEED32) {
454 1000000 / var->pixclock, DACSPEED32);
462 xres = ALIGN(var->xres, 8);
463 vxres = ALIGN(var->xres_virtual, 16);
467 xoffset = ALIGN(var->xoffset, 8);
471 left = ALIGN(var->left_margin, 8);
472 right = ALIGN(var->right_margin, 8);
473 hslen = ALIGN(var->hsync_len, 8);
475 yres = var->yres;
476 vyres = var->yres_virtual;
480 yoffset = var->yoffset;
484 lower = var->lower_margin;
485 vslen = var->vsync_len;
486 upper = var->upper_margin;
520 if (var->vmode & FB_VMODE_DOUBLE)
562 if (var->sync & FB_SYNC_HOR_HIGH_ACT)
564 if (var->sync & FB_SYNC_VERT_HIGH_ACT)
592 par->pixelpipe_cfg1 = (var->green.length == 6) ?
646 freq = (((u32)1e9) / var->pixclock) * (u32)(1e3);
658 i740_calc_fifo(par, 1000000 / var->pixclock, bpp);
663 static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
665 if (!var->pixclock)
668 switch (var->bits_per_pixel) {
670 var->red.offset = var->green.offset = var->blue.offset = 0;
671 var->red.length = var->green.length = var->blue.length = 8;
674 switch (var->green.length) {
677 var->red.offset = 10;
678 var->green.offset = 5;
679 var->blue.offset = 0;
680 var->red.length = 5;
681 var->green.length = 5;
682 var->blue.length = 5;
685 var->red.offset = 11;
686 var->green.offset = 5;
687 var->blue.offset = 0;
688 var->red.length = var->blue.length = 5;
693 var->red.offset = 16;
694 var->green.offset = 8;
695 var->blue.offset = 0;
696 var->red.length = var->green.length = var->blue.length = 8;
699 var->transp.offset = 24;
700 var->red.offset = 16;
701 var->green.offset = 8;
702 var->blue.offset = 0;
703 var->transp.length = 8;
704 var->red.length = var->green.length = var->blue.length = 8;
710 if (var->xres > var->xres_virtual)
711 var->xres_virtual = var->xres;
713 if (var->yres > var->yres_virtual)
714 var->yres_virtual = var->yres;
717 info->monspecs.dclkmax && fb_validate_mode(var, info) < 0)
747 i = i740fb_decode_var(&info->var, par, info);
859 info->var.xres_virtual * info->var.bits_per_pixel / 8;
860 if (info->var.bits_per_pixel == 8)
875 regno, red, green, blue, transp, info->var.bits_per_pixel);
889 r = (red >> (16 - info->var.red.length))
890 << info->var.red.offset;
891 b = (blue >> (16 - info->var.blue.length))
892 << info->var.blue.offset;
893 g = (green >> (16 - info->var.green.length))
894 << info->var.green.offset;
904 static int i740fb_pan_display(struct fb_var_screeninfo *var,
908 u32 base = (var->yoffset * info->var.xres_virtual
909 + (var->xoffset & ~7)) >> 2;
912 var->xoffset, var->yoffset, base);
914 switch (info->var.bits_per_pixel) {
1025 info->var.activate = FB_ACTIVATE_NOW;
1026 info->var.bits_per_pixel = 8;
1098 fb_videomode_to_var(&info->var, m);
1099 /* fill all other info->var's fields */
1100 if (!i740fb_check_var(&info->var, info))
1111 ret = fb_find_mode(&info->var, info, mode_option,
1114 NULL, info->var.bits_per_pixel);
1126 info->var.yres_virtual = info->fix.smem_len * 8 /
1127 (info->var.bits_per_pixel * info->var.xres_virtual);