Lines Matching refs:var
101 static int vmw_fb_check_var(struct fb_var_screeninfo *var,
104 int depth = var->bits_per_pixel;
108 switch (var->bits_per_pixel) {
110 depth = (var->transp.length > 0) ? 32 : 24;
113 DRM_ERROR("Bad bpp %u.\n", var->bits_per_pixel);
119 var->red.offset = 16;
120 var->green.offset = 8;
121 var->blue.offset = 0;
122 var->red.length = 8;
123 var->green.length = 8;
124 var->blue.length = 8;
125 var->transp.length = 0;
126 var->transp.offset = 0;
129 var->red.offset = 16;
130 var->green.offset = 8;
131 var->blue.offset = 0;
132 var->red.length = 8;
133 var->green.length = 8;
134 var->blue.length = 8;
135 var->transp.length = 8;
136 var->transp.offset = 24;
143 if ((var->xoffset + var->xres) > par->max_width ||
144 (var->yoffset + var->yres) > par->max_height) {
150 var->xres * var->bits_per_pixel/8,
151 var->yoffset + var->yres)) {
299 static int vmw_fb_pan_display(struct fb_var_screeninfo *var,
304 if ((var->xoffset + var->xres) > var->xres_virtual ||
305 (var->yoffset + var->yres) > var->yres_virtual) {
311 par->fb_x = var->xoffset;
312 par->fb_y = var->yoffset;
346 par->dirty.x2 = info->var.xres;
424 static int vmw_fb_compute_depth(struct fb_var_screeninfo *var,
427 switch (var->bits_per_pixel) {
429 *depth = (var->transp.length > 0) ? 32 : 24;
432 DRM_ERROR("Bad bpp %u.\n", var->bits_per_pixel);
503 struct fb_var_screeninfo *var = &info->var;
509 ret = vmw_fb_compute_depth(var, &depth);
513 mode_cmd.width = var->xres;
514 mode_cmd.height = var->yres;
515 mode_cmd.pitches[0] = ((var->bits_per_pixel + 7) / 8) * mode_cmd.width;
517 drm_mode_legacy_fb_format(var->bits_per_pixel, depth);
561 struct fb_var_screeninfo *var = &info->var;
576 mode->hdisplay = var->xres;
577 mode->vdisplay = var->yres;
582 DIV_ROUND_UP(var->bits_per_pixel, 8),
593 par->fb_x = var->xoffset;
594 par->fb_y = var->yoffset;
680 info->var.xres = init_mode->hdisplay;
681 info->var.yres = init_mode->vdisplay;
693 * Fixed and var
715 info->var.red.offset = 16;
716 info->var.green.offset = 8;
717 info->var.blue.offset = 0;
718 info->var.red.length = 8;
719 info->var.green.length = 8;
720 info->var.blue.length = 8;
721 info->var.transp.offset = 0;
722 info->var.transp.length = 0;
724 info->var.xres_virtual = fb_width;
725 info->var.yres_virtual = fb_height;
726 info->var.bits_per_pixel = fb_bpp;
727 info->var.xoffset = 0;
728 info->var.yoffset = 0;
729 info->var.activate = FB_ACTIVATE_NOW;
730 info->var.height = -1;
731 info->var.width = -1;