Lines Matching refs:var
232 struct fb_var_screeninfo *var) in neo2200_accel_init() argument
239 switch (var->bits_per_pixel) in neo2200_accel_init()
243 pitch = var->xres_virtual; in neo2200_accel_init()
248 pitch = var->xres_virtual * 2; in neo2200_accel_init()
262 struct fb_var_screeninfo *var = &p->fb_info->var; in neo2200_accel_setup() local
266 neo2200_accel_init (fb, var); in neo2200_accel_setup()
274 struct fb_var_screeninfo *var = &p->fb_info->var; in neo2200_accel_bmove() local
287 bpp = (var->bits_per_pixel+7) / 8; in neo2200_accel_bmove()
288 pitch = var->xres_virtual * bpp; in neo2200_accel_bmove()
335 struct fb_var_screeninfo *var = &p->fb_info->var; in neo2200_accel_clear() local
344 dst = sx * fw + sy * var->xres_virtual * fh; in neo2200_accel_clear()
355 switch (var->bits_per_pixel) in neo2200_accel_clear()
365 neo2200->dstStart = dst * ((var->bits_per_pixel+7) / 8); in neo2200_accel_clear()
437 switch (fb->var.bits_per_pixel) in neo_setcolreg()
802 static void neofb_update_start (struct neofb_info *info, struct fb_var_screeninfo *var) in neofb_update_start() argument
809 Base = (var->yoffset * var->xres_virtual + var->xoffset) >> 2; in neofb_update_start()
810 Base *= (var->bits_per_pixel + 7) / 8; in neofb_update_start()
847 if (fb->var.bits_per_pixel == 8) in neofb_set_cmap()
937 static int vgaHWInit (const struct fb_var_screeninfo *var, in vgaHWInit() argument
993 par->CRTC[19] = var->xres_virtual >> 4; in vgaHWInit()
1045 static int neofb_decode_var (struct fb_var_screeninfo *var, in neofb_decode_var() argument
1054 unsigned int pixclock = var->pixclock; in neofb_decode_var()
1061 timings.dblscan = var->vmode & FB_VMODE_DOUBLE; in neofb_decode_var()
1062 timings.interlaced = var->vmode & FB_VMODE_INTERLACED; in neofb_decode_var()
1063 timings.HDisplay = var->xres; in neofb_decode_var()
1064 timings.HSyncStart = timings.HDisplay + var->right_margin; in neofb_decode_var()
1065 timings.HSyncEnd = timings.HSyncStart + var->hsync_len; in neofb_decode_var()
1066 timings.HTotal = timings.HSyncEnd + var->left_margin; in neofb_decode_var()
1067 timings.VDisplay = var->yres; in neofb_decode_var()
1068 timings.VSyncStart = timings.VDisplay + var->lower_margin; in neofb_decode_var()
1069 timings.VSyncEnd = timings.VSyncStart + var->vsync_len; in neofb_decode_var()
1070 timings.VTotal = timings.VSyncEnd + var->upper_margin; in neofb_decode_var()
1071 timings.sync = var->sync; in neofb_decode_var()
1077 if ((var->xres > info->NeoPanelWidth) || in neofb_decode_var()
1078 (var->yres > info->NeoPanelHeight)) in neofb_decode_var()
1081 var->xres, in neofb_decode_var()
1082 var->yres, in neofb_decode_var()
1089 switch (var->xres) in neofb_decode_var()
1092 if (var->yres == 1024) in neofb_decode_var()
1096 if (var->yres == 768) in neofb_decode_var()
1100 if (var->yres == 600) in neofb_decode_var()
1104 if (var->yres == 480) in neofb_decode_var()
1112 var->xres, var->yres); in neofb_decode_var()
1117 switch (var->bits_per_pixel) in neofb_decode_var()
1145 par->depth = var->bits_per_pixel; in neofb_decode_var()
1151 if (var->yres_virtual < var->yres) in neofb_decode_var()
1152 var->yres_virtual = var->yres; in neofb_decode_var()
1153 if (var->xres_virtual < var->xres) in neofb_decode_var()
1154 var->xres_virtual = var->xres; in neofb_decode_var()
1156 memlen = var->xres_virtual * var->bits_per_pixel * var->yres_virtual / 8; in neofb_decode_var()
1159 var->yres_virtual = vramlen * 8 / (var->xres_virtual * var->bits_per_pixel); in neofb_decode_var()
1160 memlen = var->xres_virtual * var->bits_per_pixel * var->yres_virtual / 8; in neofb_decode_var()
1165 if (var->yres_virtual < var->yres) in neofb_decode_var()
1166 var->yres = var->yres_virtual; in neofb_decode_var()
1167 if (var->xres_virtual < var->xres) in neofb_decode_var()
1168 var->xres = var->xres_virtual; in neofb_decode_var()
1169 if (var->xoffset + var->xres > var->xres_virtual) in neofb_decode_var()
1170 var->xoffset = var->xres_virtual - var->xres; in neofb_decode_var()
1171 if (var->yoffset + var->yres > var->yres_virtual) in neofb_decode_var()
1172 var->yoffset = var->yres_virtual - var->yres; in neofb_decode_var()
1180 if (vgaHWInit (var, info, par, &timings)) in neofb_decode_var()
1189 switch (var->bits_per_pixel) in neofb_decode_var()
1192 par->CRTC[0x13] = var->xres_virtual >> 3; in neofb_decode_var()
1193 par->ExtCRTOffset = var->xres_virtual >> 11; in neofb_decode_var()
1197 par->CRTC[0x13] = var->xres_virtual >> 2; in neofb_decode_var()
1198 par->ExtCRTOffset = var->xres_virtual >> 10; in neofb_decode_var()
1202 par->CRTC[0x13] = (var->xres_virtual * 3) >> 3; in neofb_decode_var()
1203 par->ExtCRTOffset = (var->xres_virtual * 3) >> 11; in neofb_decode_var()
1208 par->CRTC[0x13] = var->xres_virtual >> 1; in neofb_decode_var()
1209 par->ExtCRTOffset = var->xres_virtual >> 9; in neofb_decode_var()
1247 switch (var->xres) in neofb_decode_var()
1290 (var->xres != info->NeoPanelWidth)) in neofb_decode_var()
1292 switch (var->xres) in neofb_decode_var()
1328 if (var->xres == info->NeoPanelWidth) in neofb_decode_var()
1343 hoffset = ((info->NeoPanelWidth - var->xres) >> 4) - 1; in neofb_decode_var()
1344 voffset = ((info->NeoPanelHeight - var->yres) >> 1) - 2; in neofb_decode_var()
1353 switch (var->xres) in neofb_decode_var()
1383 par->biosMode = neoFindMode (var->xres, var->yres, var->bits_per_pixel); in neofb_decode_var()
1397 static int neofb_set_var (struct fb_var_screeninfo *var, int con, in neofb_set_var() argument
1407 err = neofb_decode_var (var, info, &par); in neofb_set_var()
1411 if (var->activate & FB_ACTIVATE_TEST) in neofb_set_var()
1423 if (fb->var.xres != var->xres) in neofb_set_var()
1425 if (fb->var.yres != var->yres) in neofb_set_var()
1427 if (fb->var.xres_virtual != var->xres_virtual) in neofb_set_var()
1429 if (fb->var.yres_virtual != var->yres_virtual) in neofb_set_var()
1431 if (fb->var.bits_per_pixel != var->bits_per_pixel) in neofb_set_var()
1436 var->accel_flags &= ~FB_ACCELF_TEXT; in neofb_set_var()
1438 var->red.msb_right = 0; in neofb_set_var()
1439 var->green.msb_right = 0; in neofb_set_var()
1440 var->blue.msb_right = 0; in neofb_set_var()
1442 switch (var->bits_per_pixel) in neofb_set_var()
1446 var->transp.offset = 0; in neofb_set_var()
1447 var->transp.length = 0; in neofb_set_var()
1448 var->red.offset = 0; in neofb_set_var()
1449 var->red.length = 8; in neofb_set_var()
1450 var->green.offset = 0; in neofb_set_var()
1451 var->green.length = 8; in neofb_set_var()
1452 var->blue.offset = 0; in neofb_set_var()
1453 var->blue.length = 8; in neofb_set_var()
1458 display->next_line = var->xres_virtual; in neofb_set_var()
1464 var->transp.offset = 0; in neofb_set_var()
1465 var->transp.length = 0; in neofb_set_var()
1466 var->red.offset = 11; in neofb_set_var()
1467 var->red.length = 5; in neofb_set_var()
1468 var->green.offset = 5; in neofb_set_var()
1469 var->green.length = 6; in neofb_set_var()
1470 var->blue.offset = 0; in neofb_set_var()
1471 var->blue.length = 5; in neofb_set_var()
1476 display->next_line = var->xres_virtual * 2; in neofb_set_var()
1482 var->transp.offset = 0; in neofb_set_var()
1483 var->transp.length = 0; in neofb_set_var()
1484 var->red.offset = 16; in neofb_set_var()
1485 var->red.length = 8; in neofb_set_var()
1486 var->green.offset = 8; in neofb_set_var()
1487 var->green.length = 8; in neofb_set_var()
1488 var->blue.offset = 0; in neofb_set_var()
1489 var->blue.length = 8; in neofb_set_var()
1494 display->next_line = var->xres_virtual * 3; in neofb_set_var()
1496 var->accel_flags &= ~FB_ACCELF_TEXT; in neofb_set_var()
1503 var->transp.offset = 24; in neofb_set_var()
1504 var->transp.length = 8; in neofb_set_var()
1505 var->red.offset = 16; in neofb_set_var()
1506 var->red.length = 8; in neofb_set_var()
1507 var->green.offset = 8; in neofb_set_var()
1508 var->green.length = 8; in neofb_set_var()
1509 var->blue.offset = 0; in neofb_set_var()
1510 var->blue.length = 8; in neofb_set_var()
1515 display->next_line = var->xres_virtual * 4; in neofb_set_var()
1517 var->accel_flags &= ~FB_ACCELF_TEXT; in neofb_set_var()
1523 printk (KERN_WARNING "neofb: no support for %dbpp\n", var->bits_per_pixel); in neofb_set_var()
1525 var->accel_flags &= ~FB_ACCELF_TEXT; in neofb_set_var()
1529 if (var->accel_flags & FB_ACCELF_TEXT) in neofb_set_var()
1546 fb->var = *var; in neofb_set_var()
1547 fb->var.activate &= ~FB_ACTIVATE_ALL; in neofb_set_var()
1554 display->var = fb->var; in neofb_set_var()
1560 if (var->activate & FB_ACTIVATE_ALL) in neofb_set_var()
1561 fb->disp->var = fb->var; in neofb_set_var()
1571 neofb_update_start (info, var); in neofb_set_var()
1574 if (var->accel_flags & FB_ACCELF_TEXT) in neofb_set_var()
1575 neo2200_accel_init (info, var); in neofb_set_var()
1584 static int neofb_pan_display (struct fb_var_screeninfo *var, int con, in neofb_pan_display() argument
1590 y_bottom = var->yoffset; in neofb_pan_display()
1592 if (!(var->vmode & FB_VMODE_YWRAP)) in neofb_pan_display()
1593 y_bottom += var->yres; in neofb_pan_display()
1595 if (var->xoffset > (var->xres_virtual - var->xres)) in neofb_pan_display()
1597 if (y_bottom > fb->var.yres_virtual) in neofb_pan_display()
1600 neofb_update_start (info, var); in neofb_pan_display()
1602 fb->var.xoffset = var->xoffset; in neofb_pan_display()
1603 fb->var.yoffset = var->yoffset; in neofb_pan_display()
1605 if (var->vmode & FB_VMODE_YWRAP) in neofb_pan_display()
1606 fb->var.vmode |= FB_VMODE_YWRAP; in neofb_pan_display()
1608 fb->var.vmode &= ~FB_VMODE_YWRAP; in neofb_pan_display()
1624 neofb_update_start (info, &fb_display[con].var); in neofb_updatevar()
1642 disp->var = fb->var; in neofb_switch()
1662 cmap = fb_default_cmap(1 << disp->var.bits_per_pixel); in neofb_switch()
1666 disp->var.activate = FB_ACTIVATE_NOW; in neofb_switch()
1667 neofb_set_var(&disp->var, con, fb); in neofb_switch()
1731 static int gen_get_var (struct fb_var_screeninfo *var, int con, struct fb_info *fb) in gen_get_var() argument
1733 *var = fb->var; in gen_get_var()
2156 info->fb.var.nonstd = 0; in neo_alloc_fb_info()
2157 info->fb.var.activate = FB_ACTIVATE_NOW; in neo_alloc_fb_info()
2158 info->fb.var.height = -1; in neo_alloc_fb_info()
2159 info->fb.var.width = -1; in neo_alloc_fb_info()
2160 info->fb.var.accel_flags = 0; in neo_alloc_fb_info()
2234 h_sync = 1953125000 / info->fb.var.pixclock; in neofb_probe()
2235 h_sync = h_sync * 512 / (info->fb.var.xres + info->fb.var.left_margin + in neofb_probe()
2236 info->fb.var.right_margin + info->fb.var.hsync_len); in neofb_probe()
2237 v_sync = h_sync / (info->fb.var.yres + info->fb.var.upper_margin + in neofb_probe()
2238 info->fb.var.lower_margin + info->fb.var.vsync_len); in neofb_probe()
2242 info->fb.var.xres, info->fb.var.yres, in neofb_probe()