Lines Matching defs:var

234  * @var: The screen information to verify.
240 static int s3c_fb_check_var(struct fb_var_screeninfo *var,
248 var->xres_virtual = max(var->xres_virtual, var->xres);
249 var->yres_virtual = max(var->yres_virtual, var->yres);
251 if (!s3c_fb_validate_win_bpp(win, var->bits_per_pixel)) {
253 win->index, var->bits_per_pixel);
258 var->transp.offset = 0;
259 var->transp.length = 0;
261 switch (var->bits_per_pixel) {
268 var->red.offset = 5;
269 var->green.offset = 2;
270 var->blue.offset = 0;
271 var->red.length = 2;
272 var->green.length = 3;
273 var->blue.length = 2;
274 var->transp.offset = 7;
275 var->transp.length = 1;
277 var->red.offset = 0;
278 var->red.length = var->bits_per_pixel;
279 var->green = var->red;
280 var->blue = var->red;
286 var->transp.offset = 18;
287 var->transp.length = 1;
290 var->bits_per_pixel = 32;
293 var->red.offset = 12;
294 var->green.offset = 6;
295 var->blue.offset = 0;
296 var->red.length = 6;
297 var->green.length = 6;
298 var->blue.length = 6;
303 var->red.offset = 11;
304 var->green.offset = 5;
305 var->blue.offset = 0;
306 var->red.length = 5;
307 var->green.length = 6;
308 var->blue.length = 5;
314 var->transp.length = var->bits_per_pixel - 24;
315 var->transp.offset = 24;
319 var->bits_per_pixel = 32;
320 var->red.offset = 16;
321 var->red.length = 8;
322 var->green.offset = 8;
323 var->green.length = 8;
324 var->blue.offset = 0;
325 var->blue.length = 8;
488 struct fb_var_screeninfo *var = &info->var;
504 switch (var->bits_per_pixel) {
525 info->fix.line_length = (var->xres_virtual * var->bits_per_pixel) / 8;
527 info->fix.xpanstep = info->var.xres_virtual > info->var.xres ? 1 : 0;
528 info->fix.ypanstep = info->var.yres_virtual > info->var.yres ? 1 : 0;
543 data = info->fix.smem_start + info->fix.line_length * var->yres;
546 pagewidth = (var->xres * var->bits_per_pixel) >> 3;
559 data = VIDOSDxB_BOTRIGHT_X(s3c_fb_align_word(var->bits_per_pixel,
560 var->xres - 1)) |
561 VIDOSDxB_BOTRIGHT_Y(var->yres - 1) |
562 VIDOSDxB_BOTRIGHT_X_E(s3c_fb_align_word(var->bits_per_pixel,
563 var->xres - 1)) |
564 VIDOSDxB_BOTRIGHT_Y_E(var->yres - 1);
568 data = var->xres * var->yres;
591 switch (var->bits_per_pixel) {
608 if (var->transp.length != 0)
616 if (var->transp.length != 0)
625 if (var->red.length == 6) {
626 if (var->transp.length != 0)
630 } else if (var->transp.length == 1)
633 else if ((var->transp.length == 4) ||
634 (var->transp.length == 8))
669 if (var->transp.length > 4)
760 val = chan_to_field(red, &info->var.red);
761 val |= chan_to_field(green, &info->var.green);
762 val |= chan_to_field(blue, &info->var.blue);
862 * @var: The screen information to verify.
865 static int s3c_fb_pan_display(struct fb_var_screeninfo *var,
876 start_boff = var->yoffset * info->fix.line_length;
878 if (info->var.bits_per_pixel >= 8) {
879 start_boff += var->xoffset * (info->var.bits_per_pixel >> 3);
881 switch (info->var.bits_per_pixel) {
883 start_boff += var->xoffset >> 1;
886 start_boff += var->xoffset >> 2;
889 start_boff += var->xoffset >> 3;
898 end_boff = start_boff + info->var.yres * info->fix.line_length;
1237 fb_videomode_to_var(&fbinfo->var, &initmode);
1241 fbinfo->var.activate = FB_ACTIVATE_NOW;
1242 fbinfo->var.vmode = FB_VMODE_NONINTERLACED;
1243 fbinfo->var.bits_per_pixel = windata->default_bpp;
1249 ret = s3c_fb_check_var(&fbinfo->var, fbinfo);