if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) { if(yres == 350) yres = 357; if(yres == 400) yres = 420; if(yres == 480) yres = 525; } } 
if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) { if(yres == 350) yres = 357; if(yres == 400) yres = 420; if(yres == 480) yres = 525; } } 
SiS_GetCRT2ResInfo(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex,                   PSIS_HW_INFO HwInfo){  USHORT xres,yres,modeflag=0,resindex;  if(SiS_Pr->UseCustomMode) {     xres = SiS_Pr->CHDisplay;     if(SiS_Pr->CModeFlag & HalfDCLK) xres *= 2;     SiS_Pr->SiS_VGAHDE = SiS_Pr->SiS_HDE = xres;     yres = SiS_Pr->CVDisplay;     if(SiS_Pr->CModeFlag & DoubleScanMode) yres *= 2;     SiS_Pr->SiS_VGAVDE = SiS_Pr->SiS_VDE = yres;     return;  }  resindex = SiS_GetResInfo(SiS_Pr,ModeNo,ModeIdIndex);  if(ModeNo <= 0x13) {     xres = SiS_Pr->SiS_StResInfo[resindex].HTotal;     yres = SiS_Pr->SiS_StResInfo[resindex].VTotal;  } else {     xres = SiS_Pr->SiS_ModeResInfo[resindex].HTotal;     yres = SiS_Pr->SiS_ModeResInfo[resindex].VTotal;     modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;  }  if(!SiS_Pr->SiS_IF_DEF_DSTN && !SiS_Pr->SiS_IF_DEF_FSTN) {     if((HwInfo->jChipType >= SIS_315H) && (SiS_Pr->SiS_IF_DEF_LVDS == 1)) {        if((ModeNo != 0x03) && (SiS_Pr->SiS_SetFlag & SetDOSMode)) {           if(yres == 350) yres = 400;        }        if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x3a) & 0x01) { 	   if(ModeNo == 0x12) yres = 400;        }     }     if(modeflag & HalfDCLK)       xres *= 2;     if(modeflag & DoubleScanMode) yres *= 2;  }  if((SiS_Pr->SiS_VBType & VB_SISVB) && (!(SiS_Pr->SiS_VBType & VB_NoLCD))) {#if 0        if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCDA | SetCRT2ToLCD | SetCRT2ToHiVision)) {           if(xres == 720) xres = 640;	}#endif	if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {	   switch(SiS_Pr->SiS_LCDResInfo) {	   case Panel_1024x768:	      if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) {                 if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) {          	    if(yres == 350) yres = 357;          	    if(yres == 400) yres = 420;            	    if(yres == 480) yres = 525;        	 }      	      }	      break;	   case Panel_1280x1024:	      if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) {		 /* BIOS bug - does this regardless of scaling */      		 if(yres == 400) yres = 405;	      }      	      if(yres == 350) yres = 360;      	      if(SiS_Pr->SiS_SetFlag & LCDVESATiming) {                 if(yres == 360) yres = 375;      	      }	      break;	   case Panel_1600x1200:	      if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) {        	 if(yres == 1024) yres = 1056;      	      }	      break;	   }	}  } else {     if(SiS_Pr->SiS_VBType & VB_SISVB) {        if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToHiVision)) {           if(xres == 720) xres = 640;	}     } else if(xres == 720) xres = 640;     if(SiS_Pr->SiS_SetFlag & SetDOSMode) {	yres = 400;        if(HwInfo->jChipType >= SIS_315H) {           if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x17) & 0x80) yres = 480;        } else {           if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x13) & 0x80) yres = 480;        }        if(SiS_Pr->SiS_IF_DEF_DSTN || SiS_Pr->SiS_IF_DEF_FSTN)  yres = 480;     }  }  SiS_Pr->SiS_VGAHDE = SiS_Pr->SiS_HDE = xres;  SiS_Pr->SiS_VGAVDE = SiS_Pr->SiS_VDE = yres;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/init301.c/clean/drivers/video/sis/init301.c