vidmem = line_length*vyres; 
static int i810_check_params(struct fb_var_screeninfo *var, 			     struct fb_info *info){	struct i810fb_par *par = (struct i810fb_par *) info->par;	int line_length, vidmem;	u32 xres, yres, vxres, vyres;	xres = var->xres;	yres = var->yres;	vxres = var->xres_virtual;	vyres = var->yres_virtual;	/*	 *  Memory limit	 */	line_length = get_line_length(par, vxres, 				      var->bits_per_pixel);	vidmem = line_length*vyres;	if (vidmem > par->fb.size) {		vyres = par->fb.size/line_length;		if (vyres < yres) {			vyres = yres;			vxres = par->fb.size/vyres;			vxres /= var->bits_per_pixel >> 3;			line_length = get_line_length(par, vxres, 						      var->bits_per_pixel);			vidmem = line_length * yres;			if (vxres < xres) {				printk("i810fb: required video memory, "				       "%d bytes, for %dx%d-%d (virtual) "				       "is out of range\n", 				       vidmem, vxres, vyres, 				       var->bits_per_pixel);				return -ENOMEM;			}		}	}	/*	 * Monitor limit	 */	switch (var->bits_per_pixel) {	case 8:		info->monspecs.dclkmax = 234000000;		break;	case 16:		info->monspecs.dclkmax = 229000000;		break;	case 24:	case 32:		info->monspecs.dclkmax = 204000000;		break;	}	info->monspecs.dclkmin = 15000000;	if (fb_validate_mode(var, info)) {		if (fb_get_mode(FB_MAXTIMINGS, 0, var, info)) {			int default_sync = (info->monspecs.hfmin-HFMIN)						|(info->monspecs.hfmax-HFMAX)						|(info->monspecs.vfmin-VFMIN)						|(info->monspecs.vfmax-VFMAX);			printk("i810fb: invalid video mode%s\n",			    default_sync ? "" :			    ". Specifying vsyncN/hsyncN parameters may help");			return -EINVAL;		}	}		var->xres = xres;	var->yres = yres;	var->xres_virtual = vxres;	var->yres_virtual = vyres;	return 0;}	
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/74f6ae84b2315c2fa8a4110b09a1c0f3dca92674/i810_main.c/buggy/drivers/video/i810/i810_main.c