if(ROMAddr[0x220] & 0x40) { if(!(DelayTime & 0x01)) Delay = (USHORT)ROMAddr[0x225]; else 	    	       Delay = (USHORT)ROMAddr[0x226]; } } 
if(ROMAddr[0x220] & 0x40) { if(!(DelayTime & 0x01)) Delay = (unsigned short)ROMAddr[0x225]; else 	    	       Delay = (unsigned short)ROMAddr[0x226]; } } 
SiS_PanelDelay(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT DelayTime){#if defined(SIS300) || defined(SIS315H)  UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;  USHORT PanelID, DelayIndex, Delay=0;#endif  if(HwInfo->jChipType < SIS_315H) {#ifdef SIS300      PanelID = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36);      if(SiS_Pr->SiS_VBType & VB_SISVB) {         if(SiS_Pr->SiS_VBType & VB_SIS301) PanelID &= 0xf7;         if(!(SiS_GetReg(SiS_Pr->SiS_P3c4,0x18) & 0x10)) PanelID = 0x12;      }      DelayIndex = PanelID >> 4;      if((DelayTime >= 2) && ((PanelID & 0x0f) == 1))  {         Delay = 3;      } else {         if(DelayTime >= 2) DelayTime -= 2;         if(!(DelayTime & 0x01)) {       	    Delay = SiS_Pr->SiS_PanelDelayTbl[DelayIndex].timer[0];         } else {       	    Delay = SiS_Pr->SiS_PanelDelayTbl[DelayIndex].timer[1];         }	 if(SiS_Pr->SiS_UseROM) {            if(ROMAddr[0x220] & 0x40) {               if(!(DelayTime & 0x01)) Delay = (USHORT)ROMAddr[0x225];               else 	    	       Delay = (USHORT)ROMAddr[0x226];            }         }      }      SiS_ShortDelay(SiS_Pr, Delay);#endif  /* SIS300 */   } else {#ifdef SIS315H      if((HwInfo->jChipType >= SIS_661)    ||         (HwInfo->jChipType <= SIS_315PRO) ||	 (HwInfo->jChipType == SIS_330)    ||	 (SiS_Pr->SiS_ROMNew)) {         if(!(DelayTime & 0x01)) {	    SiS_DDC2Delay(SiS_Pr, 0x1000);         } else {	    SiS_DDC2Delay(SiS_Pr, 0x4000);         }      } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* ||         (SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||	 (SiS_Pr->SiS_CustomT == CUT_CLEVO1400) */ ) {			/* 315 series, LVDS; Special */         if(SiS_Pr->SiS_IF_DEF_CH70xx == 0) {            PanelID = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36);	    if(SiS_Pr->SiS_CustomT == CUT_CLEVO1400) {	       if(!(SiS_GetReg(SiS_Pr->SiS_P3c4,0x1b) & 0x10)) PanelID = 0x12;	    }	    if(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) {	       DelayIndex = PanelID & 0x0f;	    } else {	       DelayIndex = PanelID >> 4;	    }	    if((DelayTime >= 2) && ((PanelID & 0x0f) == 1))  {               Delay = 3;            } else {               if(DelayTime >= 2) DelayTime -= 2;               if(!(DelayTime & 0x01)) {       		  Delay = SiS_Pr->SiS_PanelDelayTblLVDS[DelayIndex].timer[0];               } else {       		  Delay = SiS_Pr->SiS_PanelDelayTblLVDS[DelayIndex].timer[1];               }	       if((SiS_Pr->SiS_UseROM) && (!(SiS_Pr->SiS_ROMNew))) {                  if(ROMAddr[0x13c] & 0x40) {                     if(!(DelayTime & 0x01)) {	    	        Delay = (USHORT)ROMAddr[0x17e];                     } else {	    	        Delay = (USHORT)ROMAddr[0x17f];                     }                  }               }            }	    SiS_ShortDelay(SiS_Pr, Delay);	 }      } else if(SiS_Pr->SiS_VBType & VB_SISVB) {			/* 315 series, all bridges */	 DelayIndex = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) >> 4;         if(!(DelayTime & 0x01)) {       	    Delay = SiS_Pr->SiS_PanelDelayTbl[DelayIndex].timer[0];         } else {       	    Delay = SiS_Pr->SiS_PanelDelayTbl[DelayIndex].timer[1];         }	 Delay <<= 8;	 SiS_DDC2Delay(SiS_Pr, Delay);      }#endif /* SIS315H */   }}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/init301.c/clean/drivers/video/sis/init301.c