Lines Matching full:temp

612    unsigned short modeflag,index,temp,backupindex;  in SiS_GetRatePtr()  local
651 temp = LCDRefreshIndex[SiS_GetBIOSLCDResInfo(SiS_Pr)]; in SiS_GetRatePtr()
652 if(index > temp) index = temp; in SiS_GetRatePtr()
678 temp = SiS_Pr->SiS_RefIndex[RRTI + i].Ext_InfoFlag; in SiS_GetRatePtr()
679 temp &= ModeTypeMask; in SiS_GetRatePtr()
680 if(temp < SiS_Pr->SiS_ModeType) break; in SiS_GetRatePtr()
687 temp = SiS_Pr->SiS_RefIndex[RRTI + i - 1].Ext_InfoFlag; in SiS_GetRatePtr()
688 if(temp & InterlaceMode) i++; in SiS_GetRatePtr()
729 unsigned short temp,temp1; in SiS_CR36BIOSWord23b() local
733 temp = 1 << ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) >> 4) & 0x0f); in SiS_CR36BIOSWord23b()
735 if(temp1 & temp) return true; in SiS_CR36BIOSWord23b()
745 unsigned short temp,temp1; in SiS_CR36BIOSWord23d() local
749 temp = 1 << ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) >> 4) & 0x0f); in SiS_CR36BIOSWord23d()
751 if(temp1 & temp) return true; in SiS_CR36BIOSWord23d()
972 unsigned short tempal,temp,i,j; in SiS_VBWait() local
974 temp = 0; in SiS_VBWait()
978 if(temp & 0x01) { in SiS_VBWait()
986 temp ^= 0x01; in SiS_VBWait()
1237 unsigned short temp; in SiS_SetChrontelGPIO() local
1244 temp = SiS_GetRegShort((acpibase + 0x3c)); /* ACPI register 0x3c: GP Event 1 I/O mode select */ in SiS_SetChrontelGPIO()
1245 temp &= 0xFEFF; in SiS_SetChrontelGPIO()
1246 SiS_SetRegShort((acpibase + 0x3c), temp); in SiS_SetChrontelGPIO()
1247 temp = SiS_GetRegShort((acpibase + 0x3c)); in SiS_SetChrontelGPIO()
1248 temp = SiS_GetRegShort((acpibase + 0x3a)); /* ACPI register 0x3a: GP Pin Level (low/high) */ in SiS_SetChrontelGPIO()
1249 temp &= 0xFEFF; in SiS_SetChrontelGPIO()
1250 if(!(myvbinfo & SetCRT2ToTV)) temp |= 0x0100; in SiS_SetChrontelGPIO()
1251 SiS_SetRegShort((acpibase + 0x3a), temp); in SiS_SetChrontelGPIO()
1252 temp = SiS_GetRegShort((acpibase + 0x3a)); in SiS_SetChrontelGPIO()
1260 unsigned short tempax, tempbx, temp; in SiS_GetVBInfo() local
1277 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x30); in SiS_GetVBInfo()
1278 tempbx |= temp; in SiS_GetVBInfo()
1303 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38); in SiS_GetVBInfo()
1304 if((temp & (EnableDualEdge | SetToLCDA)) == (EnableDualEdge | SetToLCDA)) { in SiS_GetVBInfo()
1312 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35) & 0xe0; in SiS_GetVBInfo()
1313 if(temp == 0x60) tempbx |= SetCRT2ToHiVision; in SiS_GetVBInfo()
1321 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38); in SiS_GetVBInfo()
1322 if(temp & SetToLCDA) { in SiS_GetVBInfo()
1326 if(temp & EnableCHYPbPr) { in SiS_GetVBInfo()
1340 temp = SetCRT2ToSVIDEO | in SiS_GetVBInfo()
1351 temp = SetCRT2ToAVIDEO | in SiS_GetVBInfo()
1358 temp = SetCRT2ToLCDA | in SiS_GetVBInfo()
1363 temp = SetCRT2ToTV | SetCRT2ToLCD; in SiS_GetVBInfo()
1365 temp = SetCRT2ToLCD; in SiS_GetVBInfo()
1370 if(!(tempbx & temp)) { in SiS_GetVBInfo()
1488 unsigned char temp; in SiS_SetYPbPr() local
1509 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38); in SiS_SetYPbPr()
1510 if(temp & 0x08) { in SiS_SetYPbPr()
1511 switch((temp >> 4)) { in SiS_SetYPbPr()
1531 unsigned short temp, temp1, resinfo = 0, romindex = 0; in SiS_SetTVMode() local
1548 temp = 0; in SiS_SetTVMode()
1551 temp = 0x35; in SiS_SetTVMode()
1554 temp = 0x38; in SiS_SetTVMode()
1560 if(temp) { in SiS_SetTVMode()
1564 SiS_SetRegAND(SiS_Pr->SiS_P3d4,temp,0x3F); in SiS_SetTVMode()
1567 temp1 = SiS_GetReg(SiS_Pr->SiS_P3d4,temp); in SiS_SetTVMode()
1597 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35); in SiS_SetTVMode()
1598 if((temp & TVOverScan) || (SiS_Pr->SiS_CHOverScan == 1)) { in SiS_SetTVMode()
1602 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x79); in SiS_SetTVMode()
1603 if((temp & 0x80) || (SiS_Pr->SiS_CHOverScan == 1)) { in SiS_SetTVMode()
1612 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38); in SiS_SetTVMode()
1614 if(temp & EnablePALM) SiS_Pr->SiS_TVMode |= TVSetPALM; in SiS_SetTVMode()
1615 else if(temp & EnablePALN) SiS_Pr->SiS_TVMode |= TVSetPALN; in SiS_SetTVMode()
1617 if(temp & EnableNTSCJ) { in SiS_SetTVMode()
1730 unsigned short temp = SiS_Pr->SiS_LCDResInfo; in SiS_GetBIOSLCDResInfo() local
1732 switch(temp) { in SiS_GetBIOSLCDResInfo()
1733 case Panel_1280x768_2: temp = Panel_1280x768; break; in SiS_GetBIOSLCDResInfo()
1734 case Panel_1280x800_2: temp = Panel_1280x800; break; in SiS_GetBIOSLCDResInfo()
1735 case Panel_1280x854: temp = Panel661_1280x854; break; in SiS_GetBIOSLCDResInfo()
1737 return temp; in SiS_GetBIOSLCDResInfo()
1745 unsigned short temp; in SiS_GetLCDInfoBIOS() local
1748 if((temp = SISGETROMW(6)) != SiS_Pr->PanelHT) { in SiS_GetLCDInfoBIOS()
1750 SiS_Pr->PanelHT = temp; in SiS_GetLCDInfoBIOS()
1752 if((temp = SISGETROMW(8)) != SiS_Pr->PanelVT) { in SiS_GetLCDInfoBIOS()
1754 SiS_Pr->PanelVT = temp; in SiS_GetLCDInfoBIOS()
1791 unsigned short temp,modeflag,resinfo=0,modexres=0,modeyres=0; in SiS_GetLCDResInfo() local
1825 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36); in SiS_GetLCDResInfo()
1828 if(temp == 0) temp = 0x02; in SiS_GetLCDResInfo()
1833 SiS_Pr->SiS_LCDTypeInfo = temp >> 4; in SiS_GetLCDResInfo()
1835 SiS_Pr->SiS_LCDTypeInfo = (temp & 0x0F) - 1; in SiS_GetLCDResInfo()
1837 temp &= 0x0f; in SiS_GetLCDResInfo()
1842 if(temp < 0x0f) temp &= 0x07; in SiS_GetLCDResInfo()
1845 temp = SiS300SeriesLCDRes[temp]; in SiS_GetLCDResInfo()
1852 if (temp == Panel310_1152x768) temp = Panel_320x240_2; /* Verified working */ in SiS_GetLCDResInfo()
1853 else if(temp == Panel310_320x240_2) temp = Panel_320x240_2; in SiS_GetLCDResInfo()
1854 else if(temp == Panel310_320x240_3) temp = Panel_320x240_3; in SiS_GetLCDResInfo()
1856 if(temp == Panel661_1280x854) temp = Panel_1280x854; in SiS_GetLCDResInfo()
1861 if(temp == Panel310_1280x768) { in SiS_GetLCDResInfo()
1862 temp = Panel_1280x768_2; in SiS_GetLCDResInfo()
1865 if(temp == Panel661_1280x800) { in SiS_GetLCDResInfo()
1866 temp = Panel_1280x800_2; in SiS_GetLCDResInfo()
1871 SiS_Pr->SiS_LCDResInfo = temp; in SiS_GetLCDResInfo()
1893 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x37); in SiS_GetLCDResInfo()
1894 SiS_Pr->SiS_LCDInfo = temp & ~0x000e; in SiS_GetLCDResInfo()
1895 /* Need temp below! */ in SiS_GetLCDResInfo()
1918 if(temp & 0x08) SiS_Pr->SiS_LCDInfo |= LCDPass11; in SiS_GetLCDResInfo()
1922 if(temp & 0x02) SiS_Pr->SiS_LCDInfo |= LCDDualLink; in SiS_GetLCDResInfo()
1933 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35); in SiS_GetLCDResInfo()
1934 if(temp & 0x01) SiS_Pr->SiS_LCDInfo |= LCDRGB18Bit; in SiS_GetLCDResInfo()
1936 if(temp & 0x02) SiS_Pr->SiS_LCDInfo |= LCDDualLink; in SiS_GetLCDResInfo()
4130 unsigned short temp; in SiS_HandlePWD() local
4140 temp = 0x00; in SiS_HandlePWD()
4142 temp = 0x80; in SiS_HandlePWD()
4145 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x27,0x7f,temp); in SiS_HandlePWD()
4162 unsigned short temp=0; in SiS_DisableBridge() local
4296 temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00); in SiS_DisableBridge()
4299 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x00,temp); in SiS_DisableBridge()
4356 temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00); in SiS_DisableBridge()
4359 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x00,temp); in SiS_DisableBridge()
4436 temp = SiS_GetCH701x(SiS_Pr,0x61); in SiS_DisableBridge()
4437 if(temp < 1) { in SiS_DisableBridge()
4558 unsigned short temp=0, tempah; in SiS_EnableBridge() local
4609 temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x32) & 0xDF; /* lock mode */ in SiS_EnableBridge()
4612 if(!(tempah & SetCRT2ToRAMDAC)) temp |= 0x20; in SiS_EnableBridge()
4614 SiS_SetReg(SiS_Pr->SiS_P3c4,0x32,temp); in SiS_EnableBridge()
4703 temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x32) & 0xDF; in SiS_EnableBridge()
4707 if(!(SiS_LCDAEnabled(SiS_Pr))) temp |= 0x20; in SiS_EnableBridge()
4710 SiS_SetReg(SiS_Pr->SiS_P3c4,0x32,temp); in SiS_EnableBridge()
4949 temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x32) & 0xDF; /* lock mode */ in SiS_EnableBridge()
4952 if(!(tempah & SetCRT2ToRAMDAC)) temp |= 0x20; in SiS_EnableBridge()
4954 SiS_SetReg(SiS_Pr->SiS_P3c4,0x32,temp); in SiS_EnableBridge()
4959 temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x2E); in SiS_EnableBridge()
4960 if(!(temp & 0x80)) { in SiS_EnableBridge()
5056 temp = SiS_GetCH701x(SiS_Pr,0x66); in SiS_EnableBridge()
5057 temp &= 0x20; in SiS_EnableBridge()
5079 if(temp) { in SiS_EnableBridge()
5147 unsigned char temp; in SiS_SetCRT2Offset() local
5156 temp = (unsigned char)(((offset >> 3) & 0xFF) + 1); in SiS_SetCRT2Offset()
5157 if(offset & 0x07) temp++; in SiS_SetCRT2Offset()
5158 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x03,temp); in SiS_SetCRT2Offset()
5335 unsigned short temp, index, modeidindex, refreshratetableindex; in SiS_SetCRT2FIFO_300() local
5385 temp = ((SiS_GetReg(SiS_Pr->SiS_P3c4,0x14) >> 6) & 0x03) << 1; in SiS_SetCRT2FIFO_300()
5386 if(!temp) temp++; in SiS_SetCRT2FIFO_300()
5387 temp <<= 2; in SiS_SetCRT2FIFO_300()
5389 data2 = temp - ((colorth * VCLK) / MCLK); in SiS_SetCRT2FIFO_300()
5391 temp = (28 * 16) % data2; in SiS_SetCRT2FIFO_300()
5393 if(temp) data2++; in SiS_SetCRT2FIFO_300()
5469 temp = data % (MCLK << 4); in SiS_SetCRT2FIFO_300()
5471 if(temp) data++; in SiS_SetCRT2FIFO_300()
5477 temp = 0x16; in SiS_SetCRT2FIFO_300()
5479 temp = 0x13; in SiS_SetCRT2FIFO_300()
5481 temp = 0x16; in SiS_SetCRT2FIFO_300()
5485 temp = 0x1b; in SiS_SetCRT2FIFO_300()
5487 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x01,0xe0,temp); in SiS_SetCRT2FIFO_300()
5544 unsigned short temp, modeflag, i, j, xres=0, VGAVDE; in SiS_SetGroup1_301() local
5587 temp = SiS_Pr->SiS_VGAHT - 96; in SiS_SetGroup1_301()
5588 if(!(modeflag & HalfDCLK)) temp -= 32; in SiS_SetGroup1_301()
5590 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x04); in SiS_SetGroup1_301()
5591 temp |= ((SiS_GetReg(SiS_Pr->SiS_P3c4,0x0b) & 0xc0) << 2); in SiS_SetGroup1_301()
5592 temp -= 3; in SiS_SetGroup1_301()
5593 temp <<= 3; in SiS_SetGroup1_301()
5595 if(SiS_Pr->SiS_RVBHRS2) temp = SiS_Pr->SiS_RVBHRS2; in SiS_SetGroup1_301()
5597 SiS_Pr->CHSyncStart = temp; in SiS_SetGroup1_301()
5618 temp = (SiS_Pr->SiS_VGAVT - VGAVDE) >> 1; in SiS_SetGroup1_301()
5619 SiS_Pr->CVSyncStart = VGAVDE + temp; in SiS_SetGroup1_301()
5621 temp >>= 3; in SiS_SetGroup1_301()
5622 SiS_Pr->CVSyncEnd = SiS_Pr->CVSyncStart + temp; in SiS_SetGroup1_301()
5640 temp = SiS_Pr->CCRT1CRTC[16] & 0xE0; in SiS_SetGroup1_301()
5641 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,CRTranslation[0x0E],0x1F,temp); in SiS_SetGroup1_301()
5643 temp = (SiS_Pr->CCRT1CRTC[16] & 0x01) << 5; in SiS_SetGroup1_301()
5644 if(modeflag & DoubleScanMode) temp |= 0x80; in SiS_SetGroup1_301()
5645 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,CRTranslation[0x09],0x5F,temp); in SiS_SetGroup1_301()
5647 temp = 0; in SiS_SetGroup1_301()
5648 temp |= (SiS_GetReg(SiS_Pr->SiS_P3c4,0x01) & 0x01); in SiS_SetGroup1_301()
5649 if(modeflag & HalfDCLK) temp |= 0x08; in SiS_SetGroup1_301()
5650 …SiS_SetReg(SiS_Pr->SiS_Part1Port,0x16,temp); /* SR01: HalfDCLK[3], 8/9 div dotclock[… in SiS_SetGroup1_301()
5655 temp = 0; in SiS_SetGroup1_301()
5657 temp = (SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x01) << 7; in SiS_SetGroup1_301()
5659 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1A,temp); /* SR0E, dither[7] */ in SiS_SetGroup1_301()
5661 temp = SiS_GetRegByte((SiS_Pr->SiS_P3ca+0x02)); in SiS_SetGroup1_301()
5662 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1b,temp); /* ? */ in SiS_SetGroup1_301()
5674 unsigned short push2, tempax, tempbx, tempcx, temp; in SiS_SetGroup1_LVDS() local
5758 temp = (tempax & 0x0007); in SiS_SetGroup1_LVDS()
5759 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1A,temp); /* BPLHDESKEW[2:0] */ in SiS_SetGroup1_LVDS()
5760 temp = (tempax >> 3) & 0x00FF; in SiS_SetGroup1_LVDS()
5761 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x16,temp); /* BPLHDESKEW[10:3] */ in SiS_SetGroup1_LVDS()
5778 temp = tempax; in SiS_SetGroup1_LVDS()
5779 if(temp & 0x07) temp += 8; in SiS_SetGroup1_LVDS()
5780 temp >>= 3; in SiS_SetGroup1_LVDS()
5781 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x17,temp); /* BPLHDEE */ in SiS_SetGroup1_LVDS()
5794 temp = (tempcx >> 3) & 0x00FF; in SiS_SetGroup1_LVDS()
5801 case 0x0d: temp = 0x56; break; in SiS_SetGroup1_LVDS()
5802 case 0x10: temp = 0x60; break; in SiS_SetGroup1_LVDS()
5803 case 0x13: temp = 0x5f; break; in SiS_SetGroup1_LVDS()
5813 case 0x5e: temp = 0x54; break; in SiS_SetGroup1_LVDS()
5818 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x14,temp); /* BPLHRS */ in SiS_SetGroup1_LVDS()
5821 temp += 2; in SiS_SetGroup1_LVDS()
5823 temp += 8; in SiS_SetGroup1_LVDS()
5825 temp = tempcx + SiS_Pr->PanelHRE; in SiS_SetGroup1_LVDS()
5826 if(temp >= SiS_Pr->SiS_HT) temp -= SiS_Pr->SiS_HT; in SiS_SetGroup1_LVDS()
5827 temp >>= 3; in SiS_SetGroup1_LVDS()
5831 temp += 10; in SiS_SetGroup1_LVDS()
5834 temp &= 0x1F; in SiS_SetGroup1_LVDS()
5835 temp |= ((tempcx & 0x07) << 5); in SiS_SetGroup1_LVDS()
5836 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x15,temp); /* BPLHRE */ in SiS_SetGroup1_LVDS()
5877 temp = tempbx & 0x00FF; in SiS_SetGroup1_LVDS()
5880 if(ModeNo == 0x10) temp = 0xa9; in SiS_SetGroup1_LVDS()
5883 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x18,temp); /* BPLVRS */ in SiS_SetGroup1_LVDS()
5895 temp = tempcx & 0x000F; in SiS_SetGroup1_LVDS()
5896 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0xF0,temp); /* BPLVRE */ in SiS_SetGroup1_LVDS()
5898 temp = ((tempbx >> 8) & 0x07) << 3; in SiS_SetGroup1_LVDS()
5901 if(SiS_Pr->SiS_VGAVDE != SiS_Pr->SiS_VDE) temp |= 0x40; in SiS_SetGroup1_LVDS()
5903 } else if(SiS_Pr->SiS_VGAVDE != SiS_Pr->SiS_VDE) temp |= 0x40; in SiS_SetGroup1_LVDS()
5904 if(SiS_Pr->SiS_SetFlag & EnableLVDSDDA) temp |= 0x40; in SiS_SetGroup1_LVDS()
5910 if(SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x03) temp |= 0x80; in SiS_SetGroup1_LVDS()
5915 if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x06) & 0x10) temp |= 0x80; in SiS_SetGroup1_LVDS()
5917 if(SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x01) temp |= 0x80; in SiS_SetGroup1_LVDS()
5921 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x1A,tempbx,temp); in SiS_SetGroup1_LVDS()
5956 temp = ((tempbx >> 8) & 0x07) << 3; in SiS_SetGroup1_LVDS()
5957 temp |= ((tempcx >> 8) & 0x07); in SiS_SetGroup1_LVDS()
5958 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1D,temp); in SiS_SetGroup1_LVDS()
5968 temp = (tempeax % (unsigned int)SiS_Pr->SiS_VDE); in SiS_SetGroup1_LVDS()
5970 if(temp) tempeax++; in SiS_SetGroup1_LVDS()
5974 temp = (unsigned short)(tempeax & 0x00FF); in SiS_SetGroup1_LVDS()
5975 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1E,temp); /* BPLVCFACT */ in SiS_SetGroup1_LVDS()
5976 tempvcfact = temp; in SiS_SetGroup1_LVDS()
5984 temp = (tempeax % tempebx); in SiS_SetGroup1_LVDS()
5986 if(temp) tempeax++; in SiS_SetGroup1_LVDS()
5989 temp = (unsigned short)(tempeax & 0x00FF); in SiS_SetGroup1_LVDS()
5990 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x37,temp); in SiS_SetGroup1_LVDS()
5991 temp = (unsigned short)((tempeax & 0x00FF00) >> 8); in SiS_SetGroup1_LVDS()
5992 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x36,temp); in SiS_SetGroup1_LVDS()
5993 temp = (unsigned short)((tempeax & 0x00030000) >> 16); in SiS_SetGroup1_LVDS()
5994 if(SiS_Pr->SiS_VDE == SiS_Pr->SiS_VGAVDE) temp |= 0x04; in SiS_SetGroup1_LVDS()
5995 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x35,temp); in SiS_SetGroup1_LVDS()
5998 temp = (unsigned short)(tempeax & 0x00FF); in SiS_SetGroup1_LVDS()
5999 SiS_SetReg(SiS_Pr->SiS_Part4Port,0x3c,temp); in SiS_SetGroup1_LVDS()
6000 temp = (unsigned short)((tempeax & 0x00FF00) >> 8); in SiS_SetGroup1_LVDS()
6001 SiS_SetReg(SiS_Pr->SiS_Part4Port,0x3b,temp); in SiS_SetGroup1_LVDS()
6002 temp = (unsigned short)(((tempeax & 0x00030000) >> 16) << 6); in SiS_SetGroup1_LVDS()
6003 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x3a,0x3f,temp); in SiS_SetGroup1_LVDS()
6004 temp = 0; in SiS_SetGroup1_LVDS()
6005 if(SiS_Pr->SiS_VDE != SiS_Pr->SiS_VGAVDE) temp |= 0x08; in SiS_SetGroup1_LVDS()
6006 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x30,0xf3,temp); in SiS_SetGroup1_LVDS()
6034 temp = (unsigned short)(tempecx & 0x00FF); in SiS_SetGroup1_LVDS()
6035 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1F,temp); in SiS_SetGroup1_LVDS()
6053 temp = ((tempbx >> 8) & 0x07) << 3; in SiS_SetGroup1_LVDS()
6054 temp = temp | ((tempecx >> 8) & 0x07); in SiS_SetGroup1_LVDS()
6055 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x20,temp); in SiS_SetGroup1_LVDS()
6062 temp = (unsigned short)((tempecx & 0xFF00) >> 8); in SiS_SetGroup1_LVDS()
6063 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x22,temp); in SiS_SetGroup1_LVDS()
6064 temp = (unsigned short)(tempecx & 0x00FF); in SiS_SetGroup1_LVDS()
6065 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x23,temp); in SiS_SetGroup1_LVDS()
6136 temp = (tempax >> 8) << 3; in SiS_SetGroup1_LVDS()
6137 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x35,~0x078,temp); in SiS_SetGroup1_LVDS()
6149 temp = (tempax >> 8) << 3; in SiS_SetGroup1_LVDS()
6150 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x3C,~0x038,temp); in SiS_SetGroup1_LVDS()
6157 temp = tempeax & 0x7f; in SiS_SetGroup1_LVDS()
6159 if(temp) tempeax++; in SiS_SetGroup1_LVDS()
6160 temp = tempeax & 0x3f; in SiS_SetGroup1_LVDS()
6161 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x45,temp); in SiS_SetGroup1_LVDS()
6173 temp = tempax & 0x00FF; in SiS_SetGroup1_LVDS()
6174 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x43,temp); in SiS_SetGroup1_LVDS()
6175 temp = ((tempax & 0xFF00) >> 8) << 3; in SiS_SetGroup1_LVDS()
6176 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port, 0x44, 0x07, temp); in SiS_SetGroup1_LVDS()
6183 temp = tempeax & 0xFF; in SiS_SetGroup1_LVDS()
6184 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x42,temp); in SiS_SetGroup1_LVDS()
6185 temp = (tempeax & 0xFF00) >> 8; in SiS_SetGroup1_LVDS()
6186 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x41,temp); in SiS_SetGroup1_LVDS()
6187 temp = ((tempeax & 0xFF0000) >> 16) | 0x10; in SiS_SetGroup1_LVDS()
6188 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x40,temp); in SiS_SetGroup1_LVDS()
6189 temp = ((tempeax & 0x01000000) >> 24) << 7; in SiS_SetGroup1_LVDS()
6190 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port, 0x3C, 0x7F, temp); in SiS_SetGroup1_LVDS()
6232 unsigned short temp=0, tempax=0, tempbx=0, tempcx=0, bridgeadd=0; in SiS_SetGroup1() local
6275 temp = (SiS_Pr->SiS_VGAHT - 1) & 0x0FF; /* BTVGA2HT 0x08,0x09 */ in SiS_SetGroup1()
6276 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x08,temp); /* CRT2 Horizontal Total */ in SiS_SetGroup1()
6278 temp = (((SiS_Pr->SiS_VGAHT - 1) & 0xFF00) >> 8) << 4; in SiS_SetGroup1()
6279 …SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x09,0x0f,temp); /* CRT2 Horizontal Total Overflow [7:4] … in SiS_SetGroup1()
6281 temp = (SiS_Pr->SiS_VGAHDE + 12) & 0x0FF; /* BTVGA2HDEE 0x0A,0x0C */ in SiS_SetGroup1()
6282 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0A,temp); /* CRT2 Horizontal Display Enable End */ in SiS_SetGroup1()
6312 temp = (tempcx >> 4) & 0xF0; in SiS_SetGroup1()
6313 …SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x09,0x0F,temp); /* CRT2 Horizontal Total Overflow [7:4] … in SiS_SetGroup1()
6398 temp = ((tempbx >> 8) & 0x0F) | ((pushbx >> 4) & 0xF0); in SiS_SetGroup1()
6399 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0C,temp); /* Overflow */ in SiS_SetGroup1()
6404 temp = tempcx & 0x00FF; in SiS_SetGroup1()
6411 temp--; in SiS_SetGroup1()
6415 temp--; in SiS_SetGroup1()
6418 temp--; in SiS_SetGroup1()
6421 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0E,temp); /* CRT2 Vertical Total */ in SiS_SetGroup1()
6426 temp = ((tempbx >> 5) & 0x38) | ((tempcx >> 8) & 0x07); in SiS_SetGroup1()
6427 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x12,temp); /* Overflow */ in SiS_SetGroup1()
6471 temp = ((tempbx >> 4) & 0x70) | (tempcx & 0x0F); in SiS_SetGroup1()
6472 …SiS_SetReg(SiS_Pr->SiS_Part1Port,0x11,temp); /* CRT2 Vert. Retrace End; Overflow */ in SiS_SetGroup1()
6481 temp = 0x20; in SiS_SetGroup1()
6483 temp = 0x10; in SiS_SetGroup1()
6484 if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) temp = 0x2c; in SiS_SetGroup1()
6485 if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) temp = 0x20; in SiS_SetGroup1()
6488 if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) temp = 0x20; in SiS_SetGroup1()
6490 if(SiS_Pr->SiS_LCDResInfo == Panel_1280x960) temp = 0x24; in SiS_SetGroup1()
6491 if(SiS_Pr->SiS_LCDResInfo == Panel_Custom) temp = 0x2c; in SiS_SetGroup1()
6492 if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) temp = 0x08; in SiS_SetGroup1()
6494 if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) temp = 0x2c; in SiS_SetGroup1()
6495 else temp = 0x20; in SiS_SetGroup1()
6500 temp = ROMAddr[0x221]; in SiS_SetGroup1()
6502 temp = ROMAddr[0x222]; in SiS_SetGroup1()
6504 temp = ROMAddr[0x223]; in SiS_SetGroup1()
6506 temp = ROMAddr[0x224]; in SiS_SetGroup1()
6510 if(SiS_Pr->PDC != -1) temp = SiS_Pr->PDC; in SiS_SetGroup1()
6514 temp = 0x20; in SiS_SetGroup1()
6516 if(SiS_Pr->SiS_LCDResInfo == Panel_640x480) temp = 0x04; in SiS_SetGroup1()
6520 temp = ROMAddr[0x220]; in SiS_SetGroup1()
6524 if(SiS_Pr->PDC != -1) temp = SiS_Pr->PDC; in SiS_SetGroup1()
6528 temp &= 0x3c; in SiS_SetGroup1()
6530 …SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,~0x3C,temp); /* Panel Link Delay Compensation; (Softw… in SiS_SetGroup1()
6542 if(SiS_Pr->ChipType == SIS_740) temp = 0x03; in SiS_SetGroup1()
6543 else temp = 0x00; in SiS_SetGroup1()
6545 if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) temp = 0x0a; in SiS_SetGroup1()
6554 temp = 0x08; in SiS_SetGroup1()
6561 … SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2D,tempbl,temp); /* Panel Link Delay Compensation */ in SiS_SetGroup1()
6649 unsigned char temp; in SiS_SetGroup2_C_ELV() local
6664 temp = 0x10; in SiS_SetGroup2_C_ELV()
6665 if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) temp |= 0x04; in SiS_SetGroup2_C_ELV()
6666 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x4e,0xeb,temp); in SiS_SetGroup2_C_ELV()
6847 unsigned short temp; in SiS_SetGroup2_Tail() local
6851 temp = 0xc3; in SiS_SetGroup2_Tail()
6853 temp++; in SiS_SetGroup2_Tail()
6854 if(SiS_Pr->SiS_VBType & VB_SIS30xBLV) temp += 2; in SiS_SetGroup2_Tail()
6856 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2f,temp); in SiS_SetGroup2_Tail()
6859 temp = 0x4d; in SiS_SetGroup2_Tail()
6861 temp++; in SiS_SetGroup2_Tail()
6862 if(SiS_Pr->SiS_VBType & VB_SIS30xBLV) temp++; in SiS_SetGroup2_Tail()
6864 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2f,temp); in SiS_SetGroup2_Tail()
6874 temp = 1; in SiS_SetGroup2_Tail()
6875 if(ModeNo <= 0x13) temp = 3; in SiS_SetGroup2_Tail()
6876 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x0b,temp); in SiS_SetGroup2_Tail()
6907 unsigned short i, j, tempax, tempbx, tempcx, tempch, tempcl, temp; in SiS_SetGroup2() local
6930 temp = 0; in SiS_SetGroup2()
6931 if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToAVIDEO)) temp |= 0x08; in SiS_SetGroup2()
6932 if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToSVIDEO)) temp |= 0x04; in SiS_SetGroup2()
6933 if(SiS_Pr->SiS_VBInfo & SetCRT2ToSCART) temp |= 0x02; in SiS_SetGroup2()
6934 if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) temp |= 0x01; in SiS_SetGroup2()
6936 if(!(SiS_Pr->SiS_TVMode & TVSetPAL)) temp |= 0x10; in SiS_SetGroup2()
6938 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x00,temp); in SiS_SetGroup2()
7037 temp = tempax + (unsigned short)TimingPoint[0]; in SiS_SetGroup2()
7038 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,temp); in SiS_SetGroup2()
7040 temp = tempax + (unsigned short)TimingPoint[1]; in SiS_SetGroup2()
7041 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,temp); in SiS_SetGroup2()
7130 temp = (tempcx >> 8) & 0x0F; in SiS_SetGroup2()
7131 temp |= ((tempbx >> 2) & 0xC0); in SiS_SetGroup2()
7133 temp |= 0x10; in SiS_SetGroup2()
7134 if(SiS_Pr->SiS_VBInfo & SetCRT2ToAVIDEO) temp |= 0x20; in SiS_SetGroup2()
7136 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x30,temp); in SiS_SetGroup2()
7149 temp = ((tempbx >> 3) & 0x60) | 0x18; in SiS_SetGroup2()
7150 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x46,temp); in SiS_SetGroup2()
7209 temp = (tempcx & 0x0300) >> 6; in SiS_SetGroup2()
7210 temp |= ((tempbx >> 8) & 0x03); in SiS_SetGroup2()
7212 temp |= 0x10; in SiS_SetGroup2()
7213 if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) temp |= 0x20; in SiS_SetGroup2()
7214 else if(SiS_Pr->SiS_TVMode & TVSetYPbPr750p) temp |= 0x40; in SiS_SetGroup2()
7216 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x4D,temp); in SiS_SetGroup2()
7218 temp = SiS_GetReg(SiS_Pr->SiS_Part2Port,0x43); in SiS_SetGroup2()
7219 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x43,(temp - 3)); in SiS_SetGroup2()
7224 temp = 0; in SiS_SetGroup2()
7225 if(SiS_Pr->SiS_TVMode & TVSetPALM) temp = 8; in SiS_SetGroup2()
7226 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x4e,0xf7,temp); in SiS_SetGroup2()
7233 temp = SiS_GetReg(SiS_Pr->SiS_Part2Port,0x01); in SiS_SetGroup2()
7234 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,(temp - 1)); in SiS_SetGroup2()
7255 temp = 0x01; in SiS_SetGroup2()
7259 temp = 0x02; in SiS_SetGroup2()
7261 temp = 0x01; in SiS_SetGroup2()
7266 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x0B,temp); in SiS_SetGroup2()
7274 temp = (tempcx >> 3) & 0xE0; in SiS_SetGroup2()
7278 temp |= 0x10; in SiS_SetGroup2()
7281 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1A,0x0f,temp); in SiS_SetGroup2()
7353 temp = (tempbx >> 5) & 0x38; in SiS_SetGroup2()
7354 temp |= ((tempcx >> 8) & 0x07); in SiS_SetGroup2()
7355 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,temp); in SiS_SetGroup2()
7400 temp = (tempbx >> 4) & 0xF0; in SiS_SetGroup2()
7402 temp |= (tempbx & 0x0F); in SiS_SetGroup2()
7405 temp &= 0xf0; in SiS_SetGroup2()
7406 temp |= (SiS_Pr->CVSyncEnd & 0x0f); in SiS_SetGroup2()
7409 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,temp); in SiS_SetGroup2()
7422 temp = 0; in SiS_SetGroup2()
7425 temp = SiS_Pr->SiS_HT - ((SiS_Pr->PanelXRes - SiS_Pr->SiS_HDE) / 2); in SiS_SetGroup2()
7426 if(SiS_IsDualLink(SiS_Pr)) temp >>= 1; in SiS_SetGroup2()
7429 temp += bridgeoffset; in SiS_SetGroup2()
7430 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x1F,temp); /* lcdhdes */ in SiS_SetGroup2()
7431 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x20,0x0F,((temp >> 4) & 0xf0)); in SiS_SetGroup2()
7571 unsigned short temp, temp1, temp2;
7575 temp = (unsigned short)((int)((temp1 | ((temp2 & 0xf0) << 4))) + shift);
7576 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x1f,temp);
7577 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x20,0x0f,((temp >> 4) & 0xf0));
7578 temp = SiS_GetReg(SiS_Pr->SiS_Part2Port,0x2b) & 0x0f;
7579 temp = (unsigned short)((int)(temp) + shift);
7580 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x2b,0xf0,(temp & 0x0f));
7583 temp = (unsigned short)((int)((temp1 | ((temp2 & 0xf0) << 4))) + shift);
7584 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x43,temp);
7585 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x42,0x0f,((temp >> 4) & 0xf0));
7592 unsigned short temp, temp1; in SiS_SetGroup4_C_ELV() local
7605 temp = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x3a); in SiS_SetGroup4_C_ELV()
7606 if(!(temp & 0x01)) { in SiS_SetGroup4_C_ELV()
7613 if(SiS_Pr->SiS_TVMode & TVSetYPbPr750p) temp = 0x0000; in SiS_SetGroup4_C_ELV()
7614 else if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) temp = 0x0002; in SiS_SetGroup4_C_ELV()
7615 else if(SiS_Pr->SiS_TVMode & TVSetHiVision) temp = 0x0400; in SiS_SetGroup4_C_ELV()
7616 else temp = 0x0402; in SiS_SetGroup4_C_ELV()
7621 if(SiS_Pr->SiS_TVMode & TVAspect43LB) temp |= 0x01; in SiS_SetGroup4_C_ELV()
7622 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x26,0x7c,(temp & 0xff)); in SiS_SetGroup4_C_ELV()
7623 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x3a,0xfb,(temp >> 8)); in SiS_SetGroup4_C_ELV()
7629 if(temp1 == 0x01) temp |= 0x01; in SiS_SetGroup4_C_ELV()
7630 if(temp1 == 0x03) temp |= 0x04; /* ? why not 0x10? */ in SiS_SetGroup4_C_ELV()
7631 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x26,0xf8,(temp & 0xff)); in SiS_SetGroup4_C_ELV()
7632 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x3a,0xfb,(temp >> 8)); in SiS_SetGroup4_C_ELV()
7663 unsigned short vclkindex, temp, reg1, reg2; in SiS_SetCRT2VCLK() local
7689 temp = 0x08; in SiS_SetCRT2VCLK()
7690 if(SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC) temp |= 0x20; in SiS_SetCRT2VCLK()
7691 SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x12,temp); in SiS_SetCRT2VCLK()
7722 unsigned short tempax, tempcx, tempbx, modeflag, temp, resinfo; in SiS_SetGroup4() local
7762 temp = (tempbx >> 1) & 0x80; in SiS_SetGroup4()
7767 temp |= ((tempcx >> 5) & 0x78); in SiS_SetGroup4()
7773 temp |= ((tempcx >> 8) & 0x07); in SiS_SetGroup4()
7774 SiS_SetReg(SiS_Pr->SiS_Part4Port,0x15,temp); in SiS_SetGroup4()
7781 temp = 0; in SiS_SetGroup4()
7782 if(tempbx > 800) temp = 0x60; in SiS_SetGroup4()
7784 temp = 0; in SiS_SetGroup4()
7785 if(tempbx > 1024) temp = 0xC0; in SiS_SetGroup4()
7786 else if(tempbx >= 960) temp = 0xA0; in SiS_SetGroup4()
7788 temp = 0; in SiS_SetGroup4()
7789 if(tempbx >= 1280) temp = 0x40; in SiS_SetGroup4()
7790 else if(tempbx >= 1024) temp = 0x20; in SiS_SetGroup4()
7792 temp = 0x80; in SiS_SetGroup4()
7793 if(tempbx >= 1024) temp = 0xA0; in SiS_SetGroup4()
7796 temp |= SiS_Pr->Init_P4_0E; in SiS_SetGroup4()
7800 temp &= 0xf0; in SiS_SetGroup4()
7801 temp |= 0x0A; in SiS_SetGroup4()
7805 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x0E,0x10,temp); in SiS_SetGroup4()
7810 if(!(temp & 0xE0)) tempebx >>=1; in SiS_SetGroup4()
7829 temp = (unsigned short)(tempeax & 0x000000FF); in SiS_SetGroup4()
7830 SiS_SetReg(SiS_Pr->SiS_Part4Port,0x1B,temp); in SiS_SetGroup4()
7831 temp = (unsigned short)((tempeax & 0x0000FF00) >> 8); in SiS_SetGroup4()
7832 SiS_SetReg(SiS_Pr->SiS_Part4Port,0x1A,temp); in SiS_SetGroup4()
7833 temp = (unsigned short)((tempeax >> 12) & 0x70); /* sic! */ in SiS_SetGroup4()
7834 temp |= (tempcx & 0x4F); in SiS_SetGroup4()
7835 SiS_SetReg(SiS_Pr->SiS_Part4Port,0x19,temp); in SiS_SetGroup4()
7855 temp = tempax % 32; in SiS_SetGroup4()
7857 if(temp) tempax++; in SiS_SetGroup4()
7871 temp = ((tempax >> 4) & 0x30) | tempbx; in SiS_SetGroup4()
7873 SiS_SetReg(SiS_Pr->SiS_Part4Port,0x1E,temp); in SiS_SetGroup4()
7875 temp = 0x0036; tempbx = 0xD0; in SiS_SetGroup4()
7877 temp = 0x0026; tempbx = 0xC0; /* See En/DisableBridge() */ in SiS_SetGroup4()
7881 temp |= 0x01; in SiS_SetGroup4()
7884 temp &= ~0x01; in SiS_SetGroup4()
7889 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x1F,tempbx,temp); in SiS_SetGroup4()
7895 temp = (tempbx >> 5) & 0x38; in SiS_SetGroup4()
7896 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x21,0xC0,temp); in SiS_SetGroup4()
8301 unsigned short temp; in SiS_SetCHTVReg() local
8306 temp = CHTVRegData[resindex].Reg[0]; in SiS_SetCHTVReg()
8307 if(SiS_Pr->SiS_TVMode & TVSetNTSCJ) temp |= 0x10; in SiS_SetCHTVReg()
8308 SiS_SetCH701x(SiS_Pr,0x00,temp); in SiS_SetCHTVReg()
8317 temp = CHTVRegData[resindex].Reg[7]; in SiS_SetCHTVReg()
8318 if(SiS_Pr->SiS_TVMode & TVSetNTSCJ) temp = 0x66; in SiS_SetCHTVReg()
8319 SiS_SetCH701x(SiS_Pr,0x07,temp); in SiS_SetCHTVReg()
8330 temp = SiS_GetCH701x(SiS_Pr,0x21) & ~0x02; in SiS_SetCHTVReg()
8337 if(SiS_Pr->SiS_TVMode & (TVSetPALN | TVSetNTSCJ)) temp |= 0x02; in SiS_SetCHTVReg()
8338 SiS_SetCH701x(SiS_Pr,0x21,temp); in SiS_SetCHTVReg()
8355 unsigned short temp; in SiS_Chrontel701xBLOn() local
8362 temp = SiS_GetCH701x(SiS_Pr,0x66); in SiS_Chrontel701xBLOn()
8363 temp |= 0x20; in SiS_Chrontel701xBLOn()
8364 SiS_SetCH701x(SiS_Pr,0x66,temp); in SiS_Chrontel701xBLOn()
8372 unsigned short temp; in SiS_Chrontel701xBLOff() local
8376 temp = SiS_GetCH701x(SiS_Pr,0x66); in SiS_Chrontel701xBLOff()
8377 temp &= 0xDF; in SiS_Chrontel701xBLOff()
8378 SiS_SetCH701x(SiS_Pr,0x66,temp); in SiS_Chrontel701xBLOff()
8520 unsigned char temp, temp1; in SiS_ChrontelResetVSync() local
8524 temp = SiS_GetCH701x(SiS_Pr,0x47); in SiS_ChrontelResetVSync()
8525 temp &= 0x7f; /* Use external VSYNC */ in SiS_ChrontelResetVSync()
8526 SiS_SetCH701x(SiS_Pr,0x47,temp); in SiS_ChrontelResetVSync()
8528 temp = SiS_GetCH701x(SiS_Pr,0x47); in SiS_ChrontelResetVSync()
8529 temp |= 0x80; /* Use internal VSYNC */ in SiS_ChrontelResetVSync()
8530 SiS_SetCH701x(SiS_Pr,0x47,temp); in SiS_ChrontelResetVSync()
8537 unsigned short temp; in SiS_Chrontel701xOn() local
8541 temp = SiS_GetCH701x(SiS_Pr,0x1c); in SiS_Chrontel701xOn()
8542 temp |= 0x04; /* Invert XCLK phase */ in SiS_Chrontel701xOn()
8543 SiS_SetCH701x(SiS_Pr,0x1c,temp); in SiS_Chrontel701xOn()
8546 temp = SiS_GetCH701x(SiS_Pr,0x01); in SiS_Chrontel701xOn()
8547 temp &= 0x3f; in SiS_Chrontel701xOn()
8548 temp |= 0x80; /* Enable YPrPb (HDTV) */ in SiS_Chrontel701xOn()
8549 SiS_SetCH701x(SiS_Pr,0x01,temp); in SiS_Chrontel701xOn()
8552 temp = SiS_GetCH701x(SiS_Pr,0x01); in SiS_Chrontel701xOn()
8553 temp &= 0x3f; in SiS_Chrontel701xOn()
8554 temp |= 0xc0; /* Enable SCART + CVBS */ in SiS_Chrontel701xOn()
8555 SiS_SetCH701x(SiS_Pr,0x01,temp); in SiS_Chrontel701xOn()
8562 temp = SiS_GetCH701x(SiS_Pr,0x49); in SiS_Chrontel701xOn()
8564 temp = SiS_GetCH701x(SiS_Pr,0x73); in SiS_Chrontel701xOn()
8565 temp |= 0x60; in SiS_Chrontel701xOn()
8566 SiS_SetCH701x(SiS_Pr,0x73,temp); in SiS_Chrontel701xOn()
8568 temp = SiS_GetCH701x(SiS_Pr,0x47); in SiS_Chrontel701xOn()
8569 temp &= 0x7f; in SiS_Chrontel701xOn()
8570 SiS_SetCH701x(SiS_Pr,0x47,temp); in SiS_Chrontel701xOn()
8572 temp = SiS_GetCH701x(SiS_Pr,0x47); in SiS_Chrontel701xOn()
8573 temp |= 0x80; in SiS_Chrontel701xOn()
8574 SiS_SetCH701x(SiS_Pr,0x47,temp); in SiS_Chrontel701xOn()
8582 unsigned short temp; in SiS_Chrontel701xOff() local
8593 temp = SiS_GetCH701x(SiS_Pr,0x76); in SiS_Chrontel701xOff()
8594 temp &= 0xfc; in SiS_Chrontel701xOff()
8595 SiS_SetCH701x(SiS_Pr,0x76,temp); in SiS_Chrontel701xOff()
8604 unsigned short temp; in SiS_ChrontelResetDB() local
8608 temp = SiS_GetCH701x(SiS_Pr,0x4a); /* Version ID */ in SiS_ChrontelResetDB()
8609 temp &= 0x01; in SiS_ChrontelResetDB()
8610 if(!temp) { in SiS_ChrontelResetDB()
8613 temp = SiS_GetCH701x(SiS_Pr,0x49); in SiS_ChrontelResetDB()
8624 SiS_SetCH701x(SiS_Pr,0x49,temp); in SiS_ChrontelResetDB()
8630 temp = SiS_GetCH701x(SiS_Pr,0x5c); in SiS_ChrontelResetDB()
8631 temp &= 0xef; in SiS_ChrontelResetDB()
8632 SiS_SetCH701x(SiS_Pr,0x5c,temp); in SiS_ChrontelResetDB()
8633 temp = SiS_GetCH701x(SiS_Pr,0x5c); in SiS_ChrontelResetDB()
8634 temp |= 0x10; in SiS_ChrontelResetDB()
8635 SiS_SetCH701x(SiS_Pr,0x5c,temp); in SiS_ChrontelResetDB()
8636 temp = SiS_GetCH701x(SiS_Pr,0x5c); in SiS_ChrontelResetDB()
8637 temp &= 0xef; in SiS_ChrontelResetDB()
8638 SiS_SetCH701x(SiS_Pr,0x5c,temp); in SiS_ChrontelResetDB()
8639 temp = SiS_GetCH701x(SiS_Pr,0x61); in SiS_ChrontelResetDB()
8640 if(!temp) { in SiS_ChrontelResetDB()
8656 unsigned short temp; in SiS_ChrontelInitTVVSync() local
8667 temp = SiS_GetCH701x(SiS_Pr,0x49); in SiS_ChrontelInitTVVSync()
8668 temp &= 1; in SiS_ChrontelInitTVVSync()
8669 if(temp != 1) { /* TV block powered? (0 = yes, 1 = no) */ in SiS_ChrontelInitTVVSync()
8670 temp = SiS_GetCH701x(SiS_Pr,0x47); in SiS_ChrontelInitTVVSync()
8671 temp &= 0x70; in SiS_ChrontelInitTVVSync()
8672 SiS_SetCH701x(SiS_Pr,0x47,temp); /* enable VSYNC */ in SiS_ChrontelInitTVVSync()
8674 temp = SiS_GetCH701x(SiS_Pr,0x47); in SiS_ChrontelInitTVVSync()
8675 temp |= 0x80; in SiS_ChrontelInitTVVSync()
8676 SiS_SetCH701x(SiS_Pr,0x47,temp); /* disable VSYNC */ in SiS_ChrontelInitTVVSync()
8685 unsigned short temp,temp1; in SiS_ChrontelDoSomething3() local
8689 temp = SiS_GetCH701x(SiS_Pr,0x61); in SiS_ChrontelDoSomething3()
8690 if(temp < 1) { in SiS_ChrontelDoSomething3()
8691 temp++; in SiS_ChrontelDoSomething3()
8692 SiS_SetCH701x(SiS_Pr,0x61,temp); in SiS_ChrontelDoSomething3()
8702 temp = SiS_GetCH701x(SiS_Pr,0x61); in SiS_ChrontelDoSomething3()
8703 if(temp < 2) { in SiS_ChrontelDoSomething3()
8704 temp++; in SiS_ChrontelDoSomething3()
8705 SiS_SetCH701x(SiS_Pr,0x61,temp); in SiS_ChrontelDoSomething3()
8709 temp = SiS_GetCH701x(SiS_Pr,0x66); in SiS_ChrontelDoSomething3()
8710 temp |= 0x5f; in SiS_ChrontelDoSomething3()
8711 SiS_SetCH701x(SiS_Pr,0x66,temp); in SiS_ChrontelDoSomething3()
8722 temp = SiS_GetCH701x(SiS_Pr,0x76); in SiS_ChrontelDoSomething3()
8723 temp |= 0x03; in SiS_ChrontelDoSomething3()
8724 SiS_SetCH701x(SiS_Pr,0x76,temp); in SiS_ChrontelDoSomething3()
8725 temp = SiS_GetCH701x(SiS_Pr,0x66); in SiS_ChrontelDoSomething3()
8726 temp &= 0x7f; in SiS_ChrontelDoSomething3()
8727 SiS_SetCH701x(SiS_Pr,0x66,temp); in SiS_ChrontelDoSomething3()
8736 unsigned short temp; in SiS_ChrontelDoSomething2() local
8741 temp = SiS_GetCH701x(SiS_Pr,0x66); in SiS_ChrontelDoSomething2()
8742 temp &= 0x04; /* PLL stable? -> bail out */ in SiS_ChrontelDoSomething2()
8743 if(temp == 0x04) break; in SiS_ChrontelDoSomething2()
8752 temp = SiS_GetCH701x(SiS_Pr,0x76); in SiS_ChrontelDoSomething2()
8753 temp &= 0xfb; /* Reset PLL */ in SiS_ChrontelDoSomething2()
8754 SiS_SetCH701x(SiS_Pr,0x76,temp); in SiS_ChrontelDoSomething2()
8756 temp = SiS_GetCH701x(SiS_Pr,0x76); in SiS_ChrontelDoSomething2()
8757 temp |= 0x04; /* PLL normal operation */ in SiS_ChrontelDoSomething2()
8758 SiS_SetCH701x(SiS_Pr,0x76,temp); in SiS_ChrontelDoSomething2()
8773 unsigned short temp; in SiS_ChrontelDoSomething1() local
8775 temp = SiS_GetCH701x(SiS_Pr,0x03); in SiS_ChrontelDoSomething1()
8776 temp |= 0x80; /* Set datapath 1 to TV */ in SiS_ChrontelDoSomething1()
8777 temp &= 0xbf; /* Set datapath 2 to LVDS */ in SiS_ChrontelDoSomething1()
8778 SiS_SetCH701x(SiS_Pr,0x03,temp); in SiS_ChrontelDoSomething1()
8782 temp = SiS_GetCH701x(SiS_Pr,0x1c); in SiS_ChrontelDoSomething1()
8783 temp &= 0xfb; /* Normal XCLK phase */ in SiS_ChrontelDoSomething1()
8784 SiS_SetCH701x(SiS_Pr,0x1c,temp); in SiS_ChrontelDoSomething1()
8788 temp = SiS_GetCH701x(SiS_Pr,0x64); in SiS_ChrontelDoSomething1()
8789 temp |= 0x40; /* ? Bit not defined */ in SiS_ChrontelDoSomething1()
8790 SiS_SetCH701x(SiS_Pr,0x64,temp); in SiS_ChrontelDoSomething1()
8792 temp = SiS_GetCH701x(SiS_Pr,0x03); in SiS_ChrontelDoSomething1()
8793 temp &= 0x3f; /* D1 input to both LVDS and TV */ in SiS_ChrontelDoSomething1()
8794 SiS_SetCH701x(SiS_Pr,0x03,temp); in SiS_ChrontelDoSomething1()
8804 temp = SiS_GetCH701x(SiS_Pr,0x66); in SiS_ChrontelDoSomething1()
8805 if(temp != 0x45) { in SiS_ChrontelDoSomething1()
8816 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x34); in SiS_ChrontelDoSomething1()
8817 SiS_ChrontelDoSomething3(SiS_Pr,temp); in SiS_ChrontelDoSomething1()
9043 unsigned short tempah,temp; in SiS_SetTrumpBlockLoop() local
9056 temp = SiS_WriteDDC2Data(SiS_Pr,tempah); /* Write DAB (S0=0=write) */ in SiS_SetTrumpBlockLoop()
9057 if(temp) continue; /* (ERROR: no ack) */ in SiS_SetTrumpBlockLoop()
9059 temp = SiS_WriteDDC2Data(SiS_Pr,tempah); /* Write register number */ in SiS_SetTrumpBlockLoop()
9060 if(temp) continue; /* (ERROR: no ack) */ in SiS_SetTrumpBlockLoop()
9063 temp = SiS_WriteDDC2Data(SiS_Pr,tempah);/* Write DAB (S0=0=write) */ in SiS_SetTrumpBlockLoop()
9064 if(temp) break; in SiS_SetTrumpBlockLoop()
9066 if(temp) continue; in SiS_SetTrumpBlockLoop()
9102 unsigned short temp, i; in SiS_SetChReg() local
9110 temp = SiS_WriteDDC2Data(SiS_Pr, SiS_Pr->SiS_DDC_DeviceAddr); /* Write DAB (S0=0=write) */ in SiS_SetChReg()
9111 if(temp) continue; /* (ERROR: no ack) */ in SiS_SetChReg()
9112temp = SiS_WriteDDC2Data(SiS_Pr, (reg | myor)); /* Write RAB (700x: set bit 7, see datasheet) */ in SiS_SetChReg()
9113 if(temp) continue; /* (ERROR: no ack) */ in SiS_SetChReg()
9114 temp = SiS_WriteDDC2Data(SiS_Pr, val); /* Write data */ in SiS_SetChReg()
9115 if(temp) continue; /* (ERROR: no ack) */ in SiS_SetChReg()
9175 unsigned short tempah, temp, i; in SiS_GetChReg() local
9183 temp = SiS_WriteDDC2Data(SiS_Pr,SiS_Pr->SiS_DDC_DeviceAddr); /* Write DAB (S0=0=write) */ in SiS_GetChReg()
9184 if(temp) continue; /* (ERROR: no ack) */ in SiS_GetChReg()
9185temp = SiS_WriteDDC2Data(SiS_Pr,SiS_Pr->SiS_DDC_ReadAddr | myor); /* Write RAB (700x: | 0x80) */ in SiS_GetChReg()
9186 if(temp) continue; /* (ERROR: no ack) */ in SiS_GetChReg()
9188 temp = SiS_WriteDDC2Data(SiS_Pr,SiS_Pr->SiS_DDC_DeviceAddr | 0x01);/* DAB (S0=1=read) */ in SiS_GetChReg()
9189 if(temp) continue; /* (ERROR: no ack) */ in SiS_GetChReg()
9278 unsigned short temp = 0, myadaptnum = adaptnum; in SiS_InitDDCRegs() local
9334 temp = 4 - (myadaptnum * 2); in SiS_InitDDCRegs()
9335 if(flag) temp = 0; in SiS_InitDDCRegs()
9364 temp = myadaptnum; in SiS_InitDDCRegs()
9366 temp = 0; in SiS_InitDDCRegs()
9370 if(flag) temp = 0; in SiS_InitDDCRegs()
9373 SiS_Pr->SiS_DDC_Data = 0x02 << temp; in SiS_InitDDCRegs()
9374 SiS_Pr->SiS_DDC_Clk = 0x01 << temp; in SiS_InitDDCRegs()
9434 unsigned short temp, ret=0; in SiS_DoProbeDDC() local
9445 temp = (unsigned char)SiS_ReadDDC2Data(SiS_Pr); in SiS_DoProbeDDC()
9447 if(temp == 0) { in SiS_DoProbeDDC()
9456 temp = (unsigned char)SiS_ReadDDC2Data(SiS_Pr); in SiS_DoProbeDDC()
9458 temp &= mask; in SiS_DoProbeDDC()
9459 if(temp == value) ret = 0; in SiS_DoProbeDDC()
9463 if(temp == 0x30) ret = 0; in SiS_DoProbeDDC()
9668 unsigned short i,flag,temp; in SiS_WriteDDC2Data() local
9687 temp = SiS_CheckACK(SiS_Pr); /* Check acknowledge */ in SiS_WriteDDC2Data()
9688 return temp; in SiS_WriteDDC2Data()
9694 unsigned short i, temp, getdata; in SiS_ReadDDC2Data() local
9705 temp = SiS_GetReg(SiS_Pr->SiS_DDC_Port,SiS_Pr->SiS_DDC_Index); in SiS_ReadDDC2Data()
9706 if(temp & SiS_Pr->SiS_DDC_Data) getdata |= 0x01; in SiS_ReadDDC2Data()
9725 unsigned short temp, watchdog=1000; in SiS_SetSCLKHigh() local
9732 temp = SiS_GetReg(SiS_Pr->SiS_DDC_Port,SiS_Pr->SiS_DDC_Index); in SiS_SetSCLKHigh()
9733 } while((!(temp & SiS_Pr->SiS_DDC_Clk)) && --watchdog); in SiS_SetSCLKHigh()
9888 unsigned short index = 0, temp = 0; in GetOEMTVPtr661_2_GEN() local
9904 temp++; in GetOEMTVPtr661_2_GEN()
9906 temp += 0x0100; in GetOEMTVPtr661_2_GEN()
9908 return (unsigned int)(index | (temp << 16)); in GetOEMTVPtr661_2_GEN()
9952 unsigned short delay=0,index,myindex,temp,romptr=0; in SetDelayComp() local
10218 temp = (SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) & 0xf0) >> 4; in SetDelayComp()
10219 if(temp == 8) { /* 1400x1050 BIOS (COMPAL) */ in SetDelayComp()
10222 } else if(temp == 6) { in SetDelayComp()
10225 } else if(temp > 7) { /* 1280x1024 BIOS (which one?) */ in SetDelayComp()
10257 unsigned short index,temp,temp1,romptr=0; in SetAntiFlicker() local
10266 temp = GetTVPtrIndex(SiS_Pr); in SetAntiFlicker()
10267 temp >>= 1; /* 0: NTSC/YPbPr, 1: PAL, 2: HiTV */ in SetAntiFlicker()
10268 temp1 = temp; in SetAntiFlicker()
10287 temp = ROMAddr[romptr + temp1 + index]; in SetAntiFlicker()
10289 temp = SiS310_TVAntiFlick1[temp][index]; in SetAntiFlicker()
10291 temp <<= 4; in SetAntiFlicker()
10293 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x0A,0x8f,temp); /* index 0A D[6:4] */ in SetAntiFlicker()
10300 unsigned short index,temp,temp1,romptr=0; in SetEdgeEnhance() local
10302 temp = temp1 = GetTVPtrIndex(SiS_Pr) >> 1; /* 0: NTSC/YPbPr, 1: PAL, 2: HiTV */ in SetEdgeEnhance()
10326 temp = ROMAddr[romptr + temp1 + index]; in SetEdgeEnhance()
10328 temp = SiS310_TVEdge1[temp][index]; in SetEdgeEnhance()
10330 temp <<= 5; in SetEdgeEnhance()
10331 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x3A,0x1F,temp); /* index 0A D[7:5] */ in SetEdgeEnhance()
10337 unsigned short index, temp, i, j; in SetYFilter() local
10345 temp = GetTVPtrIndex(SiS_Pr) >> 1; /* 0: NTSC/YPbPr, 1: PAL, 2: HiTV */ in SetYFilter()
10347 if(SiS_Pr->SiS_TVMode & TVSetNTSCJ) temp = 1; /* NTSC-J uses PAL */ in SetYFilter()
10348 else if(SiS_Pr->SiS_TVMode & TVSetPALM) temp = 3; /* PAL-M */ in SetYFilter()
10349 else if(SiS_Pr->SiS_TVMode & TVSetPALN) temp = 4; /* PAL-N */ in SetYFilter()
10350 if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) temp = 1; /* HiVision uses PAL */ in SetYFilter()
10354 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS310_TVYFilter2[temp][index][j]); in SetYFilter()
10357 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS310_TVYFilter2[temp][index][j]); in SetYFilter()
10361 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS310_TVYFilter1[temp][index][j]); in SetYFilter()
10370 unsigned short index,temp,i,j,resinfo,romptr=0; in SetPhaseIncr() local
10396 temp = GetTVPtrIndex(SiS_Pr); in SetPhaseIncr()
10419 romptr += (temp << 2); in SetPhaseIncr()
10424 index = temp % 2; in SetPhaseIncr()
10425 temp >>= 1; /* 0:NTSC, 1:PAL, 2:HiTV */ in SetPhaseIncr()
10428 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS310_TVPhaseIncr1[temp][index][j]); in SetPhaseIncr()
10430 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS310_TVPhaseIncr2[temp][index][j]); in SetPhaseIncr()
10432 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS310_TVPhaseIncr1[temp][index][j]); in SetPhaseIncr()
10618 unsigned char temp; in SetCRT2SyncDither661() local
10637 temp = (infoflag >> 6) | 0x0c; in SetCRT2SyncDither661()
10639 temp ^= 0x04; in SetCRT2SyncDither661()
10640 if(SiS_Pr->SiS_ModeType >= Mode24Bpp) temp |= 0x10; in SetCRT2SyncDither661()
10642 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1a,0xe0,temp); in SetCRT2SyncDither661()
10644 temp = 0x30; in SetCRT2SyncDither661()
10645 if(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit) temp = 0x20; in SetCRT2SyncDither661()
10646 temp |= infoflag; in SetCRT2SyncDither661()
10647 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0x0f,temp); in SetCRT2SyncDither661()
10648 temp = 0; in SetCRT2SyncDither661()
10650 if(SiS_Pr->SiS_ModeType >= Mode24Bpp) temp |= 0x80; in SetCRT2SyncDither661()
10652 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x1a,0x7f,temp); in SetCRT2SyncDither661()
10752 unsigned short tempcl,tempch,tempbl,tempbh,tempbx,tempax,temp; in SiS_FinalizeLCD() local
10875 temp = tempbx & 0xff; in SiS_FinalizeLCD()
10876 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1b,temp); in SiS_FinalizeLCD()
10877 temp = (tempbx >> 8) & 0x03; in SiS_FinalizeLCD()
10878 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x1d,0xf8,temp); in SiS_FinalizeLCD()
10939 temp = tempbx & 0xff; in SiS_FinalizeLCD()
10940 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x04,temp); in SiS_FinalizeLCD()
10941 temp = ((tempbx & 0xff00) >> 4) | tempcl; in SiS_FinalizeLCD()
10942 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x01,0x80,temp); in SiS_FinalizeLCD()
10958 unsigned char temp; in SetOEMLCDData2() local
10988 temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00); in SetOEMLCDData2()
10989 if(temp & 0x80) { in SetOEMLCDData2()
10990 temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x18); in SetOEMLCDData2()
10991 temp++; in SetOEMLCDData2()
10992 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x18,temp); in SetOEMLCDData2()
11063 unsigned short index,temp,romptr=0; in SetOEMLCDDelay() local
11082 temp = GetOEMLCDPtr(SiS_Pr, 0); in SetOEMLCDDelay()
11091 romptr += (temp * 2); in SetOEMLCDDelay()
11094 temp = ROMAddr[romptr]; in SetOEMLCDDelay()
11097 temp = SiS300_OEMLCDDelay2[temp][index]; in SetOEMLCDDelay()
11099 temp = SiS300_OEMLCDDelay3[temp][index]; in SetOEMLCDDelay()
11105 romptr += (temp * 2); in SetOEMLCDDelay()
11108 temp = ROMAddr[romptr]; in SetOEMLCDDelay()
11110 temp = SiS300_OEMLCDDelay5[temp][index]; in SetOEMLCDDelay()
11116 romptr += (temp * 2); in SetOEMLCDDelay()
11119 temp = ROMAddr[romptr]; in SetOEMLCDDelay()
11121 temp = SiS300_OEMLCDDelay4[temp][index]; in SetOEMLCDDelay()
11124 temp = SiS300_OEMLCDDelay4[temp][index]; in SetOEMLCDDelay()
11128 temp &= 0x3c; in SetOEMLCDDelay()
11129 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,~0x3C,temp); /* index 0A D[6:4] */ in SetOEMLCDDelay()
11137 unsigned short index,temp; in SetOEMLCDData()
11145 temp = GetOEMLCDPtr(SiS_Pr, 1); in SetOEMLCDData()
11146 if(temp == 0xFFFF) return; in SetOEMLCDData()
11150 SiS_SetReg(SiS_Pr->SiS_Part1Port,i,SiS300_LCDHData[temp][index][j]); in SetOEMLCDData()
11152 SiS_SetRegANDOR(SiS_SiS_Part1Port,0x1a, 0xf8, (SiS300_LCDHData[temp][index][j] & 0x07)); in SetOEMLCDData()
11155 SiS_SetReg(SiS_SiS_Part1Port,0x18, SiS300_LCDVData[temp][index][0]); in SetOEMLCDData()
11156 SiS_SetRegANDOR(SiS_SiS_Part1Port,0x19, 0xF0, SiS300_LCDVData[temp][index][1]); in SetOEMLCDData()
11157 SiS_SetRegANDOR(SiS_SiS_Part1Port,0x1A, 0xC7, (SiS300_LCDVData[temp][index][2] & 0x38)); in SetOEMLCDData()
11159 SiS_SetReg(SiS_Pr->SiS_Part1Port,i,SiS300_LCDVData[temp][index][j]); in SetOEMLCDData()
11186 unsigned short index,temp,romptr=0; in SetOEMTVDelay() local
11194 temp = GetOEMTVPtr(SiS_Pr); in SetOEMTVDelay()
11199 romptr += (temp * 2); in SetOEMTVDelay()
11202 temp = ROMAddr[romptr]; in SetOEMTVDelay()
11205 temp = SiS300_OEMTVDelay301[temp][index]; in SetOEMTVDelay()
11207 temp = SiS300_OEMTVDelayLVDS[temp][index]; in SetOEMTVDelay()
11210 temp &= 0x3c; in SetOEMTVDelay()
11211 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,~0x3C,temp); in SetOEMTVDelay()
11218 unsigned short index,temp,romptr=0; in SetOEMAntiFlicker() local
11226 temp = GetOEMTVPtr(SiS_Pr); in SetOEMAntiFlicker()
11231 romptr += (temp * 2); in SetOEMAntiFlicker()
11234 temp = ROMAddr[romptr]; in SetOEMAntiFlicker()
11236 temp = SiS300_OEMTVFlicker[temp][index]; in SetOEMAntiFlicker()
11238 temp &= 0x70; in SetOEMAntiFlicker()
11239 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x0A,0x8F,temp); in SetOEMAntiFlicker()
11246 unsigned short index,i,j,temp,romptr=0; in SetOEMPhaseIncr() local
11258 temp = GetOEMTVPtr(SiS_Pr); in SetOEMPhaseIncr()
11264 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS300_Phase2[temp][index][j]); in SetOEMPhaseIncr()
11268 romptr += (temp * 2); in SetOEMPhaseIncr()
11276 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS300_Phase1[temp][index][j]); in SetOEMPhaseIncr()
11286 unsigned short index,temp,i,j,romptr=0; in SetOEMYFilter() local
11296 temp = GetOEMTVPtr(SiS_Pr); in SetOEMYFilter()
11298 if(SiS_Pr->SiS_TVMode & TVSetPALM) temp = 8; in SetOEMYFilter()
11299 else if(SiS_Pr->SiS_TVMode & TVSetPALN) temp = 9; in SetOEMYFilter()
11306 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS300_Filter2[temp][index][j]); in SetOEMYFilter()
11309 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS300_Filter2[temp][index][j]); in SetOEMYFilter()
11313 romptr += (temp * 2); in SetOEMYFilter()
11321 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS300_Filter1[temp][index][j]); in SetOEMYFilter()