/* The code below is used to pick up a mode in check_var and set_var. It should be made generic This is used when looking for modes. We assign a "distance" value to a mode in the modedb depending how "close" it is from what we are looking for. Currently, we don't compare that much, we could do better but the current fbcon doesn't quite mind ;)  */
static int radeon_compare_modes(const struct fb_var_screeninfo *var, const struct fb_videomode *mode)
/* The code below is used to pick up a mode in check_var and set_var. It should be made generic This is used when looking for modes. We assign a "distance" value to a mode in the modedb depending how "close" it is from what we are looking for. Currently, we don't compare that much, we could do better but the current fbcon doesn't quite mind ;)  */
static int radeon_compare_modes(const struct fb_var_screeninfo *var, const struct fb_videomode *mode)
{
	int distance = 0;
	distance = mode->yres - var->yres;
	distance += (mode->xres - var->xres)/2;
	return distance;
}