Lines Matching refs:var

170         struct fb_var_screeninfo var;  member
242 static int it8181fb_decode_var (const struct fb_var_screeninfo *var, void *par,
244 static int it8181fb_encode_var (struct fb_var_screeninfo *var, const void *par,
254 static int it8181fb_pan_display (const struct fb_var_screeninfo *var,
261 static void set_color_bitfields(struct fb_var_screeninfo *var);
410 static void set_color_bitfields(struct fb_var_screeninfo *var) in set_color_bitfields() argument
412 switch (var->bits_per_pixel) { in set_color_bitfields()
415 var->red.offset = 0; in set_color_bitfields()
416 var->red.length = 8; in set_color_bitfields()
417 var->green.offset = 0; in set_color_bitfields()
418 var->green.length = 8; in set_color_bitfields()
419 var->blue.offset = 0; in set_color_bitfields()
420 var->blue.length = 8; in set_color_bitfields()
421 var->transp.offset = 0; in set_color_bitfields()
422 var->transp.length = 0; in set_color_bitfields()
425 var->red.offset = 11; in set_color_bitfields()
426 var->red.length = 5; in set_color_bitfields()
427 var->green.offset = 5; in set_color_bitfields()
428 var->green.length = 6; in set_color_bitfields()
429 var->blue.offset = 0; in set_color_bitfields()
430 var->blue.length = 5; in set_color_bitfields()
431 var->transp.offset = 0; in set_color_bitfields()
432 var->transp.length = 0; in set_color_bitfields()
435 var->red.offset = 16; in set_color_bitfields()
436 var->red.length = 8; in set_color_bitfields()
437 var->green.offset = 8; in set_color_bitfields()
438 var->green.length = 8; in set_color_bitfields()
439 var->blue.offset = 0; in set_color_bitfields()
440 var->blue.length = 8; in set_color_bitfields()
441 var->transp.offset = 0; in set_color_bitfields()
442 var->transp.length = 0; in set_color_bitfields()
445 var->red.offset = 0; in set_color_bitfields()
446 var->red.length = 8; in set_color_bitfields()
447 var->green.offset = 8; in set_color_bitfields()
448 var->green.length = 8; in set_color_bitfields()
449 var->blue.offset = 16; in set_color_bitfields()
450 var->blue.length = 8; in set_color_bitfields()
451 var->transp.offset = 24; in set_color_bitfields()
452 var->transp.length = 8; in set_color_bitfields()
456 var->red.msb_right = 0; in set_color_bitfields()
457 var->green.msb_right = 0; in set_color_bitfields()
458 var->blue.msb_right = 0; in set_color_bitfields()
459 var->transp.msb_right = 0; in set_color_bitfields()
474 struct fb_var_screeninfo* var = &par->var; in it8181fb_encode_fix() local
485 fix->visual = (var->bits_per_pixel <= 8) ? in it8181fb_encode_fix()
495 static int it8181fb_decode_var(const struct fb_var_screeninfo *var, in it8181fb_decode_var() argument
503 if (var->vmode & FB_VMODE_DOUBLE) { in it8181fb_decode_var()
507 if (var->vmode & FB_VMODE_INTERLACED) { in it8181fb_decode_var()
512 if (!((var->xres == 640 && var->yres == 480) || in it8181fb_decode_var()
513 (var->xres == 800 && var->yres == 600) || in it8181fb_decode_var()
514 (var->xres == 1024 && var->yres == 768))) { in it8181fb_decode_var()
516 var->xres, var->yres); in it8181fb_decode_var()
521 par->var = *var; in it8181fb_decode_var()
523 switch (var->bits_per_pixel) { in it8181fb_decode_var()
525 par->var.bits_per_pixel = 8; in it8181fb_decode_var()
528 par->var.bits_per_pixel = 16; in it8181fb_decode_var()
531 par->var.bits_per_pixel = 24; in it8181fb_decode_var()
534 par->var.bits_per_pixel = 32; in it8181fb_decode_var()
537 dbg("color depth %d bpp not supported", var->bits_per_pixel); in it8181fb_decode_var()
541 par->var.width = par->var.height = -1; in it8181fb_decode_var()
543 par->var.xoffset = par->var.yoffset = 0; in it8181fb_decode_var()
544 par->var.xres_virtual = par->var.xres; in it8181fb_decode_var()
545 par->var.yres_virtual = par->var.yres; in it8181fb_decode_var()
547 par->var.accel_flags = 0; in it8181fb_decode_var()
549 set_color_bitfields(&par->var); in it8181fb_decode_var()
550 par->cmap_len = (par->var.bits_per_pixel == 8) ? 256 : 16; in it8181fb_decode_var()
556 par->var.xres_virtual * (par->var.bits_per_pixel>>3); in it8181fb_decode_var()
557 if (par->line_length * par->var.yres_virtual > IT8181_FB_SIZE) { in it8181fb_decode_var()
559 par->var.xres_virtual, par->var.yres_virtual, in it8181fb_decode_var()
560 par->var.bits_per_pixel); in it8181fb_decode_var()
568 xres = var->xres; in it8181fb_decode_var()
569 rm = var->right_margin; in it8181fb_decode_var()
570 hsync = var->hsync_len; in it8181fb_decode_var()
571 lm = var->left_margin; in it8181fb_decode_var()
573 yres = var->yres; in it8181fb_decode_var()
574 bm = var->lower_margin; in it8181fb_decode_var()
575 vsync = var->vsync_len; in it8181fb_decode_var()
576 um = var->upper_margin; in it8181fb_decode_var()
597 static int it8181fb_encode_var(struct fb_var_screeninfo *var, in it8181fb_encode_var() argument
601 *var = ((struct it8181fb_par *)par)->var; in it8181fb_encode_var()
613 switch (par->var.bits_per_pixel) { in it8181fb_set_disp()
758 f_pix = PICOS2KHZ(par->var.pixclock); in it8181fb_calc_pixclock()
814 par->var.pixclock = KHZ2PICOS(f_actual); in it8181fb_calc_pixclock()
853 dbg("%dx%dx%d", par->var.xres, par->var.yres, par->var.bits_per_pixel); in it8181fb_set_par()
855 par->var.pixclock, in it8181fb_set_par()
856 par->var.left_margin, in it8181fb_set_par()
857 par->var.right_margin, in it8181fb_set_par()
858 par->var.upper_margin, in it8181fb_set_par()
859 par->var.lower_margin, in it8181fb_set_par()
860 par->var.hsync_len, in it8181fb_set_par()
861 par->var.vsync_len); in it8181fb_set_par()
884 if (par->var.xres == 640 && par->var.yres == 480 && in it8181fb_set_par()
885 (par->var.bits_per_pixel == 8 || par->var.bits_per_pixel == 16)) { in it8181fb_set_par()
913 } else if (par->var.xres == 800 && par->var.yres == 600 && in it8181fb_set_par()
914 (par->var.bits_per_pixel == 8 || par->var.bits_per_pixel == 16)) { in it8181fb_set_par()
945 if (par->var.bits_per_pixel == 8) { in it8181fb_set_par()
946 if (par->var.xres == 640 && par->var.yres == 480) in it8181fb_set_par()
948 else if (par->var.xres == 800 && par->var.yres == 600) in it8181fb_set_par()
956 if (par->var.xres == 640 && par->var.yres == 480) { in it8181fb_set_par()
957 if (par->var.bits_per_pixel == 8) in it8181fb_set_par()
959 else if (par->var.bits_per_pixel == 16) in it8181fb_set_par()
962 } else if (par->var.xres == 800 && par->var.yres == 600) { in it8181fb_set_par()
963 if (par->var.bits_per_pixel == 8) in it8181fb_set_par()
965 else if (par->var.bits_per_pixel == 16) in it8181fb_set_par()
974 if (par->var.xres == 640 && par->var.yres == 480 && in it8181fb_set_par()
975 (par->var.bits_per_pixel == 8 || in it8181fb_set_par()
976 par->var.bits_per_pixel == 16)) { in it8181fb_set_par()
1017 } else if (par->var.xres == 800 && par->var.yres == 600 && in it8181fb_set_par()
1018 (par->var.bits_per_pixel == 8 || in it8181fb_set_par()
1019 par->var.bits_per_pixel == 16)) { in it8181fb_set_par()
1142 switch (par->var.bits_per_pixel) { in it8181fb_setcolreg()
1177 static int it8181fb_pan_display (const struct fb_var_screeninfo *var, in it8181fb_pan_display() argument
1189 struct fb_var_screeninfo var; in it8181fb_init() local
1245 if(!mode_option || !fb_find_mode(&var, &p->gen.info, in it8181fb_init()
1247 var = it8181_var_table[default_res]; in it8181fb_init()
1248 var.bits_per_pixel = default_bpp; in it8181fb_init()
1251 if (fbgen_do_set_var(&var, 1, &p->gen)) { in it8181fb_init()
1260 p->disp.var = var; in it8181fb_init()