if(SiS_Pr->SiS_LCDInfo & LCDPass11) tempbx = 7; 
if(SiS_Pr->SiS_LCDInfo & LCDPass11) tempbx = 30; 
SiS_GetCRT2Ptr(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex,	       USHORT RefreshRateTableIndex,USHORT *CRT2Index,USHORT *ResIndex,	       PSIS_HW_INFO HwInfo){  USHORT tempbx=0,tempal=0,resinfo=0;  if(ModeNo <= 0x13) {     tempal = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;  } else {     tempal = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;     resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;  }  if((SiS_Pr->SiS_VBType & VB_SISVB) && (SiS_Pr->SiS_IF_DEF_LVDS == 0)) {     if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {                            /* LCD */        tempbx = SiS_Pr->SiS_LCDResInfo;	if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) tempbx += 32;	if(SiS_Pr->SiS_LCDResInfo == Panel_1680x1050) {	   if     (resinfo == SIS_RI_1280x800)  tempal =  9;	   else if(resinfo == SIS_RI_1400x1050) tempal = 11;	} else if((SiS_Pr->SiS_LCDResInfo == Panel_1280x800) ||	          (SiS_Pr->SiS_LCDResInfo == Panel_1280x800_2)) {	   if     (resinfo == SIS_RI_1280x768)  tempal =  9;	}  	if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {	   /* Pass 1:1 only (center-screen handled outside) */	   /* This is never called for the panel's native resolution */	   /* since Pass1:1 will not be set in this case */	   tempbx = 100;	   if(ModeNo >= 0x13) {	      tempal = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC_NS;	   }	}#ifdef SIS315H	if(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) {	   if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) {	      if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) {	         tempbx = 200;	         if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) tempbx++;	      }	   }	}#endif     } else {						  	/* TV */     	if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {           /* if(SiS_Pr->SiS_VGAVDE > 480) SiS_Pr->SiS_TVMode &= (~TVSetTVSimuMode); */           tempbx = 2;           if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) {	      tempbx = 13;              if(!(SiS_Pr->SiS_TVMode & TVSetTVSimuMode)) tempbx = 14;           }	} else if(SiS_Pr->SiS_VBInfo & SetCRT2ToYPbPr525750) {	   if(SiS_Pr->SiS_TVMode & TVSetYPbPr750p)      tempbx = 7;	   else if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) tempbx = 6;	   else 					tempbx = 5;	   if(SiS_Pr->SiS_TVMode & TVSetTVSimuMode)     tempbx += 5;       	} else {           if(SiS_Pr->SiS_TVMode & TVSetPAL) 		tempbx = 3;           else 					tempbx = 4;           if(SiS_Pr->SiS_TVMode & TVSetTVSimuMode) 	tempbx += 5;       	}     }     tempal &= 0x3F;     if(ModeNo > 0x13) {        if(SiS_Pr->SiS_VBInfo & SetCRT2ToTVNoHiVision) {      	   if(tempal == 6) tempal = 7;           if((resinfo == SIS_RI_720x480) ||	      (resinfo == SIS_RI_720x576) ||	      (resinfo == SIS_RI_768x576)) {	      tempal = 6;	      if(SiS_Pr->SiS_TVMode & (TVSetPAL | TVSetPALN)) {	         if(resinfo == SIS_RI_720x480) tempal = 9;	      }	   }	   if(SiS_Pr->SiS_VBInfo & SetCRT2ToYPbPr525750) {              if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) {	         if(resinfo == SIS_RI_1024x768) tempal = 8;	      }	      if(SiS_Pr->SiS_TVMode & TVSetYPbPr750p) {		 if((resinfo == SIS_RI_720x576) ||	            (resinfo == SIS_RI_768x576)) {	            tempal = 8;	         }		 if(resinfo == SIS_RI_1280x720) tempal = 9;	      }	   }	}     }     *CRT2Index = tempbx;     *ResIndex = tempal;  } else {   /* LVDS, 301B-DH (if running on LCD) */     tempbx = 0;     if((SiS_Pr->SiS_IF_DEF_CH70xx) && (SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) {        tempbx = 10;	if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) tempbx += 1;        if(SiS_Pr->SiS_TVMode & TVSetPAL) {	   tempbx += 2;	   if(SiS_Pr->SiS_ModeType > ModeVGA) {	      if(SiS_Pr->SiS_CHSOverScan) tempbx = 99;	   }	   if(SiS_Pr->SiS_TVMode & TVSetPALM) {	      tempbx = 90;	      if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) tempbx += 1;	   } else if(SiS_Pr->SiS_TVMode & TVSetPALN) {	      tempbx = 92;	      if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) tempbx += 1;	   }        }     } else {        switch(SiS_Pr->SiS_LCDResInfo) {	case Panel_640x480:   tempbx = 6;  break;	case Panel_640x480_2:	case Panel_640x480_3: tempbx = 30; break;	case Panel_800x600:   tempbx = 0;  break;	case Panel_1024x600:  tempbx = 15; break;	case Panel_1024x768:  tempbx = 2;  break;	case Panel_1152x768:  tempbx = 17; break;	case Panel_1280x768:  tempbx = 18; break;	case Panel_1280x1024: tempbx = 4;  break;	case Panel_1400x1050: tempbx = 8;  break;	case Panel_1600x1200: tempbx = 21; break;	case Panel_Barco1366: tempbx = 80; break;	}	switch(SiS_Pr->SiS_LCDResInfo) {	case Panel_640x480:	case Panel_640x480_2:	case Panel_640x480_3:	   break;	default:	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx++;	}	if(SiS_Pr->SiS_LCDInfo & LCDPass11) tempbx = 7;	if(SiS_Pr->SiS_CustomT == CUT_BARCO1024) {	   tempbx = 82;	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx++;	} else if(SiS_Pr->SiS_CustomT == CUT_PANEL848) {	   tempbx = 84;	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx++;	}	if((SiS_Pr->SiS_CustomT != CUT_BARCO1366) &&           (SiS_Pr->SiS_CustomT != CUT_PANEL848)) {           if((SiS_Pr->SiS_LCDInfo & DontExpandLCD) &&	      (!(SiS_Pr->SiS_LCDInfo & LCDPass11))) {              tempal = 0;	   }        }     }     (*CRT2Index) = tempbx;     (*ResIndex) = tempal & 0x1F;  }}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/init301.c/clean/drivers/video/sis/init301.c