(*ResIndex) &= 0x1F; (*PanelIndex) = 0;  if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) { if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) { (*PanelIndex) = 50; if((SiS_Pr->SiS_TVMode & TVSetPAL) && (!(SiS_Pr->SiS_TVMode & TVSetPALM))) (*PanelIndex) += 2; if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) (*PanelIndex) += 1; /* Nothing special needed for SOverscan    */ /* PALM uses NTSC data, PALN uses PAL data */ } }  if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) { *PanelIndex = SiS_Pr->SiS_LCDTypeInfo; if(HwInfo->jChipType >= SIS_661) { /* As long as we don's use the BIOS tables, we * need to convert the TypeInfo as for 315 series */ (*PanelIndex) = SiS_Pr->SiS_LCDResInfo - 1; } if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) { (*PanelIndex) += 16; if(SiS_Pr->SiS_LCDInfo & LCDPass11) { (*PanelIndex) = 32; if(modeflag & HalfDCLK) (*PanelIndex)++; } } }  if(SiS_Pr->SiS_SetFlag & SetDOSMode) { if(SiS_Pr->SiS_LCDResInfo != Panel_640x480) { (*ResIndex) = 7; if(HwInfo->jChipType < SIS_315H) { if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x13) & 0x80) (*ResIndex)++; } } } 
if(SiS_Pr->ChipType < SIS_315H) { if(SiS_Pr->SiS_LCDTypeInfo == 4) { if(SiS_Pr->SiS_CustomT == CUT_BARCO1366) { PanelDesPtr = SiS_Pr->SiS_PanelType04_1a; if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) { PanelDesPtr = SiS_Pr->SiS_PanelType04_2a; } } else if(SiS_Pr->SiS_CustomT == CUT_BARCO1024) { PanelDesPtr = SiS_Pr->SiS_PanelType04_1b; if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) { PanelDesPtr = SiS_Pr->SiS_PanelType04_2b; } } } } } #endif return PanelDesPtr; 
SiS_GetLVDSDesPtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,                  USHORT RefreshRateTableIndex, USHORT *PanelIndex,		  USHORT *ResIndex, PSIS_HW_INFO HwInfo){  USHORT modeflag;  if(ModeNo <= 0x13) {     modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;     (*ResIndex) = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;  } else {     modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;     (*ResIndex) = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;  }  (*ResIndex) &= 0x1F;  (*PanelIndex) = 0;  if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) {     if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {        (*PanelIndex) = 50;        if((SiS_Pr->SiS_TVMode & TVSetPAL) && (!(SiS_Pr->SiS_TVMode & TVSetPALM))) (*PanelIndex) += 2;        if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) (*PanelIndex) += 1;        /* Nothing special needed for SOverscan    */        /* PALM uses NTSC data, PALN uses PAL data */     }  }  if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {     *PanelIndex = SiS_Pr->SiS_LCDTypeInfo;     if(HwInfo->jChipType >= SIS_661) {        /* As long as we don's use the BIOS tables, we	 * need to convert the TypeInfo as for 315 series	 */        (*PanelIndex) = SiS_Pr->SiS_LCDResInfo - 1;     }     if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {        (*PanelIndex) += 16;        if(SiS_Pr->SiS_LCDInfo & LCDPass11) {           (*PanelIndex) = 32;           if(modeflag & HalfDCLK) (*PanelIndex)++;	}     }  }  if(SiS_Pr->SiS_SetFlag & SetDOSMode) {     if(SiS_Pr->SiS_LCDResInfo != Panel_640x480) {        (*ResIndex) = 7;        if(HwInfo->jChipType < SIS_315H) {           if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x13) & 0x80) (*ResIndex)++;        }     }  }}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/init301.c/clean/drivers/video/sis/init301.c