if(!(SiS_Pr->SiS_VBType & VB_SISVB)) { if((SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) && (!(SiS_Pr->SiS_LCDInfo & LCDPass11))) { if((!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) || (SiS_Pr->SiS_SetFlag & SetDOSMode)) { SiS_Pr->SiS_HDE = SiS_Pr->PanelXRes; SiS_Pr->SiS_VDE = SiS_Pr->PanelYRes; if(SiS_Pr->SiS_CustomT == CUT_BARCO1366) { if(ResIndex < 0x08) { SiS_Pr->SiS_HDE = 1280; SiS_Pr->SiS_VDE = 1024; } } } 
if( (!(SiS_Pr->SiS_VBType & VB_SISVB)) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) && (!(SiS_Pr->SiS_LCDInfo & LCDPass11)) ) { if( (!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) || (SiS_Pr->SiS_SetFlag & SetDOSMode) ) { SiS_Pr->SiS_HDE = SiS_Pr->PanelXRes; SiS_Pr->SiS_VDE = SiS_Pr->PanelYRes; #ifdef SIS300 if(SiS_Pr->SiS_CustomT == CUT_BARCO1366) { if(ResIndex < 0x08) { SiS_Pr->SiS_HDE = 1280; SiS_Pr->SiS_VDE = 1024; } } #endif 
SiS_GetCRT2DataLVDS(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex,                    USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo){   USHORT CRT2Index, ResIndex;   const SiS_LVDSDataStruct *LVDSData = NULL;   SiS_GetCRT2ResInfo(SiS_Pr, ModeNo, ModeIdIndex, HwInfo);   if(SiS_Pr->SiS_VBType & VB_SISVB) {      SiS_Pr->SiS_RVBHCMAX  = 1;      SiS_Pr->SiS_RVBHCFACT = 1;      SiS_Pr->SiS_NewFlickerMode = 0;      SiS_Pr->SiS_RVBHRS = 50;      SiS_Pr->SiS_RY1COE = 0;      SiS_Pr->SiS_RY2COE = 0;      SiS_Pr->SiS_RY3COE = 0;      SiS_Pr->SiS_RY4COE = 0;   }   if((SiS_Pr->SiS_VBType & VB_SISVB) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) {#ifdef SIS315H      if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {         if(SiS_Pr->SiS_LCDInfo & LCDPass11) {	    if(SiS_Pr->UseCustomMode) {	       SiS_Pr->SiS_VGAHT = SiS_Pr->SiS_HT = SiS_Pr->CHTotal;	       SiS_Pr->SiS_VGAVT = SiS_Pr->SiS_VT = SiS_Pr->CVTotal;	    } else {	       if(ModeNo < 0x13) {	          ResIndex = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;	       } else {	          ResIndex = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC_NS;	       }	       SiS_Pr->SiS_VGAHT = SiS_Pr->SiS_NoScaleData[ResIndex].VGAHT;               SiS_Pr->SiS_VGAVT = SiS_Pr->SiS_NoScaleData[ResIndex].VGAVT;               SiS_Pr->SiS_HT    = SiS_Pr->SiS_NoScaleData[ResIndex].LCDHT;               SiS_Pr->SiS_VT    = SiS_Pr->SiS_NoScaleData[ResIndex].LCDVT;	    }	 } else {     	    SiS_Pr->SiS_VGAHT = SiS_Pr->SiS_HT = SiS_Pr->PanelHT;            SiS_Pr->SiS_VGAVT = SiS_Pr->SiS_VT = SiS_Pr->PanelVT;	 }      } else {	 /* This handles custom modes and custom panels */	 SiS_Pr->SiS_HDE = SiS_Pr->PanelXRes;         SiS_Pr->SiS_VDE = SiS_Pr->PanelYRes;         SiS_Pr->SiS_HT  = SiS_Pr->PanelHT;         SiS_Pr->SiS_VT  = SiS_Pr->PanelVT;	 SiS_Pr->SiS_VGAHT = SiS_Pr->PanelHT - (SiS_Pr->PanelXRes - SiS_Pr->SiS_VGAHDE);	 SiS_Pr->SiS_VGAVT = SiS_Pr->PanelVT - (SiS_Pr->PanelYRes - SiS_Pr->SiS_VGAVDE);      }      SiS_CalcLCDACRT1Timing(SiS_Pr,ModeNo,ModeIdIndex);#endif   } else {      /* 301BDH needs LVDS Data */      if((SiS_Pr->SiS_VBType & VB_NoLCD) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD)) {	 SiS_Pr->SiS_IF_DEF_LVDS = 1;      }      SiS_GetCRT2Ptr(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex,                     		&CRT2Index, &ResIndex, HwInfo);      /* 301BDH needs LVDS Data */      if((SiS_Pr->SiS_VBType & VB_NoLCD) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD)) {         SiS_Pr->SiS_IF_DEF_LVDS = 0;      }      switch (CRT2Index) {      	 case  0: LVDSData = SiS_Pr->SiS_LVDS800x600Data_1;    break;	 case  1: LVDSData = SiS_Pr->SiS_LVDS800x600Data_2;    break;      	 case  2: LVDSData = SiS_Pr->SiS_LVDS1024x768Data_1;   break;	 case  3: LVDSData = SiS_Pr->SiS_LVDS1024x768Data_2;   break;      	 case  4: LVDSData = SiS_Pr->SiS_LVDS1280x1024Data_1;  break;      	 case  5: LVDSData = SiS_Pr->SiS_LVDS1280x1024Data_2;  break;	 case  6: LVDSData = SiS_Pr->SiS_LVDS640x480Data_1;    break;         case  7: LVDSData = SiS_Pr->SiS_LVDSXXXxXXXData_1;    break;	 case  8: LVDSData = SiS_Pr->SiS_LVDS1400x1050Data_1;  break;	 case  9: LVDSData = SiS_Pr->SiS_LVDS1400x1050Data_2;  break;      	 case 10: LVDSData = SiS_Pr->SiS_CHTVUNTSCData;        break;      	 case 11: LVDSData = SiS_Pr->SiS_CHTVONTSCData;        break;      	 case 12: LVDSData = SiS_Pr->SiS_CHTVUPALData;         break;      	 case 13: LVDSData = SiS_Pr->SiS_CHTVOPALData;         break;      	 case 14: LVDSData = SiS_Pr->SiS_LVDS320x480Data_1;    break;	 case 15: LVDSData = SiS_Pr->SiS_LVDS1024x600Data_1;   break;	 case 16: LVDSData = SiS_Pr->SiS_LVDS1024x600Data_2;   break;	 case 17: LVDSData = SiS_Pr->SiS_LVDS1152x768Data_1;   break;	 case 18: LVDSData = SiS_Pr->SiS_LVDS1152x768Data_2;   break;	 case 19: LVDSData = SiS_Pr->SiS_LVDS1280x768Data_1;   break;	 case 20: LVDSData = SiS_Pr->SiS_LVDS1280x768Data_2;   break;	 case 21: LVDSData = SiS_Pr->SiS_LVDS1600x1200Data_1;  break;	 case 22: LVDSData = SiS_Pr->SiS_LVDS1600x1200Data_2;  break;	 case 30: LVDSData = SiS_Pr->SiS_LVDS640x480Data_2;    break;	 case 80: LVDSData = SiS_Pr->SiS_LVDSBARCO1366Data_1;  break;	 case 81: LVDSData = SiS_Pr->SiS_LVDSBARCO1366Data_2;  break;	 case 82: LVDSData = SiS_Pr->SiS_LVDSBARCO1024Data_1;  break;	 case 83: LVDSData = SiS_Pr->SiS_LVDSBARCO1024Data_2;  break;	 case 84: LVDSData = SiS_Pr->SiS_LVDS848x480Data_1;    break;	 case 85: LVDSData = SiS_Pr->SiS_LVDS848x480Data_2;    break;	 case 90: LVDSData = SiS_Pr->SiS_CHTVUPALMData;        break;      	 case 91: LVDSData = SiS_Pr->SiS_CHTVOPALMData;        break;      	 case 92: LVDSData = SiS_Pr->SiS_CHTVUPALNData;        break;      	 case 93: LVDSData = SiS_Pr->SiS_CHTVOPALNData;        break;	 case 99: LVDSData = SiS_Pr->SiS_CHTVSOPALData;	       break;  /* Super Overscan */	 default: LVDSData = SiS_Pr->SiS_LVDS1024x768Data_1;   break;      }      SiS_Pr->SiS_VGAHT = (LVDSData+ResIndex)->VGAHT;      SiS_Pr->SiS_VGAVT = (LVDSData+ResIndex)->VGAVT;      SiS_Pr->SiS_HT    = (LVDSData+ResIndex)->LCDHT;      SiS_Pr->SiS_VT    = (LVDSData+ResIndex)->LCDVT;      if(!(SiS_Pr->SiS_VBType & VB_SISVB)) {         if((SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) && (!(SiS_Pr->SiS_LCDInfo & LCDPass11))) {            if((!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) || (SiS_Pr->SiS_SetFlag & SetDOSMode)) {	       SiS_Pr->SiS_HDE = SiS_Pr->PanelXRes;               SiS_Pr->SiS_VDE = SiS_Pr->PanelYRes;	       if(SiS_Pr->SiS_CustomT == CUT_BARCO1366) {		  if(ResIndex < 0x08) {		     SiS_Pr->SiS_HDE = 1280;                     SiS_Pr->SiS_VDE = 1024;                  }               }            }         }      }   }}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/init301.c/clean/drivers/video/sis/init301.c