Lines Matching refs:var
78 struct fb_var_screeninfo var; member
109 static void vga16fb_pan_var(struct fb_info *info, struct fb_var_screeninfo *var) in vga16fb_pan_var() argument
111 u32 pos = (var->xres_virtual * var->yoffset + var->xoffset) >> 3; in vga16fb_pan_var()
128 vga16fb_pan_var(info, &fb_display[con].var); in vga16fb_update_var()
152 fix->line_length = p->var.xres_virtual / 8; in vga16fb_get_fix()
156 static int vga16fb_get_var(struct fb_var_screeninfo *var, int con, in vga16fb_get_var() argument
160 memcpy(var, &vga16fb_defined, sizeof(struct fb_var_screeninfo)); in vga16fb_get_var()
162 *var=fb_display[con].var; in vga16fb_get_var()
197 static void vga16fb_encode_var(struct fb_var_screeninfo *var, in vga16fb_encode_var() argument
201 *var = par->var; in vga16fb_encode_var()
235 par->var.pixclock = best->pixclock; in vga16fb_clock_chip()
240 static int vga16fb_decode_var(const struct fb_var_screeninfo *var, in vga16fb_decode_var() argument
251 if (var->bits_per_pixel != 4) in vga16fb_decode_var()
253 xres = (var->xres + 7) & ~7; in vga16fb_decode_var()
254 vxres = (var->xres_virtual + 0xF) & ~0xF; in vga16fb_decode_var()
255 xoffset = (var->xoffset + 7) & ~7; in vga16fb_decode_var()
256 left = (var->left_margin + 7) & ~7; in vga16fb_decode_var()
257 right = (var->right_margin + 7) & ~7; in vga16fb_decode_var()
258 hslen = (var->hsync_len + 7) & ~7; in vga16fb_decode_var()
265 par->var.xres = xres; in vga16fb_decode_var()
266 par->var.right_margin = right; in vga16fb_decode_var()
267 par->var.hsync_len = hslen; in vga16fb_decode_var()
268 par->var.left_margin = left; in vga16fb_decode_var()
269 par->var.xres_virtual = vxres; in vga16fb_decode_var()
270 par->var.xoffset = xoffset; in vga16fb_decode_var()
296 yres = var->yres; in vga16fb_decode_var()
297 lower = var->lower_margin; in vga16fb_decode_var()
298 vslen = var->vsync_len; in vga16fb_decode_var()
299 upper = var->upper_margin; in vga16fb_decode_var()
300 vyres = var->yres_virtual; in vga16fb_decode_var()
301 yoffset = var->yoffset; in vga16fb_decode_var()
312 par->var.yres = yres; in vga16fb_decode_var()
313 par->var.lower_margin = lower; in vga16fb_decode_var()
314 par->var.vsync_len = vslen; in vga16fb_decode_var()
315 par->var.upper_margin = upper; in vga16fb_decode_var()
316 par->var.yres_virtual = vyres; in vga16fb_decode_var()
317 par->var.yoffset = yoffset; in vga16fb_decode_var()
319 if (var->vmode & FB_VMODE_DOUBLE) { in vga16fb_decode_var()
345 par->var.vmode = var->vmode; in vga16fb_decode_var()
346 if (var->vmode & FB_VMODE_DOUBLE) in vga16fb_decode_var()
394 par->var.sync = var->sync; in vga16fb_decode_var()
395 if (var->sync & FB_SYNC_HOR_HIGH_ACT) in vga16fb_decode_var()
397 if (var->sync & FB_SYNC_VERT_HIGH_ACT) in vga16fb_decode_var()
415 vga16fb_clock_chip(par, var->pixclock, info); in vga16fb_decode_var()
417 par->var.bits_per_pixel = 4; in vga16fb_decode_var()
418 par->var.grayscale = var->grayscale; in vga16fb_decode_var()
419 par->var.red.offset = par->var.green.offset = par->var.blue.offset = in vga16fb_decode_var()
420 par->var.transp.offset = 0; in vga16fb_decode_var()
421 par->var.red.length = par->var.green.length = par->var.blue.length = in vga16fb_decode_var()
423 par->var.transp.length = 0; in vga16fb_decode_var()
424 par->var.nonstd = 0; in vga16fb_decode_var()
425 par->var.activate = FB_ACTIVATE_NOW; in vga16fb_decode_var()
426 par->var.height = -1; in vga16fb_decode_var()
427 par->var.width = -1; in vga16fb_decode_var()
428 par->var.accel_flags = 0; in vga16fb_decode_var()
501 static int vga16fb_set_var(struct fb_var_screeninfo *var, int con, in vga16fb_set_var() argument
513 if ((err = vga16fb_decode_var(var, &par, info)) != 0) in vga16fb_set_var()
515 vga16fb_encode_var(var, &par, info); in vga16fb_set_var()
517 if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_TEST) in vga16fb_set_var()
520 if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) { in vga16fb_set_var()
523 oldxres = display->var.xres; in vga16fb_set_var()
524 oldyres = display->var.yres; in vga16fb_set_var()
525 oldvxres = display->var.xres_virtual; in vga16fb_set_var()
526 oldvyres = display->var.yres_virtual; in vga16fb_set_var()
527 oldbpp = display->var.bits_per_pixel; in vga16fb_set_var()
529 display->var = *var; in vga16fb_set_var()
531 if (oldxres != var->xres || oldyres != var->yres || in vga16fb_set_var()
532 oldvxres != var->xres_virtual || oldvyres != var->yres_virtual || in vga16fb_set_var()
533 oldbpp != var->bits_per_pixel) { in vga16fb_set_var()
606 gray = disp.var.grayscale; in vga16_setcolreg()
608 gray = fb_display[currcon].var.grayscale; in vga16_setcolreg()
662 static int vga16fb_pan_display(struct fb_var_screeninfo *var, int con, in vga16fb_pan_display() argument
665 if (var->xoffset + fb_display[con].var.xres > fb_display[con].var.xres_virtual || in vga16fb_pan_display()
666 var->yoffset + fb_display[con].var.yres > fb_display[con].var.yres_virtual) in vga16fb_pan_display()
669 vga16fb_pan_var(info, var); in vga16fb_pan_display()
670 fb_display[con].var.xoffset = var->xoffset; in vga16fb_pan_display()
671 fb_display[con].var.yoffset = var->yoffset; in vga16fb_pan_display()
672 fb_display[con].var.vmode &= ~FB_VMODE_YWRAP; in vga16fb_pan_display()
715 vga16fb_decode_var(&fb_display[con].var, &par, info); in vga16fb_switch()
924 disp.var = vga16fb_defined; in vga16fb_init()