diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-05-22 18:30:36 +0200 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-06-01 14:27:24 -0700 |
commit | 41d550ec057437cce1233cade6891af247c2015a (patch) | |
tree | 82b77724ee4b072cdb5fc595458f0020bf8772fc | |
parent | 05dfca3f7d0070b08c552695ea39449ec1e4d32e (diff) |
drop obsolete #ifdef SIS_XORG_XF86
It's always enabled, so we don't need extra #ifdef's for that.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-sis/-/merge_requests/21>
-rw-r--r-- | src/init.c | 28 | ||||
-rw-r--r-- | src/init.h | 11 | ||||
-rw-r--r-- | src/init301.c | 54 | ||||
-rw-r--r-- | src/init301.h | 11 | ||||
-rw-r--r-- | src/osdef.h | 7 | ||||
-rw-r--r-- | src/vstruct.h | 4 |
6 files changed, 1 insertions, 114 deletions
@@ -343,9 +343,6 @@ SiSInitPtr(struct SiS_Private *SiS_Pr) /* HELPER: Get ModeID */ /*********************************************/ -#ifndef SIS_XORG_XF86 -static -#endif unsigned short SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay, int Depth, BOOLEAN FSTN, int LCDwidth, int LCDheight) @@ -2923,10 +2920,8 @@ SiS_SetCRT1Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned sho SiS_Pr->SiS_SelectCRT2Rate = 0; SiS_Pr->SiS_SetFlag &= (~ProgrammingCRT2); -#ifdef SIS_XORG_XF86 xf86DrvMsgVerb(0, X_PROBED, 4, "(init: VBType=0x%04x, VBInfo=0x%04x)\n", SiS_Pr->SiS_VBType, SiS_Pr->SiS_VBInfo); -#endif if(SiS_Pr->SiS_VBInfo & SetSimuScanMode) { if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) { @@ -3115,7 +3110,6 @@ SiS_Handle760(struct SiS_Private *SiS_Pr) /* X.org/XFree86: SET SCREEN PITCH */ /*********************************************/ -#ifdef SIS_XORG_XF86 static void SiS_SetPitchCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn) { @@ -3165,20 +3159,14 @@ SiS_SetPitch(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn) SiS_SetPitchCRT2(SiS_Pr, pScrn); } } -#endif /*********************************************/ /* SiSSetMode() */ /*********************************************/ -#ifdef SIS_XORG_XF86 /* We need pScrn for setting the pitch correctly */ BOOLEAN SiSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, unsigned short ModeNo, BOOLEAN dosetpitch) -#else -BOOLEAN -SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo) -#endif { SISIOADDRESS BaseAddr = SiS_Pr->IOAddress; unsigned short RealModeNo, ModeIdIndex; @@ -3201,7 +3189,7 @@ SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo) SiS_GetSysFlags(SiS_Pr); SiS_Pr->SiS_VGAINFO = 0x11; -#if defined(SIS_XORG_XF86) && (defined(i386) || defined(__i386) || defined(__i386__) || defined(__AMD64__) || defined(__amd64__) || defined(__x86_64__)) +#if (defined(i386) || defined(__i386) || defined(__i386__) || defined(__AMD64__) || defined(__amd64__) || defined(__x86_64__)) if(pScrn) SiS_Pr->SiS_VGAINFO = SiS_GetSetBIOSScratch(pScrn, 0x489, 0xff); #endif @@ -3314,7 +3302,6 @@ SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo) } } -#ifdef SIS_XORG_XF86 if(pScrn) { /* SetPitch: Adapt to virtual size & position */ if((ModeNo > 0x13) && (dosetpitch)) { @@ -3324,7 +3311,6 @@ SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo) /* Backup/Set ModeNo in BIOS scratch area */ SiS_GetSetModeID(pScrn, ModeNo); } -#endif SiS_CloseCRTC(SiS_Pr); @@ -3338,7 +3324,6 @@ SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo) /* for non-Dual-Head mode */ /*********************************************/ -#ifdef SIS_XORG_XF86 BOOLEAN SiSBIOSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, DisplayModePtr mode, BOOLEAN IsCustom) @@ -3725,7 +3710,6 @@ SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, return TRUE; } -#endif /* Linux_XF86 */ #ifndef GETBITSTR #define BITMASK(h,l) (((unsigned)(1U << ((h)-(l)+1))-1)<<(l)) @@ -3939,7 +3923,6 @@ SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo, if(modeflag & DoubleScanMode) tempax |= 0x80; SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x09,0x5F,tempax); -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "%d %d %d %d %d %d %d %d (%d %d %d %d)\n", SiS_Pr->CHDisplay, SiS_Pr->CHSyncStart, SiS_Pr->CHSyncEnd, SiS_Pr->CHTotal, @@ -3957,15 +3940,12 @@ SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo, SiS_Pr->CCRT1CRTC[14], SiS_Pr->CCRT1CRTC[15]); xf86DrvMsg(0, X_INFO, " 0x%02x}},\n", SiS_Pr->CCRT1CRTC[16]); #endif -#endif } void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres, int yres, -#ifdef SIS_XORG_XF86 DisplayModePtr current -#endif ) { unsigned short HRE, HBE, HRS, HBS, HDE, HT; @@ -4009,7 +3989,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, D = B - F - C; -#ifdef SIS_XORG_XF86 current->HDisplay = (E * 8); current->HSyncStart = (E * 8) + (F * 8); current->HSyncEnd = (E * 8) + (F * 8) + (C * 8); @@ -4021,7 +4000,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, #else (void)VBS; (void)HBS; (void)A; #endif -#endif /* Vertical */ sr_data = crdata[13]; @@ -4068,7 +4046,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, D = B - F - C; -#ifdef SIS_XORG_XF86 current->VDisplay = VDE + 1; current->VSyncStart = VRS + 1; current->VSyncEnd = ((VRS & ~0x1f) | VRE) + 1; @@ -4085,7 +4062,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, "V: A %d B %d C %d D %d E %d F %d VT %d VDE %d VRS %d VBS %d VBE %d VRE %d\n", A, B, C, D, E, F, VT, VDE, VRS, VBS, VBE, VRE); #endif -#endif if((xres == 320) && ((yres == 200) || (yres == 240))) { /* Terrible hack, but correct CRTC data for @@ -4094,11 +4070,9 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, * a negative D. The CRT controller does not * seem to like correcting HRE to 50) */ -#ifdef SIS_XORG_XF86 current->HDisplay = 320; current->HSyncStart = 328; current->HSyncEnd = 376; current->HTotal = 400; -#endif } } @@ -54,7 +54,6 @@ #include "osdef.h" #include "initdef.h" -#ifdef SIS_XORG_XF86 #include "sis.h" #define SIS_NEED_inSISREG #define SIS_NEED_inSISREGW @@ -63,7 +62,6 @@ #define SIS_NEED_outSISREGW #define SIS_NEED_outSISREGL #include "sis_regs.h" -#endif /* Mode numbers */ static const unsigned short ModeIndex_320x200[] = {0x59, 0x41, 0x00, 0x4f}; @@ -1494,10 +1492,8 @@ static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1640x480_1_H[] = }; BOOLEAN SiSInitPtr(struct SiS_Private *SiS_Pr); -#ifdef SIS_XORG_XF86 unsigned short SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay, int Depth, BOOLEAN FSTN, int LCDwith, int LCDheight); -#endif unsigned short SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay, int Depth, BOOLEAN FSTN, unsigned short CustomT, int LCDwith, int LCDheight, @@ -1548,7 +1544,6 @@ unsigned short SiS_GetFIFOThresholdB300(unsigned short idx1, unsigned short idx2 unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index); #endif void SiS_LoadDAC(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex); -#ifdef SIS_XORG_XF86 BOOLEAN SiSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, unsigned short ModeNo, BOOLEAN dosetpitch); BOOLEAN SiSBIOSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, @@ -1557,14 +1552,11 @@ BOOLEAN SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, DisplayModePtr mode, BOOLEAN IsCustom); BOOLEAN SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, DisplayModePtr mode, BOOLEAN IsCustom); -#endif void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth); void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex); -#ifdef SIS_XORG_XF86 void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres, int yres, DisplayModePtr current); -#endif /* From init301.c: */ extern void SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo, @@ -1588,7 +1580,6 @@ extern unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short extern BOOLEAN SiS_IsVAMode(struct SiS_Private *); extern BOOLEAN SiS_IsDualEdge(struct SiS_Private *); -#ifdef SIS_XORG_XF86 /* From other modules: */ extern unsigned short SiS_CheckBuildCustomMode(ScrnInfoPtr pScrn, DisplayModePtr mode, unsigned int VBFlags); @@ -1598,5 +1589,3 @@ extern unsigned char SiS_GetSetModeID(ScrnInfoPtr pScrn, unsigned char id); extern unsigned short SiS_GetModeNumber(ScrnInfoPtr pScrn, DisplayModePtr mode, unsigned int VBFlags); #endif - -#endif diff --git a/src/init301.c b/src/init301.c index ebb1347..bc067ee 100644 --- a/src/init301.c +++ b/src/init301.c @@ -1154,12 +1154,10 @@ SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo, } #endif -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_PROBED, "(init301: VBInfo=0x%04x, SetFlag=0x%04x)\n", SiS_Pr->SiS_VBInfo, SiS_Pr->SiS_SetFlag); #endif -#endif } /*********************************************/ @@ -1448,11 +1446,9 @@ SiS_SetTVMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short SiS_Pr->SiS_VBInfo &= ~SetPALTV; -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "(init301: TVMode %x, VBInfo %x)\n", SiS_Pr->SiS_TVMode, SiS_Pr->SiS_VBInfo); #endif -#endif } /*********************************************/ @@ -1479,7 +1475,6 @@ SiS_GetLCDInfoBIOS(struct SiS_Private *SiS_Pr) unsigned char *ROMAddr; unsigned short temp; -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "Paneldata driver: [%d %d] [H %d %d] [V %d %d] [C %d 0x%02x 0x%02x]\n", SiS_Pr->PanelHT, SiS_Pr->PanelVT, @@ -1489,7 +1484,6 @@ SiS_GetLCDInfoBIOS(struct SiS_Private *SiS_Pr) SiS_Pr->SiS_VBVCLKData[SiS_Pr->PanelVCLKIdx315].Part4_A, SiS_Pr->SiS_VBVCLKData[SiS_Pr->PanelVCLKIdx315].Part4_B); #endif -#endif if((ROMAddr = GetLCDStructPtr661(SiS_Pr))) { if((temp = SISGETROMW(6)) != SiS_Pr->PanelHT) { @@ -1512,7 +1506,6 @@ SiS_GetLCDInfoBIOS(struct SiS_Private *SiS_Pr) SiS_Pr->SiS_VCLKData[VCLK_CUSTOM_315].SR2C = SiS_Pr->SiS_VBVCLKData[VCLK_CUSTOM_315].Part4_B = ROMAddr[20]; -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "Paneldata BIOS: [%d %d] [H %d %d] [V %d %d] [C %d 0x%02x 0x%02x]\n", SiS_Pr->PanelHT, SiS_Pr->PanelVT, @@ -1522,8 +1515,6 @@ SiS_GetLCDInfoBIOS(struct SiS_Private *SiS_Pr) SiS_Pr->SiS_VBVCLKData[SiS_Pr->PanelVCLKIdx315].Part4_A, SiS_Pr->SiS_VBVCLKData[SiS_Pr->PanelVCLKIdx315].Part4_B); #endif -#endif - } #endif } @@ -2218,11 +2209,9 @@ SiS_GetLCDResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned sh SiS_Pr->SiS_SetFlag |= LCDVESATiming; } -#ifdef SIS_XORG_XF86 xf86DrvMsgVerb(0, X_PROBED, 4, "(init301: LCDInfo=0x%04x LCDResInfo=0x%02x LCDTypeInfo=0x%02x SetFlag=0x%04x)\n", SiS_Pr->SiS_LCDInfo, SiS_Pr->SiS_LCDResInfo, SiS_Pr->SiS_LCDTypeInfo, SiS_Pr->SiS_SetFlag); -#endif } /*********************************************/ @@ -2436,11 +2425,9 @@ SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned shor } -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "VCLKIndex %d (0x%x)\n", VCLKIndex, VCLKIndex); #endif -#endif return VCLKIndex; } @@ -3563,11 +3550,9 @@ SiS_GetCRT2Data301(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned s default : LCDPtr = SiS_Pr->SiS_ExtLCD1024x768Data; break; } -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "GetCRT2Data: Index %d ResIndex %d\n", CRT2Index, ResIndex); #endif -#endif SiS_Pr->SiS_RVBHCMAX = (LCDPtr+ResIndex)->RVBHCMAX; SiS_Pr->SiS_RVBHCFACT = (LCDPtr+ResIndex)->RVBHCFACT; @@ -3927,11 +3912,9 @@ SiS_HandlePWD(struct SiS_Private *SiS_Pr) ret = 1; } SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x27,0x7f,temp); -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, 0, "Setting PWD %x\n", temp); #endif -#endif } #endif return ret; @@ -5449,7 +5432,6 @@ SiS_SetGroup1_301(struct SiS_Private *SiS_Pr, unsigned short ModeNo,unsigned sho temp = SiS_GetRegByte((SiS_Pr->SiS_P3ca+0x02)); SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1b,temp); /* ? */ -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "%d %d %d %d %d %d %d %d (%d %d %d %d)\n", SiS_Pr->CHDisplay, SiS_Pr->CHSyncStart, SiS_Pr->CHSyncEnd, SiS_Pr->CHTotal, @@ -5468,7 +5450,6 @@ SiS_SetGroup1_301(struct SiS_Private *SiS_Pr, unsigned short ModeNo,unsigned sho SiS_Pr->CCRT1CRTC[14], SiS_Pr->CCRT1CRTC[15]); xf86DrvMsg(0, X_INFO, " 0x%02x}},\n", SiS_Pr->CCRT1CRTC[16]); #endif -#endif } /* Setup panel link @@ -7122,11 +7103,9 @@ SiS_SetGroup2(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short /* Non-expanding: lcdvdes = tempcx = VT-1; lcdvdee = tempbx = VDE-1 */ -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "lcdvdes 0x%x lcdvdee 0x%x\n", tempcx, tempbx); #endif -#endif SiS_SetReg(SiS_Pr->SiS_Part2Port,0x05,tempcx); /* lcdvdes */ SiS_SetReg(SiS_Pr->SiS_Part2Port,0x06,tempbx); /* lcdvdee */ @@ -7176,11 +7155,9 @@ SiS_SetGroup2(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short tempbx = SiS_Pr->CVSyncStart; } -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "lcdvrs 0x%x\n", tempbx); #endif -#endif SiS_SetReg(SiS_Pr->SiS_Part2Port,0x04,tempbx); /* lcdvrs */ @@ -7193,11 +7170,9 @@ SiS_SetGroup2(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short temp |= (SiS_Pr->CVSyncEnd & 0x0f); } -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "lcdvre[3:0] 0x%x\n", (temp & 0x0f)); #endif -#endif SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,temp); @@ -7237,11 +7212,9 @@ SiS_SetGroup2(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short tempax >>= 1; } -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "lcdhdee 0x%x\n", tempbx); #endif -#endif tempbx += bridgeoffset; @@ -7268,11 +7241,9 @@ SiS_SetGroup2(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short tempbx += bridgeoffset; } -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "lcdhrs 0x%x\n", tempbx); #endif -#endif SiS_SetReg(SiS_Pr->SiS_Part2Port,0x1C,tempbx); /* lcdhrs */ SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1D,0x0F,((tempbx >> 4) & 0xf0)); @@ -7292,11 +7263,9 @@ SiS_SetGroup2(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short tempbx += bridgeoffset; } -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "lcdhre 0x%x\n", tempbx); #endif -#endif SiS_SetReg(SiS_Pr->SiS_Part2Port,0x21,tempbx); /* lcdhre */ @@ -8691,7 +8660,6 @@ SiS_SetCRT2Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo) SiS_GetLVDSDesData(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex); } -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "(init301: LCDHDES 0x%03x LCDVDES 0x%03x)\n", SiS_Pr->SiS_LCDHDES, SiS_Pr->SiS_LCDVDES); xf86DrvMsg(0, X_INFO, "(init301: HDE 0x%03x VDE 0x%03x)\n", SiS_Pr->SiS_HDE, SiS_Pr->SiS_VDE); @@ -8699,7 +8667,6 @@ SiS_SetCRT2Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo) xf86DrvMsg(0, X_INFO, "(init301: HT 0x%03x VT 0x%03x)\n", SiS_Pr->SiS_HT, SiS_Pr->SiS_VT); xf86DrvMsg(0, X_INFO, "(init301: VGAHT 0x%03x VGAVT 0x%03x)\n", SiS_Pr->SiS_VGAHT, SiS_Pr->SiS_VGAVT); #endif -#endif if(SiS_Pr->SiS_SetFlag & LowModeTests) { SiS_SetGroup1(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex); @@ -8911,11 +8878,9 @@ SiS_SetTrumpionBlock(struct SiS_Private *SiS_Pr, unsigned char *dataptr) dataptr = SiS_SetTrumpBlockLoop(SiS_Pr, dataptr); if(!dataptr) return FALSE; } -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "Trumpion block success\n"); #endif -#endif return TRUE; } #endif @@ -9096,9 +9061,6 @@ SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg, } /* Our own DDC functions */ -#ifndef SIS_XORG_XF86 -static -#endif unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags, int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype, BOOLEAN checkcr32, @@ -9206,12 +9168,10 @@ SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags, int VGAEngine, SiS_SetupDDCN(SiS_Pr); -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "DDC Port %x Index %x Shift %d\n", SiS_Pr->SiS_DDC_Port, SiS_Pr->SiS_DDC_Index, temp); #endif -#endif return 0; } @@ -9274,11 +9234,9 @@ SiS_DoProbeDDC(struct SiS_Private *SiS_Pr) SiS_SetSwitchDDC2(SiS_Pr); if(SiS_PrepareDDC(SiS_Pr)) { SiS_SetStop(SiS_Pr); -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "Probe: Prepare failed\n"); #endif -#endif return 0xFFFF; } mask = 0xf0; @@ -9292,11 +9250,9 @@ SiS_DoProbeDDC(struct SiS_Private *SiS_Pr) } else { failed = TRUE; ret = 0xFFFF; -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "Probe: Read 1 failed\n"); #endif -#endif } } if(failed == FALSE) { @@ -9306,11 +9262,9 @@ SiS_DoProbeDDC(struct SiS_Private *SiS_Pr) if(temp == value) ret = 0; else { ret = 0xFFFF; -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "Probe: Read 2 failed\n"); #endif -#endif if(SiS_Pr->SiS_DDC_DeviceAddr == 0xa0) { if(temp == 0x30) ret = 0; } @@ -9320,9 +9274,6 @@ SiS_DoProbeDDC(struct SiS_Private *SiS_Pr) return ret; } -#ifndef SIS_XORG_XF86 -static -#endif unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr) { @@ -9339,9 +9290,6 @@ SiS_ProbeDDC(struct SiS_Private *SiS_Pr) return flag; } -#ifndef SIS_XORG_XF86 -static -#endif unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype, unsigned char *buffer) { @@ -9588,11 +9536,9 @@ SiS_SetSCLKHigh(struct SiS_Private *SiS_Pr) temp = SiS_GetReg(SiS_Pr->SiS_DDC_Port,SiS_Pr->SiS_DDC_Index); } while((!(temp & SiS_Pr->SiS_DDC_Clk)) && --watchdog); if (!watchdog) { -#ifdef SIS_XORG_XF86 #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "SetClkHigh failed\n"); #endif -#endif return 0xFFFF; } SiS_DDC2Delay(SiS_Pr,SiS_I2CDELAYSHORT); diff --git a/src/init301.h b/src/init301.h index f29b9f8..8a1b66c 100644 --- a/src/init301.h +++ b/src/init301.h @@ -54,10 +54,8 @@ #include "osdef.h" #include "initdef.h" -#ifdef SIS_XORG_XF86 #include "sis.h" #include "sis_regs.h" -#endif static const unsigned char SiS_YPbPrTable[5][64] = { { /* 525i */ @@ -335,21 +333,12 @@ unsigned short SiS_HandleDDC(struct SiS_Private *SiS_Pr, unsigned int VBFlags, i unsigned short adaptnum, unsigned short DDCdatatype, unsigned char *buffer, unsigned int VBFlags2); -#ifdef SIS_XORG_XF86 unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags, int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype, BOOLEAN checkcr32, unsigned int VBFlags2); unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr); unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype, unsigned char *buffer); -#else -static unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags, - int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype, - BOOLEAN checkcr32, unsigned int VBFlags2); -static unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr); -static unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype, - unsigned char *buffer); -#endif static void SiS_SetSwitchDDC2(struct SiS_Private *SiS_Pr); static unsigned short SiS_SetStart(struct SiS_Private *SiS_Pr); static unsigned short SiS_SetStop(struct SiS_Private *SiS_Pr); diff --git a/src/osdef.h b/src/osdef.h index 0fcdc16..1ad8300 100644 --- a/src/osdef.h +++ b/src/osdef.h @@ -52,9 +52,6 @@ #ifndef _SIS_OSDEF_H_ #define _SIS_OSDEF_H_ -/* The choices are: */ -#define SIS_XORG_XF86 /* XFree86/X.org */ - #ifdef OutPortByte #undef OutPortByte #endif @@ -83,8 +80,6 @@ /* XFree86/X.org */ /**********************************************************************/ -#ifdef SIS_XORG_XF86 - #define SIS300 #define SIS315H @@ -96,6 +91,4 @@ #define InPortLong(p) inSISREGL((unsigned long)(p)) #define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize) -#endif /* XF86 */ - #endif /* _OSDEF_H_ */ diff --git a/src/vstruct.h b/src/vstruct.h index 2a1b31b..ed35941 100644 --- a/src/vstruct.h +++ b/src/vstruct.h @@ -236,11 +236,9 @@ struct SiS_Private { unsigned char ChipType; unsigned char ChipRevision; -#ifdef SIS_XORG_XF86 #ifndef XSERVER_LIBPCIACCESS PCITAG PciTag; #endif -#endif unsigned char *VirtualRomBase; BOOLEAN UseROM; SISIOADDRESS IOAddress; @@ -275,9 +273,7 @@ struct SiS_Private unsigned short SiS_IF_DEF_FSTN; unsigned short SiS_SysFlags; unsigned char SiS_VGAINFO; -#ifdef SIS_XORG_XF86 unsigned short SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4; -#endif BOOLEAN SiS_UseROM; BOOLEAN SiS_ROMNew; BOOLEAN SiS_XGIROM; |