Lines Matching refs:var
126 static int gxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
128 if (var->xres > 1600 || var->yres > 1200)
130 if ((var->xres > 1280 || var->yres > 1024) && var->bits_per_pixel > 16)
133 if (var->bits_per_pixel == 32) {
134 var->red.offset = 16; var->red.length = 8;
135 var->green.offset = 8; var->green.length = 8;
136 var->blue.offset = 0; var->blue.length = 8;
137 } else if (var->bits_per_pixel == 16) {
138 var->red.offset = 11; var->red.length = 5;
139 var->green.offset = 5; var->green.length = 6;
140 var->blue.offset = 0; var->blue.length = 5;
141 } else if (var->bits_per_pixel == 8) {
142 var->red.offset = 0; var->red.length = 8;
143 var->green.offset = 0; var->green.length = 8;
144 var->blue.offset = 0; var->blue.length = 8;
147 var->transp.offset = 0; var->transp.length = 0;
150 if (gx_line_delta(var->xres, var->bits_per_pixel) * var->yres > info->fix.smem_len)
160 if (info->var.bits_per_pixel > 8)
165 info->fix.line_length = gx_line_delta(info->var.xres, info->var.bits_per_pixel);
183 if (info->var.grayscale) {
196 v = chan_to_field(red, &info->var.red);
197 v |= chan_to_field(green, &info->var.green);
198 v |= chan_to_field(blue, &info->var.blue);
300 info->var.nonstd = 0;
301 info->var.activate = FB_ACTIVATE_NOW;
302 info->var.height = -1;
303 info->var.width = -1;
304 info->var.accel_flags = 0;
305 info->var.vmode = FB_VMODE_NONINTERLACED;
312 info->var.grayscale = 0;
388 ret = fb_find_mode(&info->var, info, mode_option,
400 gxfb_check_var(&info->var, info);