/* calculate base bpp dep. */ switch(var->bits_per_pixel) { 
/* calculate base bpp dep. */ switch(var->bits_per_pixel) { 
sisfb_pan_var(struct sis_video_info *ivideo, struct fb_var_screeninfo *var){	unsigned int base;	if(var->xoffset > (var->xres_virtual - var->xres)) {		return -EINVAL;	}	if(var->yoffset > (var->yres_virtual - var->yres)) {		return -EINVAL;	}	base = (var->yoffset * var->xres_virtual) + var->xoffset;        /* calculate base bpp dep. */        switch(var->bits_per_pixel) {	case 32:            	break;        case 16:        	base >>= 1;        	break;	case 8:        default:        	base >>= 2;            	break;        }		outSISIDXREG(SISSR, IND_SIS_PASSWORD, SIS_PASSWORD);        outSISIDXREG(SISCR, 0x0D, base & 0xFF);	outSISIDXREG(SISCR, 0x0C, (base >> 8) & 0xFF);	outSISIDXREG(SISSR, 0x0D, (base >> 16) & 0xFF);	if(ivideo->sisvga_engine == SIS_315_VGA) {		setSISIDXREG(SISSR, 0x37, 0xFE, (base >> 24) & 0x01);	}        if(ivideo->currentvbflags & VB_DISPTYPE_DISP2) {		orSISIDXREG(SISPART1, ivideo->CRT2_write_enable, 0x01);        	outSISIDXREG(SISPART1, 0x06, (base & 0xFF));        	outSISIDXREG(SISPART1, 0x05, ((base >> 8) & 0xFF));        	outSISIDXREG(SISPART1, 0x04, ((base >> 16) & 0xFF));		if(ivideo->sisvga_engine == SIS_315_VGA) {			setSISIDXREG(SISPART1, 0x02, 0x7F, ((base >> 24) & 0x01) << 7);		}        }	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/sis_main.c/clean/drivers/video/sis/sis_main.c