Lines Matching refs:var

93 static int asiliantfb_check_var(struct fb_var_screeninfo *var,
175 unsigned hd = p->var.xres / 8; in asiliant_set_timing()
176 unsigned hs = (p->var.xres + p->var.right_margin) / 8; in asiliant_set_timing()
177 unsigned he = (p->var.xres + p->var.right_margin + p->var.hsync_len) / 8; in asiliant_set_timing()
178 unsigned ht = (p->var.left_margin + p->var.xres + p->var.right_margin + p->var.hsync_len) / 8; in asiliant_set_timing()
179 unsigned vd = p->var.yres; in asiliant_set_timing()
180 unsigned vs = p->var.yres + p->var.lower_margin; in asiliant_set_timing()
181 unsigned ve = p->var.yres + p->var.lower_margin + p->var.vsync_len; in asiliant_set_timing()
182 unsigned vt = p->var.upper_margin + p->var.yres + p->var.lower_margin + p->var.vsync_len; in asiliant_set_timing()
183 unsigned wd = (p->var.xres_virtual * ((p->var.bits_per_pixel+7)/8)) / 8; in asiliant_set_timing()
185 if ((p->var.xres == 640) && (p->var.yres == 480) && (p->var.pixclock == 39722)) { in asiliant_set_timing()
217 if (p->var.xres == 640) { in asiliant_set_timing()
224 static int asiliantfb_check_var(struct fb_var_screeninfo *var, in asiliantfb_check_var() argument
229 if (!var->pixclock) in asiliantfb_check_var()
232 ratio = 1000000 / var->pixclock; in asiliantfb_check_var()
233 remainder = 1000000 % var->pixclock; in asiliantfb_check_var()
234 Ftarget = 1000000 * ratio + (1000000 * remainder) / var->pixclock; in asiliantfb_check_var()
242 var->xres_virtual = var->xres; in asiliantfb_check_var()
243 var->yres_virtual = var->yres; in asiliantfb_check_var()
245 if (var->bits_per_pixel == 24) { in asiliantfb_check_var()
246 var->red.offset = 16; in asiliantfb_check_var()
247 var->green.offset = 8; in asiliantfb_check_var()
248 var->blue.offset = 0; in asiliantfb_check_var()
249 var->red.length = var->blue.length = var->green.length = 8; in asiliantfb_check_var()
250 } else if (var->bits_per_pixel == 16) { in asiliantfb_check_var()
251 switch (var->red.offset) { in asiliantfb_check_var()
253 var->green.length = 6; in asiliantfb_check_var()
256 var->green.length = 5; in asiliantfb_check_var()
261 var->green.offset = 5; in asiliantfb_check_var()
262 var->blue.offset = 0; in asiliantfb_check_var()
263 var->red.length = var->blue.length = 5; in asiliantfb_check_var()
264 } else if (var->bits_per_pixel == 8) { in asiliantfb_check_var()
265 var->red.offset = var->green.offset = var->blue.offset = 0; in asiliantfb_check_var()
266 var->red.length = var->green.length = var->blue.length = 8; in asiliantfb_check_var()
278 asiliant_calc_dclk2(&p->var.pixclock, &dclk2_m, &dclk2_n, &dclk2_div); in asiliantfb_set_par()
281 if (p->var.bits_per_pixel == 24) { in asiliantfb_set_par()
285 } else if (p->var.bits_per_pixel == 16) { in asiliantfb_set_par()
286 if (p->var.red.offset == 11) in asiliantfb_set_par()
292 } else if (p->var.bits_per_pixel == 8) { in asiliantfb_set_par()
298 p->fix.line_length = p->var.xres * (p->var.bits_per_pixel >> 3); in asiliantfb_set_par()
299 p->fix.visual = (p->var.bits_per_pixel == 8) ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR; in asiliantfb_set_par()
325 switch(p->var.red.offset) { in asiliantfb_setcolreg()
515 p->var = asiliantfb_var; in init_asiliant()