outSISIDXREG(SISSR,0x05,0x86); 
outSISIDXREG(SISSR, 0x05, 0x86); 
sisfb_post_setmode(struct sis_video_info *ivideo){	BOOLEAN crt1isoff = FALSE;	BOOLEAN doit = TRUE;#if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315)	u8 reg;#endif#ifdef CONFIG_FB_SIS_315	u8 reg1;#endif	outSISIDXREG(SISSR,0x05,0x86);#ifdef CONFIG_FB_SIS_315	sisfb_fixup_SR11(ivideo);#endif	/* Now we actually HAVE changed the display mode */        ivideo->modechanged = 1;	/* We can't switch off CRT1 if bridge is in slave mode */	if(ivideo->vbflags & VB_VIDEOBRIDGE) {		if(sisfb_bridgeisslave(ivideo)) doit = FALSE;	} else ivideo->sisfb_crt1off = 0;#ifdef CONFIG_FB_SIS_300	if(ivideo->sisvga_engine == SIS_300_VGA) {	   if((ivideo->sisfb_crt1off) && (doit)) {	        crt1isoff = TRUE;		reg = 0x00;	   } else {	        crt1isoff = FALSE;		reg = 0x80;	   }	   setSISIDXREG(SISCR, 0x17, 0x7f, reg);	}#endif#ifdef CONFIG_FB_SIS_315	if(ivideo->sisvga_engine == SIS_315_VGA) {	   if((ivideo->sisfb_crt1off) && (doit)) {	        crt1isoff = TRUE;		reg  = 0x40;		reg1 = 0xc0;	   } else {	        crt1isoff = FALSE;		reg  = 0x00;		reg1 = 0x00;	   }	   setSISIDXREG(SISCR, ivideo->SiS_Pr.SiS_MyCR63, ~0x40, reg);	   setSISIDXREG(SISSR, 0x1f, ~0xc0, reg1);	}#endif	if(crt1isoff) {	   ivideo->currentvbflags &= ~VB_DISPTYPE_CRT1;	   ivideo->currentvbflags |= VB_SINGLE_MODE;	} else {	   ivideo->currentvbflags |= VB_DISPTYPE_CRT1;	   if(ivideo->currentvbflags & VB_DISPTYPE_CRT2) {	  	ivideo->currentvbflags |= VB_MIRROR_MODE;	   } else {	 	ivideo->currentvbflags |= VB_SINGLE_MODE;	   }	}        andSISIDXREG(SISSR, IND_SIS_RAMDAC_CONTROL, ~0x04);	if(ivideo->currentvbflags & CRT2_TV) {	   if(ivideo->vbflags & VB_SISBRIDGE) {	      inSISIDXREG(SISPART2,0x1f,ivideo->p2_1f);	      inSISIDXREG(SISPART2,0x20,ivideo->p2_20);	      inSISIDXREG(SISPART2,0x2b,ivideo->p2_2b);	      inSISIDXREG(SISPART2,0x42,ivideo->p2_42);	      inSISIDXREG(SISPART2,0x43,ivideo->p2_43);	      inSISIDXREG(SISPART2,0x01,ivideo->p2_01);	      inSISIDXREG(SISPART2,0x02,ivideo->p2_02);	   } else if(ivideo->vbflags & VB_CHRONTEL) {	      if(ivideo->chronteltype == 1) {	         ivideo->tvx = SiS_GetCH700x(&ivideo->SiS_Pr, 0x0a);	         ivideo->tvx |= (((SiS_GetCH700x(&ivideo->SiS_Pr, 0x08) & 0x02) >> 1) << 8);	         ivideo->tvy = SiS_GetCH700x(&ivideo->SiS_Pr, 0x0b);	         ivideo->tvy |= ((SiS_GetCH700x(&ivideo->SiS_Pr, 0x08) & 0x01) << 8); 	      }	   }	}	if(ivideo->tvxpos) {   	   sisfb_set_TVxposoffset(ivideo, ivideo->tvxpos);	}	if(ivideo->tvypos) {   	   sisfb_set_TVyposoffset(ivideo, ivideo->tvypos);	}	if((ivideo->currentvbflags & CRT2_TV) && (ivideo->vbflags & VB_301)) {  /* Set filter for SiS301 */	   	unsigned char filter_tb = 0;		switch (ivideo->video_width) {		   case 320:			filter_tb = (ivideo->vbflags & TV_NTSC) ? 4 : 12;			break;		   case 640:			filter_tb = (ivideo->vbflags & TV_NTSC) ? 5 : 13;			break;		   case 720:			filter_tb = (ivideo->vbflags & TV_NTSC) ? 6 : 14;			break;		   case 400:		   case 800:			filter_tb = (ivideo->vbflags & TV_NTSC) ? 7 : 15;			break;		   default:			ivideo->sisfb_filter = -1;			break;		}		orSISIDXREG(SISPART1, ivideo->CRT2_write_enable, 0x01);		if(ivideo->vbflags & TV_NTSC) {		        andSISIDXREG(SISPART2, 0x3a, 0x1f);			if (ivideo->vbflags & TV_SVIDEO) {			        andSISIDXREG(SISPART2, 0x30, 0xdf);			} else if (ivideo->vbflags & TV_AVIDEO) {			        orSISIDXREG(SISPART2, 0x30, 0x20);				switch (ivideo->video_width) {				case 640:				        outSISIDXREG(SISPART2, 0x35, 0xEB);					outSISIDXREG(SISPART2, 0x36, 0x04);					outSISIDXREG(SISPART2, 0x37, 0x25);					outSISIDXREG(SISPART2, 0x38, 0x18);					break;				case 720:					outSISIDXREG(SISPART2, 0x35, 0xEE);					outSISIDXREG(SISPART2, 0x36, 0x0C);					outSISIDXREG(SISPART2, 0x37, 0x22);					outSISIDXREG(SISPART2, 0x38, 0x08);					break;				case 400:				case 800:					outSISIDXREG(SISPART2, 0x35, 0xEB);					outSISIDXREG(SISPART2, 0x36, 0x15);					outSISIDXREG(SISPART2, 0x37, 0x25);					outSISIDXREG(SISPART2, 0x38, 0xF6);					break;				}			}		} else if(ivideo->vbflags & TV_PAL) {			andSISIDXREG(SISPART2, 0x3A, 0x1F);			if (ivideo->vbflags & TV_SVIDEO) {			        andSISIDXREG(SISPART2, 0x30, 0xDF);			} else if (ivideo->vbflags & TV_AVIDEO) {			        orSISIDXREG(SISPART2, 0x30, 0x20);				switch (ivideo->video_width) {				case 640:					outSISIDXREG(SISPART2, 0x35, 0xF1);					outSISIDXREG(SISPART2, 0x36, 0xF7);					outSISIDXREG(SISPART2, 0x37, 0x1F);					outSISIDXREG(SISPART2, 0x38, 0x32);					break;				case 720:					outSISIDXREG(SISPART2, 0x35, 0xF3);					outSISIDXREG(SISPART2, 0x36, 0x00);					outSISIDXREG(SISPART2, 0x37, 0x1D);					outSISIDXREG(SISPART2, 0x38, 0x20);					break;				case 400:				case 800:					outSISIDXREG(SISPART2, 0x35, 0xFC);					outSISIDXREG(SISPART2, 0x36, 0xFB);					outSISIDXREG(SISPART2, 0x37, 0x14);					outSISIDXREG(SISPART2, 0x38, 0x2A);					break;				}			}		}		if((ivideo->sisfb_filter >= 0) && (ivideo->sisfb_filter <= 7)) {		   outSISIDXREG(SISPART2,0x35,(sis_TV_filter[filter_tb].filter[ivideo->sisfb_filter][0]));		   outSISIDXREG(SISPART2,0x36,(sis_TV_filter[filter_tb].filter[ivideo->sisfb_filter][1]));		   outSISIDXREG(SISPART2,0x37,(sis_TV_filter[filter_tb].filter[ivideo->sisfb_filter][2]));		   outSISIDXREG(SISPART2,0x38,(sis_TV_filter[filter_tb].filter[ivideo->sisfb_filter][3]));		}	  	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/sis_main.c/clean/drivers/video/sis/sis_main.c