if(!(VBFlags & VB_301)) { 
if(!(VBFlags2 & VB2_301)) { 
SiS_InitDDCRegs(SiS_Private *SiS_Pr, unsigned long VBFlags, int VGAEngine,                USHORT adaptnum, USHORT DDCdatatype, BOOLEAN checkcr32){     unsigned char ddcdtype[] = { 0xa0, 0xa0, 0xa0, 0xa2, 0xa6 };     unsigned char flag, cr32;     USHORT        temp = 0, myadaptnum = adaptnum;     if(adaptnum != 0) {        if(!(VBFlags & (VB_301|VB_301B|VB_301C|VB_302B))) return 0xFFFF;	if((VBFlags & VB_30xBDH) && (adaptnum == 1)) return 0xFFFF;     }	          /* adapternum for SiS bridges: 0 = CRT1, 1 = LCD, 2 = VGA2 */          SiS_Pr->SiS_ChrontelInit = 0;   /* force re-detection! */     SiS_Pr->SiS_DDC_SecAddr = 0;     SiS_Pr->SiS_DDC_DeviceAddr = ddcdtype[DDCdatatype];     SiS_Pr->SiS_DDC_Port = SiS_Pr->SiS_P3c4;     SiS_Pr->SiS_DDC_Index = 0x11;     flag = 0xff;     cr32 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x32);#if 0     if(VBFlags & VB_SISBRIDGE) {	if(myadaptnum == 0) {	   if(!(cr32 & 0x20)) {	      myadaptnum = 2;	      if(!(cr32 & 0x10)) {	         myadaptnum = 1;		 if(!(cr32 & 0x08)) {		    myadaptnum = 0;		 }	      }	   }        }     }#endif     if(VGAEngine == SIS_300_VGA) {		/* 300 series */	        if(myadaptnum != 0) {	   flag = 0;	   if(VBFlags & VB_SISBRIDGE) {	      SiS_Pr->SiS_DDC_Port = SiS_Pr->SiS_Part4Port;              SiS_Pr->SiS_DDC_Index = 0x0f;	   }        }	if(!(VBFlags & VB_301)) {	   if((cr32 & 0x80) && (checkcr32)) {              if(myadaptnum >= 1) {	         if(!(cr32 & 0x08)) {	             myadaptnum = 1;		     if(!(cr32 & 0x10)) return 0xFFFF;                 }	      }	   }	}	temp = 4 - (myadaptnum * 2);	if(flag) temp = 0;     } else {						/* 315/330 series */     	/* here we simplify: 0 = CRT1, 1 = CRT2 (VGA, LCD) */	if(VBFlags & VB_SISBRIDGE) {	   if(myadaptnum == 2) {	      myadaptnum = 1;           }	}        if(myadaptnum == 1) {     	   flag = 0;	   if(VBFlags & VB_SISBRIDGE) {	      SiS_Pr->SiS_DDC_Port = SiS_Pr->SiS_Part4Port;              SiS_Pr->SiS_DDC_Index = 0x0f;	   }        }        if((cr32 & 0x80) && (checkcr32)) {           if(myadaptnum >= 1) {	      if(!(cr32 & 0x08)) {	         myadaptnum = 1;		 if(!(cr32 & 0x10)) return 0xFFFF;	      }	   }        }        temp = myadaptnum;        if(myadaptnum == 1) {           temp = 0;	   if(VBFlags & VB_LVDS) flag = 0xff;        }	if(flag) temp = 0;    }        SiS_Pr->SiS_DDC_Data = 0x02 << temp;    SiS_Pr->SiS_DDC_Clk  = 0x01 << temp;    SiS_SetupDDCN(SiS_Pr);#ifdef TWDEBUG    xf86DrvMsg(0, X_INFO, "DDC Port %x Index %x Shift %d\n",    		SiS_Pr->SiS_DDC_Port, SiS_Pr->SiS_DDC_Index, temp);#endif        return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/init301.c/clean/drivers/video/sis/init301.c