SiS_HandleDDC(SiS_Private *SiS_Pr, unsigned long VBFlags, int VGAEngine, USHORT adaptnum, USHORT DDCdatatype, unsigned char *buffer) 
SiS_HandleDDC(struct SiS_Private *SiS_Pr, unsigned int VBFlags, int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype, unsigned char *buffer, unsigned int VBFlags2) 
SiS_HandleDDC(SiS_Private *SiS_Pr, unsigned long VBFlags, int VGAEngine,              USHORT adaptnum, USHORT DDCdatatype, unsigned char *buffer){   unsigned char sr1f,cr17=1;   USHORT result;   if(adaptnum > 2) return 0xFFFF;   if(DDCdatatype > 4) return 0xFFFF;   if((!(VBFlags & VB_VIDEOBRIDGE)) && (adaptnum > 0)) return 0xFFFF;   if(SiS_InitDDCRegs(SiS_Pr, VBFlags, VGAEngine, adaptnum, DDCdatatype, FALSE) == 0xFFFF) return 0xFFFF;   sr1f = SiS_GetReg(SiS_Pr->SiS_P3c4,0x1f);   SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x1f,0x3f,0x04);   if(VGAEngine == SIS_300_VGA) {      cr17 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x17) & 0x80;      if(!cr17) {         SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x17,0x80);         SiS_SetReg(SiS_Pr->SiS_P3c4,0x00,0x01);         SiS_SetReg(SiS_Pr->SiS_P3c4,0x00,0x03);      }   }   if((sr1f) || (!cr17)) {      SiS_WaitRetrace1(SiS_Pr);      SiS_WaitRetrace1(SiS_Pr);      SiS_WaitRetrace1(SiS_Pr);      SiS_WaitRetrace1(SiS_Pr);   }   if(DDCdatatype == 0) {      result = SiS_ProbeDDC(SiS_Pr);   } else {      result = SiS_ReadDDC(SiS_Pr, DDCdatatype, buffer);      if((!result) && (DDCdatatype == 1)) {         if((buffer[0] == 0x00) && (buffer[1] == 0xff) &&	    (buffer[2] == 0xff) && (buffer[3] == 0xff) &&	    (buffer[4] == 0xff) && (buffer[5] == 0xff) &&	    (buffer[6] == 0xff) && (buffer[7] == 0x00) &&	    (buffer[0x12] == 1)) {	    if(adaptnum == 1) {	       if(!(buffer[0x14] & 0x80)) result = 0xFFFE;	    } else {	       if(buffer[0x14] & 0x80)    result = 0xFFFE;	    }	 }      }   }   SiS_SetReg(SiS_Pr->SiS_P3c4,0x1f,sr1f);   if(VGAEngine == SIS_300_VGA) {      SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x17,0x7f,cr17);   }   return result;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/init301.c/clean/drivers/video/sis/init301.c