Lines Matching defs:var

626 	if (info->var.bits_per_pixel == 8) {
648 if (info->var.bits_per_pixel == 8) {
989 /* See if we can handle the video mode described in var */
990 static int tridentfb_check_var(struct fb_var_screeninfo *var,
994 int bpp = var->bits_per_pixel;
999 if (!var->pixclock)
1004 bpp = var->bits_per_pixel = 32;
1010 if (par->flatpanel && nativex && var->xres > nativex)
1013 var->xres = (var->xres + 7) & ~0x7;
1014 if (var->xres > var->xres_virtual)
1015 var->xres_virtual = var->xres;
1016 if (var->yres > var->yres_virtual)
1017 var->yres_virtual = var->yres;
1018 if (var->xres_virtual > 4095 || var->yres > 2048)
1021 if (var->yres_virtual > 0xffff)
1023 line_length = var->xres_virtual * bpp / 8;
1029 var->xres_virtual = 512 * 8 / bpp;
1031 var->xres_virtual = 1024 * 8 / bpp;
1033 var->xres_virtual = 2048 * 8 / bpp;
1035 var->xres_virtual = 4096 * 8 / bpp;
1037 var->xres_virtual = 8192 * 8 / bpp;
1041 line_length = var->xres_virtual * bpp / 8;
1045 if (line_length * (var->yres_virtual - var->yres) > (4 << 20))
1046 var->yres_virtual = ((4 << 20) / line_length) + var->yres;
1048 if (line_length * var->yres_virtual > info->fix.smem_len)
1053 var->red.offset = 0;
1054 var->red.length = 8;
1055 var->green = var->red;
1056 var->blue = var->red;
1059 var->red.offset = 11;
1060 var->green.offset = 5;
1061 var->blue.offset = 0;
1062 var->red.length = 5;
1063 var->green.length = 6;
1064 var->blue.length = 5;
1067 var->red.offset = 16;
1068 var->green.offset = 8;
1069 var->blue.offset = 0;
1070 var->red.length = 8;
1071 var->green.length = 8;
1072 var->blue.length = 8;
1101 if (PICOS2KHZ(var->pixclock) > ramdac)
1111 static int tridentfb_pan_display(struct fb_var_screeninfo *var,
1118 offset = (var->xoffset + (var->yoffset * info->var.xres_virtual))
1119 * info->var.bits_per_pixel / 32;
1136 struct fb_var_screeninfo *var = &info->var;
1137 int bpp = var->bits_per_pixel;
1142 hdispend = var->xres / 8 - 1;
1143 hsyncstart = (var->xres + var->right_margin) / 8;
1144 hsyncend = (var->xres + var->right_margin + var->hsync_len) / 8;
1145 htotal = (var->xres + var->left_margin + var->right_margin +
1146 var->hsync_len) / 8 - 5;
1150 vdispend = var->yres - 1;
1151 vsyncstart = var->yres + var->lower_margin;
1152 vsyncend = vsyncstart + var->vsync_len;
1153 vtotal = var->upper_margin + vsyncend - 2;
1157 if (info->var.vmode & FB_VMODE_INTERLACED) {
1170 if (var->sync & FB_SYNC_HOR_HIGH_ACT)
1172 if (var->sync & FB_SYNC_VERT_HIGH_ACT)
1175 if (par->flatpanel && var->xres < nativex) {
1240 //FIXME if (info->var.vmode & FB_VMODE_DOUBLE) tmp |= 0x80; /* double scan for 200 line modes */
1249 tmp = (info->var.vmode & FB_VMODE_INTERLACED) ? 0x84 : 0x80;
1253 if (info->var.vmode & FB_VMODE_INTERLACED)
1299 vclk = PICOS2KHZ(info->var.pixclock);
1346 set_number_of_lines(par, info->var.yres);
1347 info->fix.line_length = info->var.xres_virtual * bpp / 8;
1351 par->init_accel(par, info->var.xres_virtual, bpp);
1364 int bpp = info->var.bits_per_pixel;
1626 info->var.bits_per_pixel = 8;
1657 fb_videomode_to_var(&info->var, m);
1658 /* fill all other info->var's fields */
1659 if (tridentfb_check_var(&info->var,
1672 err = fb_find_mode(&info->var, info, mode_option,
1675 NULL, info->var.bits_per_pixel);
1693 info->var.activate |= FB_ACTIVATE_NOW;
1702 info->node, info->fix.id, info->var.xres,
1703 info->var.yres, info->var.bits_per_pixel);