static void __devinit sisfb_sense_crt1(struct sis_video_info *ivideo) 
sisfb_sense_crt1(struct sis_video_info *ivideo) 
static void __devinit sisfb_sense_crt1(struct sis_video_info *ivideo){    BOOLEAN mustwait = FALSE;    u8  sr1F, cr17;#ifdef CONFIG_FB_SIS_315    u8  cr63=0;#endif    u16 temp = 0xffff;    int i;    inSISIDXREG(SISSR,0x1F,sr1F);    orSISIDXREG(SISSR,0x1F,0x04);    andSISIDXREG(SISSR,0x1F,0x3F);    if(sr1F & 0xc0) mustwait = TRUE;#ifdef CONFIG_FB_SIS_315    if(ivideo->sisvga_engine == SIS_315_VGA) {       inSISIDXREG(SISCR,ivideo->SiS_Pr.SiS_MyCR63,cr63);       cr63 &= 0x40;       andSISIDXREG(SISCR,ivideo->SiS_Pr.SiS_MyCR63,0xBF);    }#endif    inSISIDXREG(SISCR,0x17,cr17);    cr17 &= 0x80;    if(!cr17) {       orSISIDXREG(SISCR,0x17,0x80);       mustwait = TRUE;       outSISIDXREG(SISSR, 0x00, 0x01);       outSISIDXREG(SISSR, 0x00, 0x03);    }    if(mustwait) {       for(i=0; i < 10; i++) sisfbwaitretracecrt1(ivideo);    }#ifdef CONFIG_FB_SIS_315    if(ivideo->chip >= SIS_330) {       andSISIDXREG(SISCR,0x32,~0x20);       if(ivideo->chip >= SIS_340) {          outSISIDXREG(SISCR, 0x57, 0x4a);       } else {          outSISIDXREG(SISCR, 0x57, 0x5f);       }       orSISIDXREG(SISCR, 0x53, 0x02);       while((inSISREG(SISINPSTAT)) & 0x01)    break;       while(!((inSISREG(SISINPSTAT)) & 0x01)) break;       if((inSISREG(SISMISCW)) & 0x10) temp = 1;       andSISIDXREG(SISCR, 0x53, 0xfd);       andSISIDXREG(SISCR, 0x57, 0x00);    }#endif    if(temp == 0xffff) {       i = 3;       do {          temp = SiS_HandleDDC(&ivideo->SiS_Pr, ivideo->vbflags, ivideo->sisvga_engine, 0, 0, NULL);       } while(((temp == 0) || (temp == 0xffff)) && i--);       if((temp == 0) || (temp == 0xffff)) {          if(sisfb_test_DDC1(ivideo)) temp = 1;       }    }    if((temp) && (temp != 0xffff)) {       orSISIDXREG(SISCR,0x32,0x20);    }#ifdef CONFIG_FB_SIS_315    if(ivideo->sisvga_engine == SIS_315_VGA) {       setSISIDXREG(SISCR,ivideo->SiS_Pr.SiS_MyCR63,0xBF,cr63);    }#endif    setSISIDXREG(SISCR,0x17,0x7F,cr17);    outSISIDXREG(SISSR,0x1F,sr1F);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/sis_main.c/clean/drivers/video/sis/sis_main.c