/* imxfb_set_par(): Set the user defined part of the display for the specified console  */
static int imxfb_set_par(struct fb_info *info)
/* imxfb_set_par(): Set the user defined part of the display for the specified console  */
static int imxfb_set_par(struct fb_info *info)
{
	struct imxfb_info *fbi = info->par;
	struct fb_var_screeninfo *var = &info->var;
	if (var->bits_per_pixel == 16 || var->bits_per_pixel == 32)
		info->fix.visual = FB_VISUAL_TRUECOLOR;
	else if (!fbi->cmap_static)
		info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
	else {
		info->fix.visual = FB_VISUAL_STATIC_PSEUDOCOLOR;
	}
	info->fix.line_length = var->xres_virtual * var->bits_per_pixel / 8;
	fbi->palette_size = var->bits_per_pixel == 8 ? 256 : 16;
	imxfb_activate_var(var, info);
	return 0;
}