/* get preferred timing */ if (specs->misc & FB_MISC_1ST_DETAIL) { int i; 
struct fb_videomode *modedb; 
static int __devinit nvidia_set_fbinfo(struct fb_info *info){	struct fb_monspecs *specs = &info->monspecs;	struct fb_videomode modedb;	struct nvidia_par *par = info->par;	int lpitch;	NVTRACE_ENTER();	info->flags = FBINFO_DEFAULT	    | FBINFO_HWACCEL_IMAGEBLIT	    | FBINFO_HWACCEL_FILLRECT	    | FBINFO_HWACCEL_COPYAREA	    | FBINFO_HWACCEL_YPAN;	fb_videomode_to_modelist(info->monspecs.modedb,				 info->monspecs.modedb_len, &info->modelist);	fb_var_to_videomode(&modedb, &nvidiafb_default_var);	if (specs->modedb != NULL) {		/* get preferred timing */		if (specs->misc & FB_MISC_1ST_DETAIL) {			int i;			for (i = 0; i < specs->modedb_len; i++) {				if (specs->modedb[i].flag & FB_MODE_IS_FIRST) {					modedb = specs->modedb[i];					break;				}			}		} else {			/* otherwise, get first mode in database */			modedb = specs->modedb[0];		}		fb_videomode_to_var(&nvidiafb_default_var, &modedb);		nvidiafb_default_var.bits_per_pixel = 8;	} else if (par->fpWidth && par->fpHeight) {		char buf[16];		memset(buf, 0, 16);		snprintf(buf, 15, "%dx%dMR", par->fpWidth, par->fpHeight);		fb_find_mode(&nvidiafb_default_var, info, buf, specs->modedb,			     specs->modedb_len, &modedb, 8);	}	if (mode_option)		fb_find_mode(&nvidiafb_default_var, info, mode_option,			     specs->modedb, specs->modedb_len, &modedb, 8);	info->var = nvidiafb_default_var;	info->fix.visual = (info->var.bits_per_pixel == 8) ?		FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR;	info->pseudo_palette = par->pseudo_palette;	fb_alloc_cmap(&info->cmap, 256, 0);	fb_destroy_modedb(info->monspecs.modedb);	info->monspecs.modedb = NULL;	/* maximize virtual vertical length */	lpitch = info->var.xres_virtual *		((info->var.bits_per_pixel + 7) >> 3);	info->var.yres_virtual = info->screen_size / lpitch;	info->pixmap.scan_align = 4;	info->pixmap.buf_align = 4;	info->pixmap.access_align = 32;	info->pixmap.size = 8 * 1024;	info->pixmap.flags = FB_PIXMAP_SYSTEM;	if (!hwcur)	    info->fbops->fb_cursor = NULL;	info->var.accel_flags = (!noaccel);	switch (par->Architecture) {	case NV_ARCH_04:		info->fix.accel = FB_ACCEL_NV4;		break;	case NV_ARCH_10:		info->fix.accel = FB_ACCEL_NV_10;		break;	case NV_ARCH_20:		info->fix.accel = FB_ACCEL_NV_20;		break;	case NV_ARCH_30:		info->fix.accel = FB_ACCEL_NV_30;		break;	case NV_ARCH_40:		info->fix.accel = FB_ACCEL_NV_40;		break;	}	NVTRACE_LEAVE();	return nvidiafb_check_var(&info->var, info);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/5ee1ef96a0d5c49809c61bdbb30cdda88e1d23cf/nvidia.c/buggy/drivers/video/nvidia/nvidia.c