Lines Matching refs:temp
613 unsigned short modeflag,index,temp,backupindex; in SiS_GetRatePtr() local
652 temp = LCDRefreshIndex[SiS_GetBIOSLCDResInfo(SiS_Pr)]; in SiS_GetRatePtr()
653 if(index > temp) index = temp; in SiS_GetRatePtr()
679 temp = SiS_Pr->SiS_RefIndex[RRTI + i].Ext_InfoFlag; in SiS_GetRatePtr()
680 temp &= ModeTypeMask; in SiS_GetRatePtr()
681 if(temp < SiS_Pr->SiS_ModeType) break; in SiS_GetRatePtr()
688 temp = SiS_Pr->SiS_RefIndex[RRTI + i - 1].Ext_InfoFlag; in SiS_GetRatePtr()
689 if(temp & InterlaceMode) i++; in SiS_GetRatePtr()
730 unsigned short temp,temp1; in SiS_CR36BIOSWord23b() local
734 temp = 1 << ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) >> 4) & 0x0f); in SiS_CR36BIOSWord23b()
736 if(temp1 & temp) return true; in SiS_CR36BIOSWord23b()
746 unsigned short temp,temp1; in SiS_CR36BIOSWord23d() local
750 temp = 1 << ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) >> 4) & 0x0f); in SiS_CR36BIOSWord23d()
752 if(temp1 & temp) return true; in SiS_CR36BIOSWord23d()
975 unsigned short tempal,temp,i,j; in SiS_VBWait() local
977 temp = 0; in SiS_VBWait()
981 if(temp & 0x01) { in SiS_VBWait()
989 temp ^= 0x01; in SiS_VBWait()
1240 unsigned short temp; in SiS_SetChrontelGPIO() local
1247 temp = SiS_GetRegShort((acpibase + 0x3c)); /* ACPI register 0x3c: GP Event 1 I/O mode select */ in SiS_SetChrontelGPIO()
1248 temp &= 0xFEFF; in SiS_SetChrontelGPIO()
1249 SiS_SetRegShort((acpibase + 0x3c), temp); in SiS_SetChrontelGPIO()
1250 temp = SiS_GetRegShort((acpibase + 0x3c)); in SiS_SetChrontelGPIO()
1251 temp = SiS_GetRegShort((acpibase + 0x3a)); /* ACPI register 0x3a: GP Pin Level (low/high) */ in SiS_SetChrontelGPIO()
1252 temp &= 0xFEFF; in SiS_SetChrontelGPIO()
1253 if(!(myvbinfo & SetCRT2ToTV)) temp |= 0x0100; in SiS_SetChrontelGPIO()
1254 SiS_SetRegShort((acpibase + 0x3a), temp); in SiS_SetChrontelGPIO()
1255 temp = SiS_GetRegShort((acpibase + 0x3a)); in SiS_SetChrontelGPIO()
1263 unsigned short tempax, tempbx, temp; in SiS_GetVBInfo() local
1280 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x30); in SiS_GetVBInfo()
1281 tempbx |= temp; in SiS_GetVBInfo()
1306 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38); in SiS_GetVBInfo()
1307 if((temp & (EnableDualEdge | SetToLCDA)) == (EnableDualEdge | SetToLCDA)) { in SiS_GetVBInfo()
1315 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35) & 0xe0; in SiS_GetVBInfo()
1316 if(temp == 0x60) tempbx |= SetCRT2ToHiVision; in SiS_GetVBInfo()
1324 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38); in SiS_GetVBInfo()
1325 if(temp & SetToLCDA) { in SiS_GetVBInfo()
1329 if(temp & EnableCHYPbPr) { in SiS_GetVBInfo()
1343 temp = SetCRT2ToSVIDEO | in SiS_GetVBInfo()
1354 temp = SetCRT2ToAVIDEO | in SiS_GetVBInfo()
1361 temp = SetCRT2ToLCDA | in SiS_GetVBInfo()
1366 temp = SetCRT2ToTV | SetCRT2ToLCD; in SiS_GetVBInfo()
1368 temp = SetCRT2ToLCD; in SiS_GetVBInfo()
1373 if(!(tempbx & temp)) { in SiS_GetVBInfo()
1491 unsigned char temp; in SiS_SetYPbPr() local
1512 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38); in SiS_SetYPbPr()
1513 if(temp & 0x08) { in SiS_SetYPbPr()
1514 switch((temp >> 4)) { in SiS_SetYPbPr()
1534 unsigned short temp, temp1, resinfo = 0, romindex = 0; in SiS_SetTVMode() local
1551 temp = 0; in SiS_SetTVMode()
1554 temp = 0x35; in SiS_SetTVMode()
1557 temp = 0x38; in SiS_SetTVMode()
1563 if(temp) { in SiS_SetTVMode()
1567 SiS_SetRegAND(SiS_Pr->SiS_P3d4,temp,0x3F); in SiS_SetTVMode()
1570 temp1 = SiS_GetReg(SiS_Pr->SiS_P3d4,temp); in SiS_SetTVMode()
1600 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35); in SiS_SetTVMode()
1601 if((temp & TVOverScan) || (SiS_Pr->SiS_CHOverScan == 1)) { in SiS_SetTVMode()
1605 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x79); in SiS_SetTVMode()
1606 if((temp & 0x80) || (SiS_Pr->SiS_CHOverScan == 1)) { in SiS_SetTVMode()
1615 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38); in SiS_SetTVMode()
1617 if(temp & EnablePALM) SiS_Pr->SiS_TVMode |= TVSetPALM; in SiS_SetTVMode()
1618 else if(temp & EnablePALN) SiS_Pr->SiS_TVMode |= TVSetPALN; in SiS_SetTVMode()
1620 if(temp & EnableNTSCJ) { in SiS_SetTVMode()
1733 unsigned short temp = SiS_Pr->SiS_LCDResInfo; in SiS_GetBIOSLCDResInfo() local
1735 switch(temp) { in SiS_GetBIOSLCDResInfo()
1736 case Panel_1280x768_2: temp = Panel_1280x768; break; in SiS_GetBIOSLCDResInfo()
1737 case Panel_1280x800_2: temp = Panel_1280x800; break; in SiS_GetBIOSLCDResInfo()
1738 case Panel_1280x854: temp = Panel661_1280x854; break; in SiS_GetBIOSLCDResInfo()
1740 return temp; in SiS_GetBIOSLCDResInfo()
1748 unsigned short temp; in SiS_GetLCDInfoBIOS() local
1751 if((temp = SISGETROMW(6)) != SiS_Pr->PanelHT) { in SiS_GetLCDInfoBIOS()
1753 SiS_Pr->PanelHT = temp; in SiS_GetLCDInfoBIOS()
1755 if((temp = SISGETROMW(8)) != SiS_Pr->PanelVT) { in SiS_GetLCDInfoBIOS()
1757 SiS_Pr->PanelVT = temp; in SiS_GetLCDInfoBIOS()
1794 unsigned short temp,modeflag,resinfo=0,modexres=0,modeyres=0; in SiS_GetLCDResInfo() local
1828 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36); in SiS_GetLCDResInfo()
1831 if(temp == 0) temp = 0x02; in SiS_GetLCDResInfo()
1836 SiS_Pr->SiS_LCDTypeInfo = temp >> 4; in SiS_GetLCDResInfo()
1838 SiS_Pr->SiS_LCDTypeInfo = (temp & 0x0F) - 1; in SiS_GetLCDResInfo()
1840 temp &= 0x0f; in SiS_GetLCDResInfo()
1845 if(temp < 0x0f) temp &= 0x07; in SiS_GetLCDResInfo()
1848 temp = SiS300SeriesLCDRes[temp]; in SiS_GetLCDResInfo()
1855 if (temp == Panel310_1152x768) temp = Panel_320x240_2; /* Verified working */ in SiS_GetLCDResInfo()
1856 else if(temp == Panel310_320x240_2) temp = Panel_320x240_2; in SiS_GetLCDResInfo()
1857 else if(temp == Panel310_320x240_3) temp = Panel_320x240_3; in SiS_GetLCDResInfo()
1859 if(temp == Panel661_1280x854) temp = Panel_1280x854; in SiS_GetLCDResInfo()
1864 if(temp == Panel310_1280x768) { in SiS_GetLCDResInfo()
1865 temp = Panel_1280x768_2; in SiS_GetLCDResInfo()
1868 if(temp == Panel661_1280x800) { in SiS_GetLCDResInfo()
1869 temp = Panel_1280x800_2; in SiS_GetLCDResInfo()
1874 SiS_Pr->SiS_LCDResInfo = temp; in SiS_GetLCDResInfo()
1896 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x37); in SiS_GetLCDResInfo()
1897 SiS_Pr->SiS_LCDInfo = temp & ~0x000e; in SiS_GetLCDResInfo()
1921 if(temp & 0x08) SiS_Pr->SiS_LCDInfo |= LCDPass11; in SiS_GetLCDResInfo()
1925 if(temp & 0x02) SiS_Pr->SiS_LCDInfo |= LCDDualLink; in SiS_GetLCDResInfo()
1936 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35); in SiS_GetLCDResInfo()
1937 if(temp & 0x01) SiS_Pr->SiS_LCDInfo |= LCDRGB18Bit; in SiS_GetLCDResInfo()
1939 if(temp & 0x02) SiS_Pr->SiS_LCDInfo |= LCDDualLink; in SiS_GetLCDResInfo()
4133 unsigned short temp; in SiS_HandlePWD() local
4143 temp = 0x00; in SiS_HandlePWD()
4145 temp = 0x80; in SiS_HandlePWD()
4148 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x27,0x7f,temp); in SiS_HandlePWD()
4165 unsigned short temp=0; in SiS_DisableBridge() local
4299 temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00); in SiS_DisableBridge()
4302 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x00,temp); in SiS_DisableBridge()
4359 temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00); in SiS_DisableBridge()
4362 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x00,temp); in SiS_DisableBridge()
4439 temp = SiS_GetCH701x(SiS_Pr,0x61); in SiS_DisableBridge()
4440 if(temp < 1) { in SiS_DisableBridge()
4561 unsigned short temp=0, tempah; in SiS_EnableBridge() local
4612 temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x32) & 0xDF; /* lock mode */ in SiS_EnableBridge()
4615 if(!(tempah & SetCRT2ToRAMDAC)) temp |= 0x20; in SiS_EnableBridge()
4617 SiS_SetReg(SiS_Pr->SiS_P3c4,0x32,temp); in SiS_EnableBridge()
4706 temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x32) & 0xDF; in SiS_EnableBridge()
4710 if(!(SiS_LCDAEnabled(SiS_Pr))) temp |= 0x20; in SiS_EnableBridge()
4713 SiS_SetReg(SiS_Pr->SiS_P3c4,0x32,temp); in SiS_EnableBridge()
4952 temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x32) & 0xDF; /* lock mode */ in SiS_EnableBridge()
4955 if(!(tempah & SetCRT2ToRAMDAC)) temp |= 0x20; in SiS_EnableBridge()
4957 SiS_SetReg(SiS_Pr->SiS_P3c4,0x32,temp); in SiS_EnableBridge()
4962 temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x2E); in SiS_EnableBridge()
4963 if(!(temp & 0x80)) { in SiS_EnableBridge()
5059 temp = SiS_GetCH701x(SiS_Pr,0x66); in SiS_EnableBridge()
5060 temp &= 0x20; in SiS_EnableBridge()
5082 if(temp) { in SiS_EnableBridge()
5150 unsigned char temp; in SiS_SetCRT2Offset() local
5159 temp = (unsigned char)(((offset >> 3) & 0xFF) + 1); in SiS_SetCRT2Offset()
5160 if(offset & 0x07) temp++; in SiS_SetCRT2Offset()
5161 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x03,temp); in SiS_SetCRT2Offset()
5338 unsigned short temp, index, modeidindex, refreshratetableindex; in SiS_SetCRT2FIFO_300() local
5388 temp = ((SiS_GetReg(SiS_Pr->SiS_P3c4,0x14) >> 6) & 0x03) << 1; in SiS_SetCRT2FIFO_300()
5389 if(!temp) temp++; in SiS_SetCRT2FIFO_300()
5390 temp <<= 2; in SiS_SetCRT2FIFO_300()
5392 data2 = temp - ((colorth * VCLK) / MCLK); in SiS_SetCRT2FIFO_300()
5394 temp = (28 * 16) % data2; in SiS_SetCRT2FIFO_300()
5396 if(temp) data2++; in SiS_SetCRT2FIFO_300()
5472 temp = data % (MCLK << 4); in SiS_SetCRT2FIFO_300()
5474 if(temp) data++; in SiS_SetCRT2FIFO_300()
5480 temp = 0x16; in SiS_SetCRT2FIFO_300()
5482 temp = 0x13; in SiS_SetCRT2FIFO_300()
5484 temp = 0x16; in SiS_SetCRT2FIFO_300()
5488 temp = 0x1b; in SiS_SetCRT2FIFO_300()
5490 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x01,0xe0,temp); in SiS_SetCRT2FIFO_300()
5547 unsigned short temp, modeflag, i, j, xres=0, VGAVDE; in SiS_SetGroup1_301() local
5590 temp = SiS_Pr->SiS_VGAHT - 96; in SiS_SetGroup1_301()
5591 if(!(modeflag & HalfDCLK)) temp -= 32; in SiS_SetGroup1_301()
5593 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x04); in SiS_SetGroup1_301()
5594 temp |= ((SiS_GetReg(SiS_Pr->SiS_P3c4,0x0b) & 0xc0) << 2); in SiS_SetGroup1_301()
5595 temp -= 3; in SiS_SetGroup1_301()
5596 temp <<= 3; in SiS_SetGroup1_301()
5598 if(SiS_Pr->SiS_RVBHRS2) temp = SiS_Pr->SiS_RVBHRS2; in SiS_SetGroup1_301()
5600 SiS_Pr->CHSyncStart = temp; in SiS_SetGroup1_301()
5621 temp = (SiS_Pr->SiS_VGAVT - VGAVDE) >> 1; in SiS_SetGroup1_301()
5622 SiS_Pr->CVSyncStart = VGAVDE + temp; in SiS_SetGroup1_301()
5624 temp >>= 3; in SiS_SetGroup1_301()
5625 SiS_Pr->CVSyncEnd = SiS_Pr->CVSyncStart + temp; in SiS_SetGroup1_301()
5643 temp = SiS_Pr->CCRT1CRTC[16] & 0xE0; in SiS_SetGroup1_301()
5644 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,CRTranslation[0x0E],0x1F,temp); in SiS_SetGroup1_301()
5646 temp = (SiS_Pr->CCRT1CRTC[16] & 0x01) << 5; in SiS_SetGroup1_301()
5647 if(modeflag & DoubleScanMode) temp |= 0x80; in SiS_SetGroup1_301()
5648 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,CRTranslation[0x09],0x5F,temp); in SiS_SetGroup1_301()
5650 temp = 0; in SiS_SetGroup1_301()
5651 temp |= (SiS_GetReg(SiS_Pr->SiS_P3c4,0x01) & 0x01); in SiS_SetGroup1_301()
5652 if(modeflag & HalfDCLK) temp |= 0x08; in SiS_SetGroup1_301()
5653 …SiS_SetReg(SiS_Pr->SiS_Part1Port,0x16,temp); /* SR01: HalfDCLK[3], 8/9 div dotclock[… in SiS_SetGroup1_301()
5658 temp = 0; in SiS_SetGroup1_301()
5660 temp = (SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x01) << 7; in SiS_SetGroup1_301()
5662 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1A,temp); /* SR0E, dither[7] */ in SiS_SetGroup1_301()
5664 temp = SiS_GetRegByte((SiS_Pr->SiS_P3ca+0x02)); in SiS_SetGroup1_301()
5665 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1b,temp); /* ? */ in SiS_SetGroup1_301()
5677 unsigned short push2, tempax, tempbx, tempcx, temp; in SiS_SetGroup1_LVDS() local
5761 temp = (tempax & 0x0007); in SiS_SetGroup1_LVDS()
5762 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1A,temp); /* BPLHDESKEW[2:0] */ in SiS_SetGroup1_LVDS()
5763 temp = (tempax >> 3) & 0x00FF; in SiS_SetGroup1_LVDS()
5764 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x16,temp); /* BPLHDESKEW[10:3] */ in SiS_SetGroup1_LVDS()
5781 temp = tempax; in SiS_SetGroup1_LVDS()
5782 if(temp & 0x07) temp += 8; in SiS_SetGroup1_LVDS()
5783 temp >>= 3; in SiS_SetGroup1_LVDS()
5784 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x17,temp); /* BPLHDEE */ in SiS_SetGroup1_LVDS()
5797 temp = (tempcx >> 3) & 0x00FF; in SiS_SetGroup1_LVDS()
5804 case 0x0d: temp = 0x56; break; in SiS_SetGroup1_LVDS()
5805 case 0x10: temp = 0x60; break; in SiS_SetGroup1_LVDS()
5806 case 0x13: temp = 0x5f; break; in SiS_SetGroup1_LVDS()
5816 case 0x5e: temp = 0x54; break; in SiS_SetGroup1_LVDS()
5821 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x14,temp); /* BPLHRS */ in SiS_SetGroup1_LVDS()
5824 temp += 2; in SiS_SetGroup1_LVDS()
5826 temp += 8; in SiS_SetGroup1_LVDS()
5828 temp = tempcx + SiS_Pr->PanelHRE; in SiS_SetGroup1_LVDS()
5829 if(temp >= SiS_Pr->SiS_HT) temp -= SiS_Pr->SiS_HT; in SiS_SetGroup1_LVDS()
5830 temp >>= 3; in SiS_SetGroup1_LVDS()
5834 temp += 10; in SiS_SetGroup1_LVDS()
5837 temp &= 0x1F; in SiS_SetGroup1_LVDS()
5838 temp |= ((tempcx & 0x07) << 5); in SiS_SetGroup1_LVDS()
5839 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x15,temp); /* BPLHRE */ in SiS_SetGroup1_LVDS()
5880 temp = tempbx & 0x00FF; in SiS_SetGroup1_LVDS()
5883 if(ModeNo == 0x10) temp = 0xa9; in SiS_SetGroup1_LVDS()
5886 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x18,temp); /* BPLVRS */ in SiS_SetGroup1_LVDS()
5898 temp = tempcx & 0x000F; in SiS_SetGroup1_LVDS()
5899 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0xF0,temp); /* BPLVRE */ in SiS_SetGroup1_LVDS()
5901 temp = ((tempbx >> 8) & 0x07) << 3; in SiS_SetGroup1_LVDS()
5904 if(SiS_Pr->SiS_VGAVDE != SiS_Pr->SiS_VDE) temp |= 0x40; in SiS_SetGroup1_LVDS()
5906 } else if(SiS_Pr->SiS_VGAVDE != SiS_Pr->SiS_VDE) temp |= 0x40; in SiS_SetGroup1_LVDS()
5907 if(SiS_Pr->SiS_SetFlag & EnableLVDSDDA) temp |= 0x40; in SiS_SetGroup1_LVDS()
5913 if(SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x03) temp |= 0x80; in SiS_SetGroup1_LVDS()
5918 if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x06) & 0x10) temp |= 0x80; in SiS_SetGroup1_LVDS()
5920 if(SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x01) temp |= 0x80; in SiS_SetGroup1_LVDS()
5924 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x1A,tempbx,temp); in SiS_SetGroup1_LVDS()
5959 temp = ((tempbx >> 8) & 0x07) << 3; in SiS_SetGroup1_LVDS()
5960 temp |= ((tempcx >> 8) & 0x07); in SiS_SetGroup1_LVDS()
5961 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1D,temp); in SiS_SetGroup1_LVDS()
5971 temp = (tempeax % (unsigned int)SiS_Pr->SiS_VDE); in SiS_SetGroup1_LVDS()
5973 if(temp) tempeax++; in SiS_SetGroup1_LVDS()
5977 temp = (unsigned short)(tempeax & 0x00FF); in SiS_SetGroup1_LVDS()
5978 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1E,temp); /* BPLVCFACT */ in SiS_SetGroup1_LVDS()
5979 tempvcfact = temp; in SiS_SetGroup1_LVDS()
5987 temp = (tempeax % tempebx); in SiS_SetGroup1_LVDS()
5989 if(temp) tempeax++; in SiS_SetGroup1_LVDS()
5992 temp = (unsigned short)(tempeax & 0x00FF); in SiS_SetGroup1_LVDS()
5993 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x37,temp); in SiS_SetGroup1_LVDS()
5994 temp = (unsigned short)((tempeax & 0x00FF00) >> 8); in SiS_SetGroup1_LVDS()
5995 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x36,temp); in SiS_SetGroup1_LVDS()
5996 temp = (unsigned short)((tempeax & 0x00030000) >> 16); in SiS_SetGroup1_LVDS()
5997 if(SiS_Pr->SiS_VDE == SiS_Pr->SiS_VGAVDE) temp |= 0x04; in SiS_SetGroup1_LVDS()
5998 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x35,temp); in SiS_SetGroup1_LVDS()
6001 temp = (unsigned short)(tempeax & 0x00FF); in SiS_SetGroup1_LVDS()
6002 SiS_SetReg(SiS_Pr->SiS_Part4Port,0x3c,temp); in SiS_SetGroup1_LVDS()
6003 temp = (unsigned short)((tempeax & 0x00FF00) >> 8); in SiS_SetGroup1_LVDS()
6004 SiS_SetReg(SiS_Pr->SiS_Part4Port,0x3b,temp); in SiS_SetGroup1_LVDS()
6005 temp = (unsigned short)(((tempeax & 0x00030000) >> 16) << 6); in SiS_SetGroup1_LVDS()
6006 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x3a,0x3f,temp); in SiS_SetGroup1_LVDS()
6007 temp = 0; in SiS_SetGroup1_LVDS()
6008 if(SiS_Pr->SiS_VDE != SiS_Pr->SiS_VGAVDE) temp |= 0x08; in SiS_SetGroup1_LVDS()
6009 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x30,0xf3,temp); in SiS_SetGroup1_LVDS()
6037 temp = (unsigned short)(tempecx & 0x00FF); in SiS_SetGroup1_LVDS()
6038 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1F,temp); in SiS_SetGroup1_LVDS()
6056 temp = ((tempbx >> 8) & 0x07) << 3; in SiS_SetGroup1_LVDS()
6057 temp = temp | ((tempecx >> 8) & 0x07); in SiS_SetGroup1_LVDS()
6058 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x20,temp); in SiS_SetGroup1_LVDS()
6065 temp = (unsigned short)((tempecx & 0xFF00) >> 8); in SiS_SetGroup1_LVDS()
6066 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x22,temp); in SiS_SetGroup1_LVDS()
6067 temp = (unsigned short)(tempecx & 0x00FF); in SiS_SetGroup1_LVDS()
6068 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x23,temp); in SiS_SetGroup1_LVDS()
6139 temp = (tempax >> 8) << 3; in SiS_SetGroup1_LVDS()
6140 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x35,~0x078,temp); in SiS_SetGroup1_LVDS()
6152 temp = (tempax >> 8) << 3; in SiS_SetGroup1_LVDS()
6153 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x3C,~0x038,temp); in SiS_SetGroup1_LVDS()
6160 temp = tempeax & 0x7f; in SiS_SetGroup1_LVDS()
6162 if(temp) tempeax++; in SiS_SetGroup1_LVDS()
6163 temp = tempeax & 0x3f; in SiS_SetGroup1_LVDS()
6164 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x45,temp); in SiS_SetGroup1_LVDS()
6176 temp = tempax & 0x00FF; in SiS_SetGroup1_LVDS()
6177 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x43,temp); in SiS_SetGroup1_LVDS()
6178 temp = ((tempax & 0xFF00) >> 8) << 3; in SiS_SetGroup1_LVDS()
6179 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port, 0x44, 0x07, temp); in SiS_SetGroup1_LVDS()
6186 temp = tempeax & 0xFF; in SiS_SetGroup1_LVDS()
6187 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x42,temp); in SiS_SetGroup1_LVDS()
6188 temp = (tempeax & 0xFF00) >> 8; in SiS_SetGroup1_LVDS()
6189 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x41,temp); in SiS_SetGroup1_LVDS()
6190 temp = ((tempeax & 0xFF0000) >> 16) | 0x10; in SiS_SetGroup1_LVDS()
6191 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x40,temp); in SiS_SetGroup1_LVDS()
6192 temp = ((tempeax & 0x01000000) >> 24) << 7; in SiS_SetGroup1_LVDS()
6193 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port, 0x3C, 0x7F, temp); in SiS_SetGroup1_LVDS()
6235 unsigned short temp=0, tempax=0, tempbx=0, tempcx=0, bridgeadd=0; in SiS_SetGroup1() local
6278 temp = (SiS_Pr->SiS_VGAHT - 1) & 0x0FF; /* BTVGA2HT 0x08,0x09 */ in SiS_SetGroup1()
6279 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x08,temp); /* CRT2 Horizontal Total */ in SiS_SetGroup1()
6281 temp = (((SiS_Pr->SiS_VGAHT - 1) & 0xFF00) >> 8) << 4; in SiS_SetGroup1()
6282 …SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x09,0x0f,temp); /* CRT2 Horizontal Total Overflow [7:4] … in SiS_SetGroup1()
6284 temp = (SiS_Pr->SiS_VGAHDE + 12) & 0x0FF; /* BTVGA2HDEE 0x0A,0x0C */ in SiS_SetGroup1()
6285 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0A,temp); /* CRT2 Horizontal Display Enable End */ in SiS_SetGroup1()
6315 temp = (tempcx >> 4) & 0xF0; in SiS_SetGroup1()
6316 …SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x09,0x0F,temp); /* CRT2 Horizontal Total Overflow [7:4] … in SiS_SetGroup1()
6401 temp = ((tempbx >> 8) & 0x0F) | ((pushbx >> 4) & 0xF0); in SiS_SetGroup1()
6402 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0C,temp); /* Overflow */ in SiS_SetGroup1()
6407 temp = tempcx & 0x00FF; in SiS_SetGroup1()
6414 temp--; in SiS_SetGroup1()
6418 temp--; in SiS_SetGroup1()
6421 temp--; in SiS_SetGroup1()
6424 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0E,temp); /* CRT2 Vertical Total */ in SiS_SetGroup1()
6429 temp = ((tempbx >> 5) & 0x38) | ((tempcx >> 8) & 0x07); in SiS_SetGroup1()
6430 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x12,temp); /* Overflow */ in SiS_SetGroup1()
6474 temp = ((tempbx >> 4) & 0x70) | (tempcx & 0x0F); in SiS_SetGroup1()
6475 …SiS_SetReg(SiS_Pr->SiS_Part1Port,0x11,temp); /* CRT2 Vert. Retrace End; Overflow */ in SiS_SetGroup1()
6484 temp = 0x20; in SiS_SetGroup1()
6486 temp = 0x10; in SiS_SetGroup1()
6487 if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) temp = 0x2c; in SiS_SetGroup1()
6488 if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) temp = 0x20; in SiS_SetGroup1()
6491 if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) temp = 0x20; in SiS_SetGroup1()
6493 if(SiS_Pr->SiS_LCDResInfo == Panel_1280x960) temp = 0x24; in SiS_SetGroup1()
6494 if(SiS_Pr->SiS_LCDResInfo == Panel_Custom) temp = 0x2c; in SiS_SetGroup1()
6495 if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) temp = 0x08; in SiS_SetGroup1()
6497 if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) temp = 0x2c; in SiS_SetGroup1()
6498 else temp = 0x20; in SiS_SetGroup1()
6503 temp = ROMAddr[0x221]; in SiS_SetGroup1()
6505 temp = ROMAddr[0x222]; in SiS_SetGroup1()
6507 temp = ROMAddr[0x223]; in SiS_SetGroup1()
6509 temp = ROMAddr[0x224]; in SiS_SetGroup1()
6513 if(SiS_Pr->PDC != -1) temp = SiS_Pr->PDC; in SiS_SetGroup1()
6517 temp = 0x20; in SiS_SetGroup1()
6519 if(SiS_Pr->SiS_LCDResInfo == Panel_640x480) temp = 0x04; in SiS_SetGroup1()
6523 temp = ROMAddr[0x220]; in SiS_SetGroup1()
6527 if(SiS_Pr->PDC != -1) temp = SiS_Pr->PDC; in SiS_SetGroup1()
6531 temp &= 0x3c; in SiS_SetGroup1()
6533 …SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,~0x3C,temp); /* Panel Link Delay Compensation; (Softw… in SiS_SetGroup1()
6545 if(SiS_Pr->ChipType == SIS_740) temp = 0x03; in SiS_SetGroup1()
6546 else temp = 0x00; in SiS_SetGroup1()
6548 if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) temp = 0x0a; in SiS_SetGroup1()
6557 temp = 0x08; in SiS_SetGroup1()
6564 … SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2D,tempbl,temp); /* Panel Link Delay Compensation */ in SiS_SetGroup1()
6652 unsigned char temp; in SiS_SetGroup2_C_ELV() local
6667 temp = 0x10; in SiS_SetGroup2_C_ELV()
6668 if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) temp |= 0x04; in SiS_SetGroup2_C_ELV()
6669 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x4e,0xeb,temp); in SiS_SetGroup2_C_ELV()
6850 unsigned short temp; in SiS_SetGroup2_Tail() local
6854 temp = 0xc3; in SiS_SetGroup2_Tail()
6856 temp++; in SiS_SetGroup2_Tail()
6857 if(SiS_Pr->SiS_VBType & VB_SIS30xBLV) temp += 2; in SiS_SetGroup2_Tail()
6859 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2f,temp); in SiS_SetGroup2_Tail()
6862 temp = 0x4d; in SiS_SetGroup2_Tail()
6864 temp++; in SiS_SetGroup2_Tail()
6865 if(SiS_Pr->SiS_VBType & VB_SIS30xBLV) temp++; in SiS_SetGroup2_Tail()
6867 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2f,temp); in SiS_SetGroup2_Tail()
6877 temp = 1; in SiS_SetGroup2_Tail()
6878 if(ModeNo <= 0x13) temp = 3; in SiS_SetGroup2_Tail()
6879 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x0b,temp); in SiS_SetGroup2_Tail()
6910 unsigned short i, j, tempax, tempbx, tempcx, tempch, tempcl, temp; in SiS_SetGroup2() local
6933 temp = 0; in SiS_SetGroup2()
6934 if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToAVIDEO)) temp |= 0x08; in SiS_SetGroup2()
6935 if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToSVIDEO)) temp |= 0x04; in SiS_SetGroup2()
6936 if(SiS_Pr->SiS_VBInfo & SetCRT2ToSCART) temp |= 0x02; in SiS_SetGroup2()
6937 if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) temp |= 0x01; in SiS_SetGroup2()
6939 if(!(SiS_Pr->SiS_TVMode & TVSetPAL)) temp |= 0x10; in SiS_SetGroup2()
6941 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x00,temp); in SiS_SetGroup2()
7040 temp = tempax + (unsigned short)TimingPoint[0]; in SiS_SetGroup2()
7041 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,temp); in SiS_SetGroup2()
7043 temp = tempax + (unsigned short)TimingPoint[1]; in SiS_SetGroup2()
7044 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,temp); in SiS_SetGroup2()
7133 temp = (tempcx >> 8) & 0x0F; in SiS_SetGroup2()
7134 temp |= ((tempbx >> 2) & 0xC0); in SiS_SetGroup2()
7136 temp |= 0x10; in SiS_SetGroup2()
7137 if(SiS_Pr->SiS_VBInfo & SetCRT2ToAVIDEO) temp |= 0x20; in SiS_SetGroup2()
7139 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x30,temp); in SiS_SetGroup2()
7152 temp = ((tempbx >> 3) & 0x60) | 0x18; in SiS_SetGroup2()
7153 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x46,temp); in SiS_SetGroup2()
7212 temp = (tempcx & 0x0300) >> 6; in SiS_SetGroup2()
7213 temp |= ((tempbx >> 8) & 0x03); in SiS_SetGroup2()
7215 temp |= 0x10; in SiS_SetGroup2()
7216 if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) temp |= 0x20; in SiS_SetGroup2()
7217 else if(SiS_Pr->SiS_TVMode & TVSetYPbPr750p) temp |= 0x40; in SiS_SetGroup2()
7219 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x4D,temp); in SiS_SetGroup2()
7221 temp = SiS_GetReg(SiS_Pr->SiS_Part2Port,0x43); in SiS_SetGroup2()
7222 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x43,(temp - 3)); in SiS_SetGroup2()
7227 temp = 0; in SiS_SetGroup2()
7228 if(SiS_Pr->SiS_TVMode & TVSetPALM) temp = 8; in SiS_SetGroup2()
7229 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x4e,0xf7,temp); in SiS_SetGroup2()
7236 temp = SiS_GetReg(SiS_Pr->SiS_Part2Port,0x01); in SiS_SetGroup2()
7237 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,(temp - 1)); in SiS_SetGroup2()
7258 temp = 0x01; in SiS_SetGroup2()
7262 temp = 0x02; in SiS_SetGroup2()
7264 temp = 0x01; in SiS_SetGroup2()
7269 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x0B,temp); in SiS_SetGroup2()
7277 temp = (tempcx >> 3) & 0xE0; in SiS_SetGroup2()
7281 temp |= 0x10; in SiS_SetGroup2()
7284 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1A,0x0f,temp); in SiS_SetGroup2()
7356 temp = (tempbx >> 5) & 0x38; in SiS_SetGroup2()
7357 temp |= ((tempcx >> 8) & 0x07); in SiS_SetGroup2()
7358 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,temp); in SiS_SetGroup2()
7403 temp = (tempbx >> 4) & 0xF0; in SiS_SetGroup2()
7405 temp |= (tempbx & 0x0F); in SiS_SetGroup2()
7408 temp &= 0xf0; in SiS_SetGroup2()
7409 temp |= (SiS_Pr->CVSyncEnd & 0x0f); in SiS_SetGroup2()
7412 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,temp); in SiS_SetGroup2()
7425 temp = 0; in SiS_SetGroup2()
7428 temp = SiS_Pr->SiS_HT - ((SiS_Pr->PanelXRes - SiS_Pr->SiS_HDE) / 2); in SiS_SetGroup2()
7429 if(SiS_IsDualLink(SiS_Pr)) temp >>= 1; in SiS_SetGroup2()
7432 temp += bridgeoffset; in SiS_SetGroup2()
7433 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x1F,temp); /* lcdhdes */ in SiS_SetGroup2()
7434 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x20,0x0F,((temp >> 4) & 0xf0)); in SiS_SetGroup2()
7574 unsigned short temp, temp1, temp2;
7578 temp = (unsigned short)((int)((temp1 | ((temp2 & 0xf0) << 4))) + shift);
7579 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x1f,temp);
7580 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x20,0x0f,((temp >> 4) & 0xf0));
7581 temp = SiS_GetReg(SiS_Pr->SiS_Part2Port,0x2b) & 0x0f;
7582 temp = (unsigned short)((int)(temp) + shift);
7583 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x2b,0xf0,(temp & 0x0f));
7586 temp = (unsigned short)((int)((temp1 | ((temp2 & 0xf0) << 4))) + shift);
7587 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x43,temp);
7588 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x42,0x0f,((temp >> 4) & 0xf0));
7595 unsigned short temp, temp1; in SiS_SetGroup4_C_ELV() local
7608 temp = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x3a); in SiS_SetGroup4_C_ELV()
7609 if(!(temp & 0x01)) { in SiS_SetGroup4_C_ELV()
7616 if(SiS_Pr->SiS_TVMode & TVSetYPbPr750p) temp = 0x0000; in SiS_SetGroup4_C_ELV()
7617 else if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) temp = 0x0002; in SiS_SetGroup4_C_ELV()
7618 else if(SiS_Pr->SiS_TVMode & TVSetHiVision) temp = 0x0400; in SiS_SetGroup4_C_ELV()
7619 else temp = 0x0402; in SiS_SetGroup4_C_ELV()
7624 if(SiS_Pr->SiS_TVMode & TVAspect43LB) temp |= 0x01; in SiS_SetGroup4_C_ELV()
7625 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x26,0x7c,(temp & 0xff)); in SiS_SetGroup4_C_ELV()
7626 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x3a,0xfb,(temp >> 8)); in SiS_SetGroup4_C_ELV()
7632 if(temp1 == 0x01) temp |= 0x01; in SiS_SetGroup4_C_ELV()
7633 if(temp1 == 0x03) temp |= 0x04; /* ? why not 0x10? */ in SiS_SetGroup4_C_ELV()
7634 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x26,0xf8,(temp & 0xff)); in SiS_SetGroup4_C_ELV()
7635 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x3a,0xfb,(temp >> 8)); in SiS_SetGroup4_C_ELV()
7666 unsigned short vclkindex, temp, reg1, reg2; in SiS_SetCRT2VCLK() local
7692 temp = 0x08; in SiS_SetCRT2VCLK()
7693 if(SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC) temp |= 0x20; in SiS_SetCRT2VCLK()
7694 SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x12,temp); in SiS_SetCRT2VCLK()
7725 unsigned short tempax, tempcx, tempbx, modeflag, temp, resinfo; in SiS_SetGroup4() local
7765 temp = (tempbx >> 1) & 0x80; in SiS_SetGroup4()
7770 temp |= ((tempcx >> 5) & 0x78); in SiS_SetGroup4()
7776 temp |= ((tempcx >> 8) & 0x07); in SiS_SetGroup4()
7777 SiS_SetReg(SiS_Pr->SiS_Part4Port,0x15,temp); in SiS_SetGroup4()
7784 temp = 0; in SiS_SetGroup4()
7785 if(tempbx > 800) temp = 0x60; in SiS_SetGroup4()
7787 temp = 0; in SiS_SetGroup4()
7788 if(tempbx > 1024) temp = 0xC0; in SiS_SetGroup4()
7789 else if(tempbx >= 960) temp = 0xA0; in SiS_SetGroup4()
7791 temp = 0; in SiS_SetGroup4()
7792 if(tempbx >= 1280) temp = 0x40; in SiS_SetGroup4()
7793 else if(tempbx >= 1024) temp = 0x20; in SiS_SetGroup4()
7795 temp = 0x80; in SiS_SetGroup4()
7796 if(tempbx >= 1024) temp = 0xA0; in SiS_SetGroup4()
7799 temp |= SiS_Pr->Init_P4_0E; in SiS_SetGroup4()
7803 temp &= 0xf0; in SiS_SetGroup4()
7804 temp |= 0x0A; in SiS_SetGroup4()
7808 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x0E,0x10,temp); in SiS_SetGroup4()
7813 if(!(temp & 0xE0)) tempebx >>=1; in SiS_SetGroup4()
7832 temp = (unsigned short)(tempeax & 0x000000FF); in SiS_SetGroup4()
7833 SiS_SetReg(SiS_Pr->SiS_Part4Port,0x1B,temp); in SiS_SetGroup4()
7834 temp = (unsigned short)((tempeax & 0x0000FF00) >> 8); in SiS_SetGroup4()
7835 SiS_SetReg(SiS_Pr->SiS_Part4Port,0x1A,temp); in SiS_SetGroup4()
7836 temp = (unsigned short)((tempeax >> 12) & 0x70); /* sic! */ in SiS_SetGroup4()
7837 temp |= (tempcx & 0x4F); in SiS_SetGroup4()
7838 SiS_SetReg(SiS_Pr->SiS_Part4Port,0x19,temp); in SiS_SetGroup4()
7858 temp = tempax % 32; in SiS_SetGroup4()
7860 if(temp) tempax++; in SiS_SetGroup4()
7874 temp = ((tempax >> 4) & 0x30) | tempbx; in SiS_SetGroup4()
7876 SiS_SetReg(SiS_Pr->SiS_Part4Port,0x1E,temp); in SiS_SetGroup4()
7878 temp = 0x0036; tempbx = 0xD0; in SiS_SetGroup4()
7880 temp = 0x0026; tempbx = 0xC0; /* See En/DisableBridge() */ in SiS_SetGroup4()
7884 temp |= 0x01; in SiS_SetGroup4()
7887 temp &= ~0x01; in SiS_SetGroup4()
7892 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x1F,tempbx,temp); in SiS_SetGroup4()
7898 temp = (tempbx >> 5) & 0x38; in SiS_SetGroup4()
7899 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x21,0xC0,temp); in SiS_SetGroup4()
8304 unsigned short temp; in SiS_SetCHTVReg() local
8309 temp = CHTVRegData[resindex].Reg[0]; in SiS_SetCHTVReg()
8310 if(SiS_Pr->SiS_TVMode & TVSetNTSCJ) temp |= 0x10; in SiS_SetCHTVReg()
8311 SiS_SetCH701x(SiS_Pr,0x00,temp); in SiS_SetCHTVReg()
8320 temp = CHTVRegData[resindex].Reg[7]; in SiS_SetCHTVReg()
8321 if(SiS_Pr->SiS_TVMode & TVSetNTSCJ) temp = 0x66; in SiS_SetCHTVReg()
8322 SiS_SetCH701x(SiS_Pr,0x07,temp); in SiS_SetCHTVReg()
8333 temp = SiS_GetCH701x(SiS_Pr,0x21) & ~0x02; in SiS_SetCHTVReg()
8340 if(SiS_Pr->SiS_TVMode & (TVSetPALN | TVSetNTSCJ)) temp |= 0x02; in SiS_SetCHTVReg()
8341 SiS_SetCH701x(SiS_Pr,0x21,temp); in SiS_SetCHTVReg()
8358 unsigned short temp; in SiS_Chrontel701xBLOn() local
8365 temp = SiS_GetCH701x(SiS_Pr,0x66); in SiS_Chrontel701xBLOn()
8366 temp |= 0x20; in SiS_Chrontel701xBLOn()
8367 SiS_SetCH701x(SiS_Pr,0x66,temp); in SiS_Chrontel701xBLOn()
8375 unsigned short temp; in SiS_Chrontel701xBLOff() local
8379 temp = SiS_GetCH701x(SiS_Pr,0x66); in SiS_Chrontel701xBLOff()
8380 temp &= 0xDF; in SiS_Chrontel701xBLOff()
8381 SiS_SetCH701x(SiS_Pr,0x66,temp); in SiS_Chrontel701xBLOff()
8523 unsigned char temp, temp1; in SiS_ChrontelResetVSync() local
8527 temp = SiS_GetCH701x(SiS_Pr,0x47); in SiS_ChrontelResetVSync()
8528 temp &= 0x7f; /* Use external VSYNC */ in SiS_ChrontelResetVSync()
8529 SiS_SetCH701x(SiS_Pr,0x47,temp); in SiS_ChrontelResetVSync()
8531 temp = SiS_GetCH701x(SiS_Pr,0x47); in SiS_ChrontelResetVSync()
8532 temp |= 0x80; /* Use internal VSYNC */ in SiS_ChrontelResetVSync()
8533 SiS_SetCH701x(SiS_Pr,0x47,temp); in SiS_ChrontelResetVSync()
8540 unsigned short temp; in SiS_Chrontel701xOn() local
8544 temp = SiS_GetCH701x(SiS_Pr,0x1c); in SiS_Chrontel701xOn()
8545 temp |= 0x04; /* Invert XCLK phase */ in SiS_Chrontel701xOn()
8546 SiS_SetCH701x(SiS_Pr,0x1c,temp); in SiS_Chrontel701xOn()
8549 temp = SiS_GetCH701x(SiS_Pr,0x01); in SiS_Chrontel701xOn()
8550 temp &= 0x3f; in SiS_Chrontel701xOn()
8551 temp |= 0x80; /* Enable YPrPb (HDTV) */ in SiS_Chrontel701xOn()
8552 SiS_SetCH701x(SiS_Pr,0x01,temp); in SiS_Chrontel701xOn()
8555 temp = SiS_GetCH701x(SiS_Pr,0x01); in SiS_Chrontel701xOn()
8556 temp &= 0x3f; in SiS_Chrontel701xOn()
8557 temp |= 0xc0; /* Enable SCART + CVBS */ in SiS_Chrontel701xOn()
8558 SiS_SetCH701x(SiS_Pr,0x01,temp); in SiS_Chrontel701xOn()
8565 temp = SiS_GetCH701x(SiS_Pr,0x49); in SiS_Chrontel701xOn()
8567 temp = SiS_GetCH701x(SiS_Pr,0x73); in SiS_Chrontel701xOn()
8568 temp |= 0x60; in SiS_Chrontel701xOn()
8569 SiS_SetCH701x(SiS_Pr,0x73,temp); in SiS_Chrontel701xOn()
8571 temp = SiS_GetCH701x(SiS_Pr,0x47); in SiS_Chrontel701xOn()
8572 temp &= 0x7f; in SiS_Chrontel701xOn()
8573 SiS_SetCH701x(SiS_Pr,0x47,temp); in SiS_Chrontel701xOn()
8575 temp = SiS_GetCH701x(SiS_Pr,0x47); in SiS_Chrontel701xOn()
8576 temp |= 0x80; in SiS_Chrontel701xOn()
8577 SiS_SetCH701x(SiS_Pr,0x47,temp); in SiS_Chrontel701xOn()
8585 unsigned short temp; in SiS_Chrontel701xOff() local
8596 temp = SiS_GetCH701x(SiS_Pr,0x76); in SiS_Chrontel701xOff()
8597 temp &= 0xfc; in SiS_Chrontel701xOff()
8598 SiS_SetCH701x(SiS_Pr,0x76,temp); in SiS_Chrontel701xOff()
8607 unsigned short temp; in SiS_ChrontelResetDB() local
8611 temp = SiS_GetCH701x(SiS_Pr,0x4a); /* Version ID */ in SiS_ChrontelResetDB()
8612 temp &= 0x01; in SiS_ChrontelResetDB()
8613 if(!temp) { in SiS_ChrontelResetDB()
8616 temp = SiS_GetCH701x(SiS_Pr,0x49); in SiS_ChrontelResetDB()
8627 SiS_SetCH701x(SiS_Pr,0x49,temp); in SiS_ChrontelResetDB()
8633 temp = SiS_GetCH701x(SiS_Pr,0x5c); in SiS_ChrontelResetDB()
8634 temp &= 0xef; 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 |= 0x10; in SiS_ChrontelResetDB()
8638 SiS_SetCH701x(SiS_Pr,0x5c,temp); in SiS_ChrontelResetDB()
8639 temp = SiS_GetCH701x(SiS_Pr,0x5c); in SiS_ChrontelResetDB()
8640 temp &= 0xef; in SiS_ChrontelResetDB()
8641 SiS_SetCH701x(SiS_Pr,0x5c,temp); in SiS_ChrontelResetDB()
8642 temp = SiS_GetCH701x(SiS_Pr,0x61); in SiS_ChrontelResetDB()
8643 if(!temp) { in SiS_ChrontelResetDB()
8659 unsigned short temp; in SiS_ChrontelInitTVVSync() local
8670 temp = SiS_GetCH701x(SiS_Pr,0x49); in SiS_ChrontelInitTVVSync()
8671 temp &= 1; in SiS_ChrontelInitTVVSync()
8672 if(temp != 1) { /* TV block powered? (0 = yes, 1 = no) */ in SiS_ChrontelInitTVVSync()
8673 temp = SiS_GetCH701x(SiS_Pr,0x47); in SiS_ChrontelInitTVVSync()
8674 temp &= 0x70; in SiS_ChrontelInitTVVSync()
8675 SiS_SetCH701x(SiS_Pr,0x47,temp); /* enable VSYNC */ in SiS_ChrontelInitTVVSync()
8677 temp = SiS_GetCH701x(SiS_Pr,0x47); in SiS_ChrontelInitTVVSync()
8678 temp |= 0x80; in SiS_ChrontelInitTVVSync()
8679 SiS_SetCH701x(SiS_Pr,0x47,temp); /* disable VSYNC */ in SiS_ChrontelInitTVVSync()
8688 unsigned short temp,temp1; in SiS_ChrontelDoSomething3() local
8692 temp = SiS_GetCH701x(SiS_Pr,0x61); in SiS_ChrontelDoSomething3()
8693 if(temp < 1) { in SiS_ChrontelDoSomething3()
8694 temp++; in SiS_ChrontelDoSomething3()
8695 SiS_SetCH701x(SiS_Pr,0x61,temp); in SiS_ChrontelDoSomething3()
8705 temp = SiS_GetCH701x(SiS_Pr,0x61); in SiS_ChrontelDoSomething3()
8706 if(temp < 2) { in SiS_ChrontelDoSomething3()
8707 temp++; in SiS_ChrontelDoSomething3()
8708 SiS_SetCH701x(SiS_Pr,0x61,temp); in SiS_ChrontelDoSomething3()
8712 temp = SiS_GetCH701x(SiS_Pr,0x66); in SiS_ChrontelDoSomething3()
8713 temp |= 0x5f; in SiS_ChrontelDoSomething3()
8714 SiS_SetCH701x(SiS_Pr,0x66,temp); in SiS_ChrontelDoSomething3()
8725 temp = SiS_GetCH701x(SiS_Pr,0x76); in SiS_ChrontelDoSomething3()
8726 temp |= 0x03; in SiS_ChrontelDoSomething3()
8727 SiS_SetCH701x(SiS_Pr,0x76,temp); in SiS_ChrontelDoSomething3()
8728 temp = SiS_GetCH701x(SiS_Pr,0x66); in SiS_ChrontelDoSomething3()
8729 temp &= 0x7f; in SiS_ChrontelDoSomething3()
8730 SiS_SetCH701x(SiS_Pr,0x66,temp); in SiS_ChrontelDoSomething3()
8739 unsigned short temp; in SiS_ChrontelDoSomething2() local
8744 temp = SiS_GetCH701x(SiS_Pr,0x66); in SiS_ChrontelDoSomething2()
8745 temp &= 0x04; /* PLL stable? -> bail out */ in SiS_ChrontelDoSomething2()
8746 if(temp == 0x04) break; in SiS_ChrontelDoSomething2()
8755 temp = SiS_GetCH701x(SiS_Pr,0x76); in SiS_ChrontelDoSomething2()
8756 temp &= 0xfb; /* Reset PLL */ in SiS_ChrontelDoSomething2()
8757 SiS_SetCH701x(SiS_Pr,0x76,temp); in SiS_ChrontelDoSomething2()
8759 temp = SiS_GetCH701x(SiS_Pr,0x76); in SiS_ChrontelDoSomething2()
8760 temp |= 0x04; /* PLL normal operation */ in SiS_ChrontelDoSomething2()
8761 SiS_SetCH701x(SiS_Pr,0x76,temp); in SiS_ChrontelDoSomething2()
8776 unsigned short temp; in SiS_ChrontelDoSomething1() local
8778 temp = SiS_GetCH701x(SiS_Pr,0x03); in SiS_ChrontelDoSomething1()
8779 temp |= 0x80; /* Set datapath 1 to TV */ in SiS_ChrontelDoSomething1()
8780 temp &= 0xbf; /* Set datapath 2 to LVDS */ in SiS_ChrontelDoSomething1()
8781 SiS_SetCH701x(SiS_Pr,0x03,temp); in SiS_ChrontelDoSomething1()
8785 temp = SiS_GetCH701x(SiS_Pr,0x1c); in SiS_ChrontelDoSomething1()
8786 temp &= 0xfb; /* Normal XCLK phase */ in SiS_ChrontelDoSomething1()
8787 SiS_SetCH701x(SiS_Pr,0x1c,temp); in SiS_ChrontelDoSomething1()
8791 temp = SiS_GetCH701x(SiS_Pr,0x64); in SiS_ChrontelDoSomething1()
8792 temp |= 0x40; /* ? Bit not defined */ in SiS_ChrontelDoSomething1()
8793 SiS_SetCH701x(SiS_Pr,0x64,temp); in SiS_ChrontelDoSomething1()
8795 temp = SiS_GetCH701x(SiS_Pr,0x03); in SiS_ChrontelDoSomething1()
8796 temp &= 0x3f; /* D1 input to both LVDS and TV */ in SiS_ChrontelDoSomething1()
8797 SiS_SetCH701x(SiS_Pr,0x03,temp); in SiS_ChrontelDoSomething1()
8807 temp = SiS_GetCH701x(SiS_Pr,0x66); in SiS_ChrontelDoSomething1()
8808 if(temp != 0x45) { in SiS_ChrontelDoSomething1()
8819 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x34); in SiS_ChrontelDoSomething1()
8820 SiS_ChrontelDoSomething3(SiS_Pr,temp); in SiS_ChrontelDoSomething1()
9046 unsigned short tempah,temp; in SiS_SetTrumpBlockLoop() local
9059 temp = SiS_WriteDDC2Data(SiS_Pr,tempah); /* Write DAB (S0=0=write) */ in SiS_SetTrumpBlockLoop()
9060 if(temp) continue; /* (ERROR: no ack) */ in SiS_SetTrumpBlockLoop()
9062 temp = SiS_WriteDDC2Data(SiS_Pr,tempah); /* Write register number */ in SiS_SetTrumpBlockLoop()
9063 if(temp) continue; /* (ERROR: no ack) */ in SiS_SetTrumpBlockLoop()
9066 temp = SiS_WriteDDC2Data(SiS_Pr,tempah);/* Write DAB (S0=0=write) */ in SiS_SetTrumpBlockLoop()
9067 if(temp) break; in SiS_SetTrumpBlockLoop()
9069 if(temp) continue; in SiS_SetTrumpBlockLoop()
9105 unsigned short temp, i; in SiS_SetChReg() local
9113 temp = SiS_WriteDDC2Data(SiS_Pr, SiS_Pr->SiS_DDC_DeviceAddr); /* Write DAB (S0=0=write) */ in SiS_SetChReg()
9114 if(temp) continue; /* (ERROR: no ack) */ in SiS_SetChReg()
9115 … temp = SiS_WriteDDC2Data(SiS_Pr, (reg | myor)); /* Write RAB (700x: set bit 7, see datasheet) */ in SiS_SetChReg()
9116 if(temp) continue; /* (ERROR: no ack) */ in SiS_SetChReg()
9117 temp = SiS_WriteDDC2Data(SiS_Pr, val); /* Write data */ in SiS_SetChReg()
9118 if(temp) continue; /* (ERROR: no ack) */ in SiS_SetChReg()
9178 unsigned short tempah, temp, i; in SiS_GetChReg() local
9186 temp = SiS_WriteDDC2Data(SiS_Pr,SiS_Pr->SiS_DDC_DeviceAddr); /* Write DAB (S0=0=write) */ in SiS_GetChReg()
9187 if(temp) continue; /* (ERROR: no ack) */ in SiS_GetChReg()
9188 … temp = SiS_WriteDDC2Data(SiS_Pr,SiS_Pr->SiS_DDC_ReadAddr | myor); /* Write RAB (700x: | 0x80) */ in SiS_GetChReg()
9189 if(temp) continue; /* (ERROR: no ack) */ in SiS_GetChReg()
9191 temp = SiS_WriteDDC2Data(SiS_Pr,SiS_Pr->SiS_DDC_DeviceAddr | 0x01);/* DAB (S0=1=read) */ in SiS_GetChReg()
9192 if(temp) continue; /* (ERROR: no ack) */ in SiS_GetChReg()
9281 unsigned short temp = 0, myadaptnum = adaptnum; in SiS_InitDDCRegs() local
9337 temp = 4 - (myadaptnum * 2); in SiS_InitDDCRegs()
9338 if(flag) temp = 0; in SiS_InitDDCRegs()
9367 temp = myadaptnum; in SiS_InitDDCRegs()
9369 temp = 0; in SiS_InitDDCRegs()
9373 if(flag) temp = 0; in SiS_InitDDCRegs()
9376 SiS_Pr->SiS_DDC_Data = 0x02 << temp; in SiS_InitDDCRegs()
9377 SiS_Pr->SiS_DDC_Clk = 0x01 << temp; in SiS_InitDDCRegs()
9437 unsigned short temp, ret=0; in SiS_DoProbeDDC() local
9448 temp = (unsigned char)SiS_ReadDDC2Data(SiS_Pr); in SiS_DoProbeDDC()
9450 if(temp == 0) { in SiS_DoProbeDDC()
9459 temp = (unsigned char)SiS_ReadDDC2Data(SiS_Pr); in SiS_DoProbeDDC()
9461 temp &= mask; in SiS_DoProbeDDC()
9462 if(temp == value) ret = 0; in SiS_DoProbeDDC()
9466 if(temp == 0x30) ret = 0; in SiS_DoProbeDDC()
9671 unsigned short i,flag,temp; in SiS_WriteDDC2Data() local
9690 temp = SiS_CheckACK(SiS_Pr); /* Check acknowledge */ in SiS_WriteDDC2Data()
9691 return temp; in SiS_WriteDDC2Data()
9697 unsigned short i, temp, getdata; in SiS_ReadDDC2Data() local
9708 temp = SiS_GetReg(SiS_Pr->SiS_DDC_Port,SiS_Pr->SiS_DDC_Index); in SiS_ReadDDC2Data()
9709 if(temp & SiS_Pr->SiS_DDC_Data) getdata |= 0x01; in SiS_ReadDDC2Data()
9728 unsigned short temp, watchdog=1000; in SiS_SetSCLKHigh() local
9735 temp = SiS_GetReg(SiS_Pr->SiS_DDC_Port,SiS_Pr->SiS_DDC_Index); in SiS_SetSCLKHigh()
9736 } while((!(temp & SiS_Pr->SiS_DDC_Clk)) && --watchdog); in SiS_SetSCLKHigh()
9891 unsigned short index = 0, temp = 0; in GetOEMTVPtr661_2_GEN() local
9907 temp++; in GetOEMTVPtr661_2_GEN()
9909 temp += 0x0100; in GetOEMTVPtr661_2_GEN()
9911 return (unsigned int)(index | (temp << 16)); in GetOEMTVPtr661_2_GEN()
9955 unsigned short delay=0,index,myindex,temp,romptr=0; in SetDelayComp() local
10221 temp = (SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) & 0xf0) >> 4; in SetDelayComp()
10222 if(temp == 8) { /* 1400x1050 BIOS (COMPAL) */ in SetDelayComp()
10225 } else if(temp == 6) { in SetDelayComp()
10228 } else if(temp > 7) { /* 1280x1024 BIOS (which one?) */ in SetDelayComp()
10260 unsigned short index,temp,temp1,romptr=0; in SetAntiFlicker() local
10269 temp = GetTVPtrIndex(SiS_Pr); in SetAntiFlicker()
10270 temp >>= 1; /* 0: NTSC/YPbPr, 1: PAL, 2: HiTV */ in SetAntiFlicker()
10271 temp1 = temp; in SetAntiFlicker()
10290 temp = ROMAddr[romptr + temp1 + index]; in SetAntiFlicker()
10292 temp = SiS310_TVAntiFlick1[temp][index]; in SetAntiFlicker()
10294 temp <<= 4; in SetAntiFlicker()
10296 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x0A,0x8f,temp); /* index 0A D[6:4] */ in SetAntiFlicker()
10303 unsigned short index,temp,temp1,romptr=0; in SetEdgeEnhance() local
10305 temp = temp1 = GetTVPtrIndex(SiS_Pr) >> 1; /* 0: NTSC/YPbPr, 1: PAL, 2: HiTV */ in SetEdgeEnhance()
10329 temp = ROMAddr[romptr + temp1 + index]; in SetEdgeEnhance()
10331 temp = SiS310_TVEdge1[temp][index]; in SetEdgeEnhance()
10333 temp <<= 5; in SetEdgeEnhance()
10334 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x3A,0x1F,temp); /* index 0A D[7:5] */ in SetEdgeEnhance()
10340 unsigned short index, temp, i, j; in SetYFilter() local
10348 temp = GetTVPtrIndex(SiS_Pr) >> 1; /* 0: NTSC/YPbPr, 1: PAL, 2: HiTV */ in SetYFilter()
10350 if(SiS_Pr->SiS_TVMode & TVSetNTSCJ) temp = 1; /* NTSC-J uses PAL */ in SetYFilter()
10351 else if(SiS_Pr->SiS_TVMode & TVSetPALM) temp = 3; /* PAL-M */ in SetYFilter()
10352 else if(SiS_Pr->SiS_TVMode & TVSetPALN) temp = 4; /* PAL-N */ in SetYFilter()
10353 if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) temp = 1; /* HiVision uses PAL */ in SetYFilter()
10357 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS310_TVYFilter2[temp][index][j]); in SetYFilter()
10360 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS310_TVYFilter2[temp][index][j]); in SetYFilter()
10364 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS310_TVYFilter1[temp][index][j]); in SetYFilter()
10373 unsigned short index,temp,i,j,resinfo,romptr=0; in SetPhaseIncr() local
10399 temp = GetTVPtrIndex(SiS_Pr); in SetPhaseIncr()
10422 romptr += (temp << 2); in SetPhaseIncr()
10427 index = temp % 2; in SetPhaseIncr()
10428 temp >>= 1; /* 0:NTSC, 1:PAL, 2:HiTV */ in SetPhaseIncr()
10431 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS310_TVPhaseIncr1[temp][index][j]); in SetPhaseIncr()
10433 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS310_TVPhaseIncr2[temp][index][j]); in SetPhaseIncr()
10435 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS310_TVPhaseIncr1[temp][index][j]); in SetPhaseIncr()
10621 unsigned char temp; in SetCRT2SyncDither661() local
10640 temp = (infoflag >> 6) | 0x0c; in SetCRT2SyncDither661()
10642 temp ^= 0x04; in SetCRT2SyncDither661()
10643 if(SiS_Pr->SiS_ModeType >= Mode24Bpp) temp |= 0x10; in SetCRT2SyncDither661()
10645 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1a,0xe0,temp); in SetCRT2SyncDither661()
10647 temp = 0x30; in SetCRT2SyncDither661()
10648 if(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit) temp = 0x20; in SetCRT2SyncDither661()
10649 temp |= infoflag; in SetCRT2SyncDither661()
10650 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0x0f,temp); in SetCRT2SyncDither661()
10651 temp = 0; in SetCRT2SyncDither661()
10653 if(SiS_Pr->SiS_ModeType >= Mode24Bpp) temp |= 0x80; in SetCRT2SyncDither661()
10655 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x1a,0x7f,temp); in SetCRT2SyncDither661()
10755 unsigned short tempcl,tempch,tempbl,tempbh,tempbx,tempax,temp; in SiS_FinalizeLCD() local
10878 temp = tempbx & 0xff; in SiS_FinalizeLCD()
10879 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1b,temp); in SiS_FinalizeLCD()
10880 temp = (tempbx >> 8) & 0x03; in SiS_FinalizeLCD()
10881 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x1d,0xf8,temp); in SiS_FinalizeLCD()
10942 temp = tempbx & 0xff; in SiS_FinalizeLCD()
10943 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x04,temp); in SiS_FinalizeLCD()
10944 temp = ((tempbx & 0xff00) >> 4) | tempcl; in SiS_FinalizeLCD()
10945 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x01,0x80,temp); in SiS_FinalizeLCD()
10961 unsigned char temp; in SetOEMLCDData2() local
10991 temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00); in SetOEMLCDData2()
10992 if(temp & 0x80) { in SetOEMLCDData2()
10993 temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x18); in SetOEMLCDData2()
10994 temp++; in SetOEMLCDData2()
10995 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x18,temp); in SetOEMLCDData2()
11066 unsigned short index,temp,romptr=0; in SetOEMLCDDelay() local
11085 temp = GetOEMLCDPtr(SiS_Pr, 0); in SetOEMLCDDelay()
11094 romptr += (temp * 2); in SetOEMLCDDelay()
11097 temp = ROMAddr[romptr]; in SetOEMLCDDelay()
11100 temp = SiS300_OEMLCDDelay2[temp][index]; in SetOEMLCDDelay()
11102 temp = SiS300_OEMLCDDelay3[temp][index]; in SetOEMLCDDelay()
11108 romptr += (temp * 2); in SetOEMLCDDelay()
11111 temp = ROMAddr[romptr]; in SetOEMLCDDelay()
11113 temp = SiS300_OEMLCDDelay5[temp][index]; in SetOEMLCDDelay()
11119 romptr += (temp * 2); in SetOEMLCDDelay()
11122 temp = ROMAddr[romptr]; in SetOEMLCDDelay()
11124 temp = SiS300_OEMLCDDelay4[temp][index]; in SetOEMLCDDelay()
11127 temp = SiS300_OEMLCDDelay4[temp][index]; in SetOEMLCDDelay()
11131 temp &= 0x3c; in SetOEMLCDDelay()
11132 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,~0x3C,temp); /* index 0A D[6:4] */ in SetOEMLCDDelay()
11140 unsigned short index,temp; in SetOEMLCDData()
11148 temp = GetOEMLCDPtr(SiS_Pr, 1); in SetOEMLCDData()
11149 if(temp == 0xFFFF) return; in SetOEMLCDData()
11153 SiS_SetReg(SiS_Pr->SiS_Part1Port,i,SiS300_LCDHData[temp][index][j]); in SetOEMLCDData()
11155 SiS_SetRegANDOR(SiS_SiS_Part1Port,0x1a, 0xf8, (SiS300_LCDHData[temp][index][j] & 0x07)); in SetOEMLCDData()
11158 SiS_SetReg(SiS_SiS_Part1Port,0x18, SiS300_LCDVData[temp][index][0]); in SetOEMLCDData()
11159 SiS_SetRegANDOR(SiS_SiS_Part1Port,0x19, 0xF0, SiS300_LCDVData[temp][index][1]); in SetOEMLCDData()
11160 SiS_SetRegANDOR(SiS_SiS_Part1Port,0x1A, 0xC7, (SiS300_LCDVData[temp][index][2] & 0x38)); in SetOEMLCDData()
11162 SiS_SetReg(SiS_Pr->SiS_Part1Port,i,SiS300_LCDVData[temp][index][j]); in SetOEMLCDData()
11189 unsigned short index,temp,romptr=0; in SetOEMTVDelay() local
11197 temp = GetOEMTVPtr(SiS_Pr); in SetOEMTVDelay()
11202 romptr += (temp * 2); in SetOEMTVDelay()
11205 temp = ROMAddr[romptr]; in SetOEMTVDelay()
11208 temp = SiS300_OEMTVDelay301[temp][index]; in SetOEMTVDelay()
11210 temp = SiS300_OEMTVDelayLVDS[temp][index]; in SetOEMTVDelay()
11213 temp &= 0x3c; in SetOEMTVDelay()
11214 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,~0x3C,temp); in SetOEMTVDelay()
11221 unsigned short index,temp,romptr=0; in SetOEMAntiFlicker() local
11229 temp = GetOEMTVPtr(SiS_Pr); in SetOEMAntiFlicker()
11234 romptr += (temp * 2); in SetOEMAntiFlicker()
11237 temp = ROMAddr[romptr]; in SetOEMAntiFlicker()
11239 temp = SiS300_OEMTVFlicker[temp][index]; in SetOEMAntiFlicker()
11241 temp &= 0x70; in SetOEMAntiFlicker()
11242 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x0A,0x8F,temp); in SetOEMAntiFlicker()
11249 unsigned short index,i,j,temp,romptr=0; in SetOEMPhaseIncr() local
11261 temp = GetOEMTVPtr(SiS_Pr); in SetOEMPhaseIncr()
11267 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS300_Phase2[temp][index][j]); in SetOEMPhaseIncr()
11271 romptr += (temp * 2); in SetOEMPhaseIncr()
11279 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS300_Phase1[temp][index][j]); in SetOEMPhaseIncr()
11289 unsigned short index,temp,i,j,romptr=0; in SetOEMYFilter() local
11299 temp = GetOEMTVPtr(SiS_Pr); in SetOEMYFilter()
11301 if(SiS_Pr->SiS_TVMode & TVSetPALM) temp = 8; in SetOEMYFilter()
11302 else if(SiS_Pr->SiS_TVMode & TVSetPALN) temp = 9; in SetOEMYFilter()
11309 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS300_Filter2[temp][index][j]); in SetOEMYFilter()
11312 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS300_Filter2[temp][index][j]); in SetOEMYFilter()
11316 romptr += (temp * 2); in SetOEMYFilter()
11324 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS300_Filter1[temp][index][j]); in SetOEMYFilter()