/* Check values in var, try to adjust them in case of out of bound values if possible, or return error.  */
static int omapfb_check_var(struct fb_var_screeninfo *var, struct fb_info *fbi)
/* Check values in var, try to adjust them in case of out of bound values if possible, or return error.  */
static int omapfb_check_var(struct fb_var_screeninfo *var, struct fb_info *fbi)
{
	struct omapfb_plane_struct *plane = fbi->par;
	struct omapfb_device *fbdev = plane->fbdev;
	int r;
	omapfb_rqueue_lock(fbdev);
	if (fbdev->ctrl->sync != NULL)
		fbdev->ctrl->sync();
	r = set_fb_var(fbi, var);
	omapfb_rqueue_unlock(fbdev);
	return r;
}