diff -Ncr ./2df/vb_ext.c ./2d2/vb_ext.c *** ./2df/vb_ext.c 2005-05-18 15:15:40.000000000 +0800 --- ./2d2/vb_ext.c 2005-05-18 15:04:35.000000000 +0800 *************** *** 439,445 **** return( 0 ) ; } ! #endif WIN2000 /* --------------------------------------------------------------------- */ /* Function : XGISetDPMS */ --- 439,445 ---- return( 0 ) ; } ! #endif /* WIN2000 */ /* --------------------------------------------------------------------- */ /* Function : XGISetDPMS */ *************** *** 935,942 **** /* ------------------------------------------------------ */ BOOLEAN XGINew_SenseHiTV( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo ) { ! USHORT tempax , tempbx , tempcx , temp , i , tempch; tempbx = *pVBInfo->pYCSenseData2 ; tempcx = 0x0604 ; --- 935,945 ---- /* ------------------------------------------------------ */ 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 ; tempcx = 0x0604 ; diff -Ncr ./2df/vb_init.c ./2d2/vb_init.c *** ./2df/vb_init.c 2005-05-18 15:15:47.000000000 +0800 --- ./2d2/vb_init.c 2005-05-18 15:04:35.000000000 +0800 *************** *** 137,153 **** 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 ; --- 137,155 ---- 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 ; *************** *** 561,567 **** --- 563,573 ---- /* --------------------------------------------------------------------- */ 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 ; *************** *** 933,941 **** { USHORT P3d4 = Port , P3c4 = Port - 0x10 ; ! UCHAR data ; ! if ( HwDeviceExtension->jChipType == XG20 ) { XGINew_SetMemoryClock( HwDeviceExtension , pVBInfo ) ; --- 939,947 ---- { USHORT P3d4 = Port , P3c4 = Port - 0x10 ; ! #ifndef LINUX_XF86 UCHAR data ; ! #endif if ( HwDeviceExtension->jChipType == XG20 ) { XGINew_SetMemoryClock( HwDeviceExtension , pVBInfo ) ; *************** *** 996,1002 **** --- 1002,1010 ---- USHORT P3d4 = Port , P3c4 = Port - 0x10 ; + #ifndef LINUX_XF86 UCHAR data ; + #endif XGINew_SetMemoryClock( HwDeviceExtension , pVBInfo ) ; *************** *** 1378,1387 **** /* --------------------------------------------------------------------- */ 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 ; --- 1386,1395 ---- /* --------------------------------------------------------------------- */ 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 ; *************** *** 2590,2597 **** /* --------------------------------------------------------------------- */ void XGINew_SetMemoryClock( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) { UCHAR tempal ; ! XGINew_SetReg1( pVBInfo->P3c4 , 0x28 , pVBInfo->MCLKData[ XGINew_RAMType ].SR28 ) ; XGINew_SetReg1( pVBInfo->P3c4 , 0x29 , pVBInfo->MCLKData[ XGINew_RAMType ].SR29 ) ; --- 2598,2606 ---- /* --------------------------------------------------------------------- */ 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 ) ; XGINew_SetReg1( pVBInfo->P3c4 , 0x29 , pVBInfo->MCLKData[ XGINew_RAMType ].SR29 ) ; *************** *** 2608,2615 **** 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 ) ; } --- 2617,2624 ---- 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 ) ; } *************** *** 2721,2729 **** /* --------------------------------------------------------------------- */ 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 */ --- 2730,2742 ---- /* --------------------------------------------------------------------- */ 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 */ *************** *** 2909,2915 **** --- 2922,2930 ---- /* --------------------------------------------------------------------- */ 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 15:15:55.000000000 +0800 --- ./2d2/vb_setmode.c 2005-05-18 15:04:35.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 ) ; *************** *** 1193,1205 **** { UCHAR index , data ; ! USHORT temp , tempah , ! i , j , modeflag , ResInfo , DisplayType ; index = pVBInfo->RefIndex[ RefreshRateTableIndex ].Ext_CRT1CRTC ; /* Get index */ index = index&IndexMask ; --- 1198,1212 ---- { 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 ; --- 1799,1806 ---- 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 **** --- 2045,2053 ---- PVOID VideoMemoryAddress = ( PVOID )HwDeviceExtension->pjVideoMemoryAddress ; ULONG AdapterMemorySize = ( ULONG )HwDeviceExtension->ulVideoMemorySize ; PUSHORT pBuffer ; + #ifndef LINUX_XF86 int i ; + #endif if ( pVBInfo->ModeType >= ModeEGA ) { *************** *** 2704,2711 **** --- 2713,2722 ---- /* --------------------------------------------------------------------- */ void XGI_GetVGAType( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) { + #ifndef LINUX_XF86 USHORT tempbx , tempah ; + #endif if ( HwDeviceExtension->jChipType == XG20 ) { *************** *** 2790,2797 **** tempbx , temp , modeflag ; ! UCHAR OutputSelect = *pVBInfo->pOutputSelect ; if ( ModeNo <= 0x13 ) { --- 2801,2809 ---- tempbx , 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 */ --- 2870,2876 ---- 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 ; --- 3040,3050 ---- tempbx = 0 , resinfo = 0 , modeflag , ! index1 ; ! #ifndef LINUX_XF86 ! USHORT temp2 , OutputSelect = *pVBInfo->pOutputSelect ; + #endif tempbx = 0 ; resinfo = 0 ; *************** *** 3359,3365 **** --- 3373,3381 ---- /* --------------------------------------------------------------------- */ 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 ) ; --- 3681,3690 ---- 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 **** --- 3953,3963 ---- 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 ) ; --- 4165,4175 ---- /* --------------------------------------------------------------------- */ 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 ; --- 4184,4197 ---- /* --------------------------------------------------------------------- */ 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 ; --- 4489,4498 ---- { 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 ) { --- 4707,4722 ---- 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 , --- 4926,4932 ---- 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 , --- 5376,5392 ---- 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 , --- 5395,5405 ---- 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 ; --- 6220,6230 ---- /* --------------------------------------------------------------------- */ 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 , --- 6354,6363 ---- tempbx , modeflag , temp , ! temp2 ; ! #ifndef LINUX_XF86 ! USHORT push1 ; ! #endif ULONG tempebx , tempeax , *************** *** 6595,6601 **** modeflag , table ; ! XGI330_LCDDataTablStruct *tempdi ; tempbx = BX; --- 6636,6642 ---- 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 ; --- 7131,7137 ---- 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) ; --- 7370,7379 ---- /* --------------------------------------------------------------------- */ 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 ) --- 7637,7646 ---- /* --------------------------------------------------------------------- */ 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 ; --- 7856,7863 ---- { 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 ) ) { --- 8096,8105 ---- 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 ; --- 8534,8545 ---- /* --------------------------------------------------------------------- */ 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,8726 **** /* --------------------------------------------------------------------- */ void XGI_CloseCRTC( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo ) { ! USHORT tempbx , ! temp ; ! tempbx = 0 ; if ( pVBInfo->VBInfo & SetCRT2ToLCDA ) --- 8767,8776 ---- /* --------------------------------------------------------------------- */ void XGI_CloseCRTC( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo ) { ! USHORT tempbx ; ! #ifndef LINUX_XF86 ! USHORT temp ; ! #endif tempbx = 0 ; if ( pVBInfo->VBInfo & SetCRT2ToLCDA ) *************** *** 8738,8745 **** /* --------------------------------------------------------------------- */ void XGI_OpenCRTC( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo ) { ! USHORT tempbx , ! temp ; tempbx = 0 ; --- 8788,8797 ---- /* --------------------------------------------------------------------- */ 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 ; --- 8809,8825 ---- { 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 ) { --- 9145,9151 ---- 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 15:16:03.000000000 +0800 --- ./2d2/vb_util.c 2005-05-18 15:04:36.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,236 **** /* --------------------------------------------------------------------- */ void NewDelaySeconds( int seconds ) { ! int i , j ; ! for( i = 0 ; i < seconds ; i++ ) { --- 239,248 ---- /* --------------------------------------------------------------------- */ void NewDelaySeconds( int seconds ) { ! int i ; ! #ifndef LINUX_XF86 ! int j ; ! #endif for( i = 0 ; i < seconds ; i++ ) { *************** *** 261,268 **** /* --------------------------------------------------------------------- */ void Newdebugcode( UCHAR code ) { ULONG ultemp ; ! OutPortByte ( 0x80 , code ) ; /* OutPortByte ( 0x300 , code ) ; */ /* NewDelaySeconds( 0x3 ) ; */ --- 273,281 ---- /* --------------------------------------------------------------------- */ void Newdebugcode( UCHAR code ) { + #ifndef LINUX_XF86 ULONG ultemp ; ! #endif OutPortByte ( 0x80 , code ) ; /* OutPortByte ( 0x300 , code ) ; */ /* NewDelaySeconds( 0x3 ) ; */