ivideo->rate_idx = sisfb_vrate[i].idx; break; } 
ivideo->rate_idx = sisfb_vrate[i].idx; break; } 
sisfb_search_refresh_rate(struct sis_video_info *ivideo, unsigned int rate, int mode_idx){	u16 xres, yres;	int i = 0;	xres = sisbios_mode[mode_idx].xres;	yres = sisbios_mode[mode_idx].yres;	ivideo->rate_idx = 0;	while((sisfb_vrate[i].idx != 0) && (sisfb_vrate[i].xres <= xres)) {		if((sisfb_vrate[i].xres == xres) && (sisfb_vrate[i].yres == yres)) {			if(sisfb_vrate[i].refresh == rate) {				ivideo->rate_idx = sisfb_vrate[i].idx;				break;			} else if(sisfb_vrate[i].refresh > rate) {				if((sisfb_vrate[i].refresh - rate) <= 3) {					DPRINTK("sisfb: Adjusting rate from %d up to %d\n",						rate, sisfb_vrate[i].refresh);					ivideo->rate_idx = sisfb_vrate[i].idx;					ivideo->refresh_rate = sisfb_vrate[i].refresh;				} else if(((rate - sisfb_vrate[i-1].refresh) <= 2)						&& (sisfb_vrate[i].idx != 1)) {					DPRINTK("sisfb: Adjusting rate from %d down to %d\n",						rate, sisfb_vrate[i-1].refresh);					ivideo->rate_idx = sisfb_vrate[i-1].idx;					ivideo->refresh_rate = sisfb_vrate[i-1].refresh;				} 				break;			} else if((rate - sisfb_vrate[i].refresh) <= 2) {				DPRINTK("sisfb: Adjusting rate from %d down to %d\n",						rate, sisfb_vrate[i].refresh);	           		ivideo->rate_idx = sisfb_vrate[i].idx;		   		break;	       		}		}		i++;	}	if(ivideo->rate_idx > 0) {		return ivideo->rate_idx;	} else {		printk(KERN_INFO "sisfb: Unsupported rate %d for %dx%d\n",				rate, xres, yres);		return 0;	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/sis_main.c/clean/drivers/video/sis/sis_main.c