if(((ivideo->sisvga_engine == SIS_300_VGA) && (ivideo->vbflags & (VB_301|VB_30xBDH|VB_LVDS))) || ((ivideo->sisvga_engine == SIS_315_VGA) && ((ivideo->vbflags & (VB_LVDS | VB_CHRONTEL)) == VB_LVDS))) { setSISIDXREG(SISSR, 0x11, ~0x0c, sr11); } 
if(((ivideo->sisvga_engine == SIS_300_VGA) && (ivideo->vbflags2 & (VB2_301|VB2_30xBDH|VB2_LVDS))) || ((ivideo->sisvga_engine == SIS_315_VGA) && ((ivideo->vbflags2 & (VB2_LVDS | VB2_CHRONTEL)) == VB2_LVDS))) { setSISIDXREG(SISSR, 0x11, ~0x0c, sr11); } 
sisfb_myblank(struct sis_video_info *ivideo, int blank){   u8 sr01, sr11, sr1f, cr63=0, p2_0, p1_13;   BOOLEAN backlight = TRUE;   switch(blank) {   case FB_BLANK_UNBLANK:	/* on */      sr01  = 0x00;      sr11  = 0x00;      sr1f  = 0x00;      cr63  = 0x00;      p2_0  = 0x20;      p1_13 = 0x00;      backlight = TRUE;      break;   case FB_BLANK_NORMAL:	/* blank */      sr01  = 0x20;      sr11  = 0x00;      sr1f  = 0x00;      cr63  = 0x00;      p2_0  = 0x20;      p1_13 = 0x00;      backlight = TRUE;      break;   case FB_BLANK_VSYNC_SUSPEND:	/* no vsync */      sr01  = 0x20;      sr11  = 0x08;      sr1f  = 0x80;      cr63  = 0x40;      p2_0  = 0x40;      p1_13 = 0x80;      backlight = FALSE;      break;   case FB_BLANK_HSYNC_SUSPEND:	/* no hsync */      sr01  = 0x20;      sr11  = 0x08;      sr1f  = 0x40;      cr63  = 0x40;      p2_0  = 0x80;      p1_13 = 0x40;      backlight = FALSE;      break;   case FB_BLANK_POWERDOWN:	/* off */      sr01  = 0x20;      sr11  = 0x08;      sr1f  = 0xc0;      cr63  = 0x40;      p2_0  = 0xc0;      p1_13 = 0xc0;      backlight = FALSE;      break;   default:      return 1;   }   if(ivideo->currentvbflags & VB_DISPTYPE_CRT1) {      if( (!ivideo->sisfb_thismonitor.datavalid) ||          ((ivideo->sisfb_thismonitor.datavalid) &&           (ivideo->sisfb_thismonitor.feature & 0xe0))) {	 if(ivideo->sisvga_engine == SIS_315_VGA) {	    setSISIDXREG(SISCR, ivideo->SiS_Pr.SiS_MyCR63, 0xbf, cr63);	 }	 if(!(sisfb_bridgeisslave(ivideo))) {	    setSISIDXREG(SISSR, 0x01, ~0x20, sr01);	    setSISIDXREG(SISSR, 0x1f, 0x3f, sr1f);	 }      }   }   if(ivideo->currentvbflags & CRT2_LCD) {      if(ivideo->vbflags & (VB_301LV|VB_302LV|VB_302ELV)) {	 if(backlight) {	    SiS_SiS30xBLOn(&ivideo->SiS_Pr, &ivideo->sishw_ext);	 } else {	    SiS_SiS30xBLOff(&ivideo->SiS_Pr, &ivideo->sishw_ext);	 }      } else if(ivideo->sisvga_engine == SIS_315_VGA) {	 if(ivideo->vbflags & VB_CHRONTEL) {	    if(backlight) {	       SiS_Chrontel701xBLOn(&ivideo->SiS_Pr,&ivideo->sishw_ext);	    } else {	       SiS_Chrontel701xBLOff(&ivideo->SiS_Pr);	    }	 }      }      if(((ivideo->sisvga_engine == SIS_300_VGA) &&          (ivideo->vbflags & (VB_301|VB_30xBDH|VB_LVDS))) ||         ((ivideo->sisvga_engine == SIS_315_VGA) &&          ((ivideo->vbflags & (VB_LVDS | VB_CHRONTEL)) == VB_LVDS))) {          setSISIDXREG(SISSR, 0x11, ~0x0c, sr11);      }      if(ivideo->sisvga_engine == SIS_300_VGA) {         if((ivideo->vbflags & (VB_301B|VB_301C|VB_302B)) &&            (!(ivideo->vbflags & VB_30xBDH))) {	    setSISIDXREG(SISPART1, 0x13, 0x3f, p1_13);	 }      } else if(ivideo->sisvga_engine == SIS_315_VGA) {         if((ivideo->vbflags & (VB_301B|VB_301C|VB_302B)) &&            (!(ivideo->vbflags & VB_30xBDH))) {	    setSISIDXREG(SISPART2, 0x00, 0x1f, p2_0);	 }      }   } else if(ivideo->currentvbflags & CRT2_VGA) {      if(ivideo->vbflags & (VB_301B|VB_301C|VB_302B)) {         setSISIDXREG(SISPART2, 0x00, 0x1f, p2_0);      }   }   return(0);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/sis_main.c/clean/drivers/video/sis/sis_main.c