diff -Ncr ./2df/vb_ext.c ./2d2/vb_ext.c *** ./2df/vb_ext.c 2005-05-18 14:53:44.000000000 +0800 --- ./2d2/vb_ext.c 2005-05-18 14:46:05.000000000 +0800 *************** *** 431,437 **** return( 0 ) ; } ! #endif WIN2000 /* --------------------------------------------------------------------- */ /* Function : XGISetDPMS */ --- 431,437 ---- return( 0 ) ; } ! #endif /* WIN2000 */ /* --------------------------------------------------------------------- */ /* Function : XGISetDPMS */ *************** *** 927,933 **** /* ------------------------------------------------------ */ BOOLEAN XGINew_SenseHiTV( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo ) { ! USHORT tempax , tempbx , tempcx , temp , i , tempch; tempbx = *pVBInfo->pYCSenseData2 ; --- 927,936 ---- /* ------------------------------------------------------ */ BOOLEAN XGINew_SenseHiTV( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo ) { ! USHORT tempbx , tempcx , temp , i , tempch; ! #ifndef LINUX_XF86 ! USHORT tempax ; ! #endif tempbx = *pVBInfo->pYCSenseData2 ; diff -Ncr ./2df/vb_init.c ./2d2/vb_init.c *** ./2df/vb_init.c 2005-05-18 14:53:49.000000000 +0800 --- ./2d2/vb_init.c 2005-05-18 14:46:05.000000000 +0800 *************** *** 150,166 **** VB_DEVICE_INFO VBINF; PVB_DEVICE_INFO pVBInfo = &VBINF; USHORT Mclockdata[ 30 ] , Eclockdata[ 30 ] ; ! UCHAR i , j , temp = 0 , SR11 , temp1 , ! SR17 = 0 , SR18 = 0 , SR19 = 0 , VBIOSVersion[ 5 ] ; ULONG base,ChipsetID,VendorID,GraphicVendorID; PUCHAR volatile pVideoMemory; /* ULONG j, k ; */ - UCHAR CR37 = 0 , CR38 = 0 , CR79 = 0 , CR7A = 0 , - CR7B = 0 , CR36 = 0 , CR78 = 0 , CR3C = 0 , - CR3D = 0 , CR3E = 0 , CR3F = 0 , CR35 = 0 ; PXGI_DSReg pSR ; --- 150,168 ---- VB_DEVICE_INFO VBINF; PVB_DEVICE_INFO pVBInfo = &VBINF; + #ifndef LINUX_XF86 USHORT Mclockdata[ 30 ] , Eclockdata[ 30 ] ; ! UCHAR j , SR11 , SR17 = 0 , SR18 = 0 , SR19 = 0 ; ! UCHAR CR37 = 0 , CR38 = 0 , CR79 = 0 , CR7A = 0 , ! CR7B = 0 , CR36 = 0 , CR78 = 0 , CR3C = 0 , ! CR3D = 0 , CR3E = 0 , CR3F = 0 , CR35 = 0 ; ! #endif ! UCHAR i , temp = 0 , temp1 , VBIOSVersion[ 5 ] ; ULONG base,ChipsetID,VendorID,GraphicVendorID; PUCHAR volatile pVideoMemory; /* ULONG j, k ; */ PXGI_DSReg pSR ; *************** *** 543,549 **** --- 545,555 ---- /* --------------------------------------------------------------------- */ void DualChipInit( PXGI_HW_DEVICE_INFO HwDeviceExtension ,PVB_DEVICE_INFO pVBInfo) { + #ifdef LINUX_XF86 + USHORT BaseAddr2nd = (USHORT)(ULONG)HwDeviceExtension->pj2ndIOAddress ; + #else USHORT BaseAddr2nd = (USHORT)HwDeviceExtension->pj2ndIOAddress ; + #endif USHORT XGINew_P3C3 = pVBInfo->BaseAddr + VIDEO_SUBSYSTEM_ENABLE_PORT ; USHORT XGINew_P3CC = pVBInfo->BaseAddr + MISC_OUTPUT_REG_READ_PORT ; USHORT XGINew_2ndP3C3 = BaseAddr2nd + VIDEO_SUBSYSTEM_ENABLE_PORT ; *************** *** 894,900 **** --- 900,908 ---- USHORT P3d4 = Port , P3c4 = Port - 0x10 ; + #ifndef LINUX_XF86 UCHAR data ; + #endif if ( HwDeviceExtension->jChipType == XG20 ) { *************** *** 956,962 **** --- 964,972 ---- USHORT P3d4 = Port , P3c4 = Port - 0x10 ; + #ifndef LINUX_XF86 UCHAR data ; + #endif XGINew_SetMemoryClock( HwDeviceExtension , pVBInfo ) ; *************** *** 1311,1319 **** void XGINew_SetDRAMSize_310( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo) { ! ULONG UMASize = 0 ; UCHAR tempah ; USHORT data ; pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase , pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress ; --- 1321,1330 ---- void XGINew_SetDRAMSize_310( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo) { ! #ifndef LINUX_XF86 ULONG UMASize = 0 ; UCHAR tempah ; + #endif USHORT data ; pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase , pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress ; *************** *** 2484,2490 **** --- 2495,2503 ---- /* --------------------------------------------------------------------- */ void XGINew_SetMemoryClock( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) { + #ifndef LINUX_XF86 UCHAR tempal ; + #endif XGINew_SetReg1( pVBInfo->P3c4 , 0x28 , pVBInfo->MCLKData[ XGINew_RAMType ].SR28 ) ; *************** *** 2502,2509 **** if ( HwDeviceExtension->jChipType == XG42 ) { if ( ( pVBInfo->MCLKData[ XGINew_RAMType ].SR28 == 0x1C ) && ( pVBInfo->MCLKData[ XGINew_RAMType ].SR29 == 0x01 ) ! && ( ( pVBInfo->ECLKData[ XGINew_RAMType ].SR2E == 0x1C ) && ( pVBInfo->ECLKData[ XGINew_RAMType ].SR2F == 0x01 ) ! || ( pVBInfo->ECLKData[ XGINew_RAMType ].SR2E == 0x22 ) && ( pVBInfo->ECLKData[ XGINew_RAMType ].SR2F == 0x01 ) ) ) { XGINew_SetReg1( pVBInfo->P3c4 , 0x32 , ( ( UCHAR )XGINew_GetReg1( pVBInfo->P3c4 , 0x32 ) & 0xFC ) | 0x02 ) ; } --- 2515,2522 ---- if ( HwDeviceExtension->jChipType == XG42 ) { if ( ( pVBInfo->MCLKData[ XGINew_RAMType ].SR28 == 0x1C ) && ( pVBInfo->MCLKData[ XGINew_RAMType ].SR29 == 0x01 ) ! && ( ( ( pVBInfo->ECLKData[ XGINew_RAMType ].SR2E == 0x1C ) && ( pVBInfo->ECLKData[ XGINew_RAMType ].SR2F == 0x01 ) ) ! || ( ( pVBInfo->ECLKData[ XGINew_RAMType ].SR2E == 0x22 ) && ( pVBInfo->ECLKData[ XGINew_RAMType ].SR2F == 0x01 ) ) ) ) { XGINew_SetReg1( pVBInfo->P3c4 , 0x32 , ( ( UCHAR )XGINew_GetReg1( pVBInfo->P3c4 , 0x32 ) & 0xFC ) | 0x02 ) ; } *************** *** 2615,2623 **** /* --------------------------------------------------------------------- */ void ReadVBIOSTablData( UCHAR ChipType , PVB_DEVICE_INFO pVBInfo) { PUCHAR volatile pVideoMemory = ( PUCHAR )pVBInfo->ROMAddr ; ! ULONG i , ulOffset ; ! UCHAR temp , index , j , k , l ; ULONG ii , jj ; i = pVideoMemory[ 0x1CF ] | ( pVideoMemory[ 0x1D0 ] << 8 ) ; /* UniROM */ --- 2628,2640 ---- /* --------------------------------------------------------------------- */ void ReadVBIOSTablData( UCHAR ChipType , PVB_DEVICE_INFO pVBInfo) { + #ifndef LINUX_XF86 + ULONG ulOffset ; + UCHAR temp , index , l ; + #endif PUCHAR volatile pVideoMemory = ( PUCHAR )pVBInfo->ROMAddr ; ! ULONG i ; ! UCHAR j , k ; ULONG ii , jj ; i = pVideoMemory[ 0x1CF ] | ( pVideoMemory[ 0x1D0 ] << 8 ) ; /* UniROM */ *************** *** 2803,2809 **** --- 2820,2828 ---- /* --------------------------------------------------------------------- */ void XGINew_SetDRAMModeRegister_XG20( PXGI_HW_DEVICE_INFO HwDeviceExtension ) { + #ifndef LINUX_XF86 UCHAR data ; + #endif VB_DEVICE_INFO VBINF; PVB_DEVICE_INFO pVBInfo = &VBINF; pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase ; diff -Ncr ./2df/vb_setmode.c ./2d2/vb_setmode.c *** ./2df/vb_setmode.c 2005-05-18 14:54:02.000000000 +0800 --- ./2d2/vb_setmode.c 2005-05-18 14:46:05.000000000 +0800 *************** *** 351,358 **** /* --------------------------------------------------------------------- */ BOOLEAN XGISetModeNew( PXGI_HW_DEVICE_INFO HwDeviceExtension , USHORT ModeNo ) { ULONG temp ; ! USHORT ModeIdIndex , KeepLockReg ; /* PUCHAR pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress ; */ VB_DEVICE_INFO VBINF; PVB_DEVICE_INFO pVBInfo = &VBINF; --- 351,361 ---- /* --------------------------------------------------------------------- */ BOOLEAN XGISetModeNew( PXGI_HW_DEVICE_INFO HwDeviceExtension , USHORT ModeNo ) { + #ifndef LINUX_XF86 ULONG temp ; ! USHORT KeepLockReg ; ! #endif ! USHORT ModeIdIndex ; /* PUCHAR pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress ; */ VB_DEVICE_INFO VBINF; PVB_DEVICE_INFO pVBInfo = &VBINF; *************** *** 541,548 **** b3CC , temp ; ! USHORT XGINew_P3cc = pVBInfo->P3cc, ! XGINew_P3c2 = pVBInfo->P3c2; /* XGINew_CRT1Mode = ModeNo ; // SaveModeID */ StandTableIndex = XGI_GetModePtr( ModeNo , ModeIdIndex, pVBInfo ) ; --- 544,553 ---- b3CC , temp ; ! USHORT XGINew_P3cc = pVBInfo->P3cc; ! #ifndef LINUX_XF86 ! USHORT XGINew_P3c2 = pVBInfo->P3c2; ! #endif /* XGINew_CRT1Mode = ModeNo ; // SaveModeID */ StandTableIndex = XGI_GetModePtr( ModeNo , ModeIdIndex, pVBInfo ) ; *************** *** 1194,1205 **** UCHAR index , data ; USHORT temp , tempah , ! i , j , modeflag , ResInfo , DisplayType ; index = pVBInfo->RefIndex[ RefreshRateTableIndex ].Ext_CRT1CRTC ; /* Get index */ index = index&IndexMask ; --- 1199,1213 ---- UCHAR index , data ; + #ifndef LINUX_XF86 USHORT temp , tempah , ! j , modeflag , ResInfo , DisplayType ; + #endif + USHORT i ; index = pVBInfo->RefIndex[ RefreshRateTableIndex ].Ext_CRT1CRTC ; /* Get index */ index = index&IndexMask ; *************** *** 1792,1799 **** void XGI_SetVCLKState( PXGI_HW_DEVICE_INFO HwDeviceExtension , USHORT ModeNo , USHORT RefreshRateTableIndex,PVB_DEVICE_INFO pVBInfo ) { USHORT data , ! data2 = 0 , ! VCLK ; UCHAR index ; --- 1800,1807 ---- void XGI_SetVCLKState( PXGI_HW_DEVICE_INFO HwDeviceExtension , USHORT ModeNo , USHORT RefreshRateTableIndex,PVB_DEVICE_INFO pVBInfo ) { USHORT data , ! data2 = 0 ; ! SHORT VCLK ; UCHAR index ; *************** *** 2038,2044 **** --- 2046,2054 ---- PVOID VideoMemoryAddress = ( PVOID )HwDeviceExtension->pjVideoMemoryAddress ; ULONG AdapterMemorySize = ( ULONG )HwDeviceExtension->ulVideoMemorySize ; PUSHORT pBuffer ; + #ifndef LINUX_XF86 int i ; + #endif if ( pVBInfo->ModeType >= ModeEGA ) { *************** *** 2704,2711 **** --- 2714,2723 ---- /* --------------------------------------------------------------------- */ void XGI_GetVGAType( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) { + #ifndef LINUX_XF86 USHORT tempbx , tempah ; + #endif if ( HwDeviceExtension->jChipType == XG20 ) { *************** *** 2791,2797 **** --- 2803,2811 ---- temp , modeflag ; + #ifndef LINUX_XF86 UCHAR OutputSelect = *pVBInfo->pOutputSelect ; + #endif if ( ModeNo <= 0x13 ) { *************** *** 2858,2864 **** if ( pVBInfo->IF_DEF_YPbPr == 1 ) { ! if ( ( pVBInfo->IF_DEF_LVDS == 0 ) && ( ( pVBInfo->VBType & VB_XGI301LV ) || ( pVBInfo->VBType & VB_XGI302LV ) || ( pVBInfo->VBType & VB_XGI301C ) ) || ( ( pVBInfo->IF_DEF_CH7017 == 1 ) && ( pVBInfo->VBType&VB_CH7017 ) ) ) { if ( temp & SetYPbPr ) /* temp = CR38 */ --- 2872,2878 ---- if ( pVBInfo->IF_DEF_YPbPr == 1 ) { ! if ( ( ( pVBInfo->IF_DEF_LVDS == 0 ) && ( ( pVBInfo->VBType & VB_XGI301LV ) || ( pVBInfo->VBType & VB_XGI302LV ) || ( pVBInfo->VBType & VB_XGI301C ) ) ) || ( ( pVBInfo->IF_DEF_CH7017 == 1 ) && ( pVBInfo->VBType&VB_CH7017 ) ) ) { if ( temp & SetYPbPr ) /* temp = CR38 */ *************** *** 3028,3036 **** tempbx = 0 , resinfo = 0 , modeflag , ! index1 , ! temp2 , OutputSelect = *pVBInfo->pOutputSelect ; tempbx = 0 ; resinfo = 0 ; --- 3042,3052 ---- tempbx = 0 , resinfo = 0 , modeflag , ! index1 ; ! #ifndef LINUX_XF86 ! USHORT temp2 , OutputSelect = *pVBInfo->pOutputSelect ; + #endif tempbx = 0 ; resinfo = 0 ; *************** *** 3359,3365 **** --- 3375,3383 ---- /* --------------------------------------------------------------------- */ BOOLEAN XGI_SearchModeID( USHORT ModeNo , USHORT *ModeIdIndex, PVB_DEVICE_INFO pVBInfo ) { + #ifndef LINUX_XF86 PUCHAR VGA_INFO = "\0x11" ; + #endif #ifdef TC *************** *** 3665,3671 **** USHORT temp ; UCHAR DAC_TEST_PARMS[ 3 ] = { 0x0F , 0x0F , 0x0F } ; ! int i , j ; XGINew_SetReg1( pVBInfo->P3c4 , 0x05 , 0x86 ) ; --- 3683,3692 ---- USHORT temp ; UCHAR DAC_TEST_PARMS[ 3 ] = { 0x0F , 0x0F , 0x0F } ; ! int i ; ! #ifndef LINUX_XF86 ! int j ; ! #endif XGINew_SetReg1( pVBInfo->P3c4 , 0x05 , 0x86 ) ; *************** *** 3934,3940 **** --- 3955,3965 ---- void SetDualChipRegs( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo ) { + #ifdef LINUX_XF86 + USHORT BaseAddr2nd = (USHORT)(ULONG)HwDeviceExtension->pj2ndIOAddress ; + #else USHORT BaseAddr2nd = (USHORT)HwDeviceExtension->pj2ndIOAddress ; + #endif USHORT XGINew_P3CC = pVBInfo->BaseAddr + MISC_OUTPUT_REG_READ_PORT ; USHORT XGINew_2ndP3CE = BaseAddr2nd + GRAPH_ADDRESS_PORT ; USHORT XGINew_2ndP3C4 = BaseAddr2nd + SEQ_ADDRESS_PORT ; *************** *** 4142,4150 **** /* --------------------------------------------------------------------- */ BOOLEAN XGI_IsLCDDualLink( PVB_DEVICE_INFO pVBInfo ) { USHORT flag ; ! if ( ( ( pVBInfo->VBInfo & SetCRT2ToLCD | SetCRT2ToLCDA ) ) && ( pVBInfo->LCDInfo & SetLCDDualLink ) ) /* shampoo0129 */ return ( 1 ) ; return( 0 ) ; --- 4167,4177 ---- /* --------------------------------------------------------------------- */ BOOLEAN XGI_IsLCDDualLink( PVB_DEVICE_INFO pVBInfo ) { + #ifndef LINUX_XF86 USHORT flag ; + #endif ! if ( ( ( ( pVBInfo->VBInfo & SetCRT2ToLCD ) | SetCRT2ToLCDA ) ) && ( pVBInfo->LCDInfo & SetLCDDualLink ) ) /* shampoo0129 */ return ( 1 ) ; return( 0 ) ; *************** *** 4159,4170 **** /* --------------------------------------------------------------------- */ void XGI_GetCRT2Data( USHORT ModeNo , USHORT ModeIdIndex , USHORT RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo ) { ! USHORT tempax , tempbx , modeflag , ! resinfo , ! CRT2Index , ResIndex ; XGI_LCDDataStruct *LCDPtr = NULL ; XGI_TVDataStruct *TVPtr = NULL ; --- 4186,4199 ---- /* --------------------------------------------------------------------- */ void XGI_GetCRT2Data( USHORT ModeNo , USHORT ModeIdIndex , USHORT RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo ) { ! USHORT tempax = 0, tempbx , modeflag , ! resinfo ; ! #ifndef LINUX_XF86 ! USHORT CRT2Index , ResIndex ; + #endif XGI_LCDDataStruct *LCDPtr = NULL ; XGI_TVDataStruct *TVPtr = NULL ; *************** *** 4462,4469 **** { USHORT index , - tempbx , modeflag ; UCHAR tempal ; --- 4491,4500 ---- { USHORT index , modeflag ; + #ifndef LINUX_XF86 + USHORT tempbx ; + #endif UCHAR tempal ; *************** *** 4678,4691 **** void XGI_PreSetGroup1(USHORT ModeNo , USHORT ModeIdIndex ,PXGI_HW_DEVICE_INFO HwDeviceExtension, USHORT RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo ) { USHORT temp = 0 , tempax = 0 , tempbx = 0 , - tempcx = 0 , pushbx = 0 , ! CRT1Index = 0 , ! modeflag , ! resinfo = 0 ; if ( ModeNo > 0x13 ) { --- 4709,4724 ---- void XGI_PreSetGroup1(USHORT ModeNo , USHORT ModeIdIndex ,PXGI_HW_DEVICE_INFO HwDeviceExtension, USHORT RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo ) { + USHORT tempcx = 0 , + CRT1Index = 0 , + resinfo = 0 ; + #ifndef LINUX_XF86 USHORT temp = 0 , tempax = 0 , tempbx = 0 , pushbx = 0 , ! modeflag ; ! #endif if ( ModeNo > 0x13 ) { *************** *** 4895,4901 **** USHORT push1 , push2 , tempax , ! tempbx , tempcx , temp , resinfo , --- 4928,4934 ---- USHORT push1 , push2 , tempax , ! tempbx = 0 , tempcx , temp , resinfo , *************** *** 5345,5359 **** tempbx , tempcx , temp , - temp3 , push1 , push2 , - temp1 , modeflag , resinfo , ! crt2crtc , resindex , xres ; /* XGINew_RY1COE = 0 , XGINew_RY2COE = 0 , XGINew_RY3COE = 0 , --- 5378,5394 ---- tempbx , tempcx , temp , push1 , push2 , modeflag , resinfo , ! crt2crtc ; ! #ifndef LINUX_XF86 ! USHORT temp1 , ! temp3 , resindex , xres ; + #endif /* XGINew_RY1COE = 0 , XGINew_RY2COE = 0 , XGINew_RY3COE = 0 , *************** *** 5362,5369 **** XGINew_RY6COE = 0 , XGINew_RY7COE = 0 ; */ ! UCHAR *PhasePoint , ! *TimingPoint ; ULONG longtemp , tempeax , --- 5397,5406 ---- XGINew_RY6COE = 0 , XGINew_RY7COE = 0 ; */ ! #ifndef LINUX_XF86 ! UCHAR *PhasePoint ; ! #endif ! UCHAR *TimingPoint ; ULONG longtemp , tempeax , *************** *** 6184,6191 **** /* --------------------------------------------------------------------- */ void XGI_SetTap4Regs( PVB_DEVICE_INFO pVBInfo) { ! USHORT tempcx , ! i , j ; XGI301C_Tap4TimingStruct *Tap4TimingPtr ; --- 6221,6231 ---- /* --------------------------------------------------------------------- */ void XGI_SetTap4Regs( PVB_DEVICE_INFO pVBInfo) { ! ! #ifndef LINUX_XF86 ! USHORT tempcx ; ! #endif ! USHORT i , j ; XGI301C_Tap4TimingStruct *Tap4TimingPtr ; *************** *** 6315,6322 **** tempbx , modeflag , temp , ! temp2 , ! push1 ; ULONG tempebx , tempeax , --- 6355,6364 ---- tempbx , modeflag , temp , ! temp2 ; ! #ifndef LINUX_XF86 ! USHORT push1 ; ! #endif ULONG tempebx , tempeax , *************** *** 6595,6601 **** modeflag , table ; ! XGI330_LCDDataTablStruct *tempdi ; tempbx = BX; --- 6637,6643 ---- modeflag , table ; ! XGI330_LCDDataTablStruct *tempdi = 0 ; tempbx = BX; *************** *** 7090,7096 **** void* XGI_GetTVPtr (USHORT BX,USHORT ModeNo,USHORT ModeIdIndex,USHORT RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo ) { USHORT i , tempdx , tempbx , tempal , modeflag , table ; ! XGI330_TVDataTablStruct *tempdi ; tempbx = BX ; --- 7132,7138 ---- void* XGI_GetTVPtr (USHORT BX,USHORT ModeNo,USHORT ModeIdIndex,USHORT RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo ) { USHORT i , tempdx , tempbx , tempal , modeflag , table ; ! XGI330_TVDataTablStruct *tempdi = 0 ; tempbx = BX ; *************** *** 7329,7336 **** /* --------------------------------------------------------------------- */ void XGI_SetPanelDelay(USHORT tempbl, PVB_DEVICE_INFO pVBInfo) { ! USHORT index , ! temp ; index = XGI_GetLCDCapPtr(pVBInfo) ; --- 7371,7380 ---- /* --------------------------------------------------------------------- */ void XGI_SetPanelDelay(USHORT tempbl, PVB_DEVICE_INFO pVBInfo) { ! USHORT index ; ! #ifndef LINUX_XF86 ! USHORT temp ; ! #endif index = XGI_GetLCDCapPtr(pVBInfo) ; *************** *** 7594,7601 **** /* --------------------------------------------------------------------- */ void XGI_EnableBridge( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo) { ! USHORT tempax , ! tempbl , tempah ; if ( pVBInfo->SetFlag == Win9xDOSMode ) --- 7638,7647 ---- /* --------------------------------------------------------------------- */ void XGI_EnableBridge( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo) { ! #ifndef LINUX_XF86 ! USHORT tempax ; ! #endif ! USHORT tempbl , tempah ; if ( pVBInfo->SetFlag == Win9xDOSMode ) *************** *** 7811,7818 **** { USHORT tempax , tempbx , ! tempah , ! tempbl ; if ( pVBInfo->SetFlag == Win9xDOSMode ) return ; --- 7857,7864 ---- { USHORT tempax , tempbx , ! tempah = 0 , ! tempbl = 0 ; if ( pVBInfo->SetFlag == Win9xDOSMode ) return ; *************** *** 8051,8058 **** UCHAR tempah , tempbl , ! tempbh , ! temp ; if ( pVBInfo->VBType & ( VB_XGI301B | VB_XGI302B | VB_XGI301LV | VB_XGI302LV | VB_XGI301C ) ) { --- 8097,8106 ---- UCHAR tempah , tempbl , ! tempbh ; ! #ifndef LINUX_XF86 ! UCHAR temp ; ! #endif if ( pVBInfo->VBType & ( VB_XGI301B | VB_XGI302B | VB_XGI301LV | VB_XGI302LV | VB_XGI301C ) ) { *************** *** 8487,8496 **** /* --------------------------------------------------------------------- */ void XGI_SetCRT2ModeRegs(USHORT ModeNo,PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) { USHORT i , ! j , ! tempcl , ! tempbl ; UCHAR tempah ; --- 8535,8546 ---- /* --------------------------------------------------------------------- */ void XGI_SetCRT2ModeRegs(USHORT ModeNo,PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) { + #ifndef LINUX_XF86 USHORT i , ! j ; ! #endif ! USHORT tempbl ; ! SHORT tempcl ; UCHAR tempah ; *************** *** 8718,8725 **** /* --------------------------------------------------------------------- */ void XGI_CloseCRTC( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo ) { ! USHORT tempbx , ! temp ; tempbx = 0 ; --- 8768,8777 ---- /* --------------------------------------------------------------------- */ void XGI_CloseCRTC( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo ) { ! USHORT tempbx ; ! #ifndef LINUX_XF86 ! USHORT temp ; ! #endif tempbx = 0 ; *************** *** 8738,8745 **** /* --------------------------------------------------------------------- */ void XGI_OpenCRTC( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo ) { ! USHORT tempbx , ! temp ; tempbx = 0 ; --- 8790,8799 ---- /* --------------------------------------------------------------------- */ void XGI_OpenCRTC( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo ) { ! USHORT tempbx ; ! #ifndef LINUX_XF86 ! USHORT temp ; ! #endif tempbx = 0 ; *************** *** 8757,8771 **** { USHORT tempax , tempbx , - temp , temp1 , temp2 , modeflag = 0 , tempcx , StandTableIndex , ! CRT1Index , ResInfo , DisplayType ; pVBInfo->RVBHCMAX = 1 ; pVBInfo->RVBHCFACT = 1 ; --- 8811,8827 ---- { USHORT tempax , tempbx , temp1 , temp2 , modeflag = 0 , tempcx , StandTableIndex , ! CRT1Index ; ! #ifndef LINUX_XF86 ! USHORT temp , ResInfo , DisplayType ; + #endif pVBInfo->RVBHCMAX = 1 ; pVBInfo->RVBHCFACT = 1 ; *************** *** 9091,9097 **** if ( pVBInfo->IF_DEF_LVDS == 0 ) { CRT2Index = CRT2Index >> 6 ; /* for LCD */ ! if ( ( pVBInfo->VBInfo & SetCRT2ToLCD | SetCRT2ToLCDA ) ) /*301b*/ { if ( pVBInfo->LCDResInfo != Panel1024x768 ) { --- 9147,9153 ---- if ( pVBInfo->IF_DEF_LVDS == 0 ) { CRT2Index = CRT2Index >> 6 ; /* for LCD */ ! if ( ( ( pVBInfo->VBInfo & SetCRT2ToLCD ) | SetCRT2ToLCDA ) ) /*301b*/ { if ( pVBInfo->LCDResInfo != Panel1024x768 ) { diff -Ncr ./2df/vb_util.c ./2d2/vb_util.c *** ./2df/vb_util.c 2005-05-18 14:53:57.000000000 +0800 --- ./2d2/vb_util.c 2005-05-18 14:46:05.000000000 +0800 *************** *** 59,66 **** --- 59,71 ---- /* --------------------------------------------------------------------- */ void XGINew_SetReg1( USHORT port , USHORT index , USHORT data ) { + #ifdef LINUX_XF86 + OutPortByte( ( PUCHAR )(ULONG)port , index ) ; + OutPortByte( ( PUCHAR )(ULONG)port + 1 , data ) ; + #else OutPortByte( ( PUCHAR )port , index ) ; OutPortByte( ( PUCHAR )port + 1 , data ) ; + #endif } *************** *** 113,120 **** --- 118,130 ---- { UCHAR data ; + #ifdef LINUX_XF86 + OutPortByte( ( PUCHAR )(ULONG)port , index ) ; + data = InPortByte( ( PUCHAR )(ULONG)port + 1 ) ; + #else OutPortByte( ( PUCHAR )port , index ) ; data = InPortByte( ( PUCHAR )port + 1 ) ; + #endif return( data ) ; } *************** *** 229,235 **** /* --------------------------------------------------------------------- */ void NewDelaySeconds( int seconds ) { ! int i , j ; for( i = 0 ; i < seconds ; i++ ) --- 239,248 ---- /* --------------------------------------------------------------------- */ void NewDelaySeconds( int seconds ) { ! #ifndef LINUX_XF86 ! int j ; ! #endif ! int i ; for( i = 0 ; i < seconds ; i++ ) *************** *** 261,267 **** --- 274,282 ---- /* --------------------------------------------------------------------- */ void Newdebugcode( UCHAR code ) { + #ifndef LINUX_XF86 ULONG ultemp ; + #endif OutPortByte ( 0x80 , code ) ; /* OutPortByte ( 0x300 , code ) ; */