From 108afbf8aef6520f2f34b3add94b059b60c44139 Mon Sep 17 00:00:00 2001 From: Bill Pemberton Date: Thu, 17 Jun 2010 13:10:47 -0400 Subject: [PATCH] Staging: xgifb: Remove SHORT, UCHAR, and LONG typedef Signed-off-by: Bill Pemberton Cc: Arnaud Patard Signed-off-by: Greg Kroah-Hartman --- drivers/staging/xgifb/XGI_main.h | 2 +- drivers/staging/xgifb/vb_ext.c | 26 +-- drivers/staging/xgifb/vb_ext.h | 6 +- drivers/staging/xgifb/vb_init.c | 98 ++++---- drivers/staging/xgifb/vb_setmode.c | 350 +++++++++++++++-------------- drivers/staging/xgifb/vb_setmode.h | 2 +- drivers/staging/xgifb/vb_struct.h | 312 ++++++++++++------------- drivers/staging/xgifb/vb_table.h | 223 +++++++++--------- drivers/staging/xgifb/vb_util.c | 16 +- drivers/staging/xgifb/vb_util.h | 6 +- drivers/staging/xgifb/vgatypes.h | 31 +-- 11 files changed, 540 insertions(+), 532 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main.h b/drivers/staging/xgifb/XGI_main.h index fcb1816e387a..472d124be346 100644 --- a/drivers/staging/xgifb/XGI_main.h +++ b/drivers/staging/xgifb/XGI_main.h @@ -888,7 +888,7 @@ unsigned char XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ex /* Routines from init.c/init301.c */ -extern void InitTo330Pointer(UCHAR,PVB_DEVICE_INFO pVBInfo); +extern void InitTo330Pointer(unsigned char, PVB_DEVICE_INFO pVBInfo); extern unsigned char XGIInitNew(PXGI_HW_DEVICE_INFO HwDeviceExtension); extern unsigned char XGISetModeNew(PXGI_HW_DEVICE_INFO HwDeviceExtension, unsigned short ModeNo); diff --git a/drivers/staging/xgifb/vb_ext.c b/drivers/staging/xgifb/vb_ext.c index aabab059e5c9..f1566380e149 100644 --- a/drivers/staging/xgifb/vb_ext.c +++ b/drivers/staging/xgifb/vb_ext.c @@ -9,8 +9,8 @@ #include "vb_util.h" #include "vb_setmode.h" #include "vb_ext.h" -extern UCHAR XGI330_SoftSetting; -extern UCHAR XGI330_OutputSelect; +extern unsigned char XGI330_SoftSetting; +extern unsigned char XGI330_OutputSelect; extern unsigned short XGI330_RGBSenseData2; extern unsigned short XGI330_YCSenseData2; extern unsigned short XGI330_VideoSenseData2; @@ -139,7 +139,7 @@ void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE, unsigned long VESA_POWER_STATE) { unsigned short ModeNo, ModeIdIndex; - UCHAR temp ; + unsigned char temp; VB_DEVICE_INFO VBINF; PVB_DEVICE_INFO pVBInfo = &VBINF; pVBInfo->BaseAddr = (unsigned long)pXGIHWDE->pjIOAddress ; @@ -209,18 +209,18 @@ void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE, } if ( VESA_POWER_STATE == 0x00000400 ) - XGINew_SetReg1( pVBInfo->Part4Port , 0x31 , ( UCHAR )( XGINew_GetReg1( pVBInfo->Part4Port , 0x31 ) & 0xFE ) ) ; + XGINew_SetReg1(pVBInfo->Part4Port, 0x31, (unsigned char)(XGINew_GetReg1(pVBInfo->Part4Port, 0x31) & 0xFE)); else - XGINew_SetReg1( pVBInfo->Part4Port , 0x31 , ( UCHAR )( XGINew_GetReg1( pVBInfo->Part4Port , 0x31 ) | 0x01 ) ) ; + XGINew_SetReg1(pVBInfo->Part4Port, 0x31, (unsigned char)(XGINew_GetReg1(pVBInfo->Part4Port, 0x31) | 0x01)); - temp = ( UCHAR )XGINew_GetReg1( pVBInfo->P3c4 , 0x1f ) ; + temp = (unsigned char)XGINew_GetReg1(pVBInfo->P3c4, 0x1f); temp &= 0x3f ; switch ( VESA_POWER_STATE ) { case 0x00000000: /* on */ if ( ( pXGIHWDE->ujVBChipID == VB_CHIP_301 ) || ( pXGIHWDE->ujVBChipID == VB_CHIP_302 ) ) { - XGINew_SetReg1( pVBInfo->P3c4 , 0x1f , ( UCHAR )( temp | 0x00 ) ) ; + XGINew_SetReg1(pVBInfo->P3c4, 0x1f, (unsigned char)(temp | 0x00)); XGI_EnableBridge( pXGIHWDE, pVBInfo ) ; } else @@ -278,7 +278,7 @@ void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE, XGI_DisplayOff( pXGIHWDE, pVBInfo ); } - XGINew_SetReg1( pVBInfo->P3c4 , 0x1f , ( UCHAR )( temp | 0x40 ) ) ; + XGINew_SetReg1(pVBInfo->P3c4, 0x1f, (unsigned char)(temp | 0x40)); break ; case 0x00000200: /* suspend */ if ( pXGIHWDE->jChipType == XG21 ) @@ -291,12 +291,12 @@ void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE, XGI_DisplayOff( pXGIHWDE, pVBInfo ); XGI_XG27BLSignalVDD( 0x20 , 0x00, pVBInfo ) ; /* LVDS signal off */ } - XGINew_SetReg1( pVBInfo->P3c4 , 0x1f , ( UCHAR )( temp | 0x80 ) ) ; + XGINew_SetReg1(pVBInfo->P3c4, 0x1f, (unsigned char)(temp | 0x80)); break ; case 0x00000400: /* off */ if ( (pXGIHWDE->ujVBChipID == VB_CHIP_301 ) || ( pXGIHWDE->ujVBChipID == VB_CHIP_302 ) ) { - XGINew_SetReg1( pVBInfo->P3c4 , 0x1f , ( UCHAR )( temp | 0xc0 ) ) ; + XGINew_SetReg1(pVBInfo->P3c4, 0x1f, (unsigned char)(temp | 0xc0)); XGI_DisableBridge( pXGIHWDE, pVBInfo ) ; } else @@ -837,7 +837,7 @@ void XGI_XG21Fun14Sub70( PVB_DEVICE_INFO pVBInfo , PX86_REGS pBiosArguments ) ModeNo = pVBInfo->EModeIDTable[ ModeIdIndex ].Ext_ModeID; if ( pVBInfo->EModeIDTable[ ModeIdIndex ].Ext_ModeID == 0xFF ) { - pBiosArguments->h.bh = (UCHAR) EModeCount; + pBiosArguments->h.bh = (unsigned char) EModeCount; return; } if ( !XGI_XG21CheckLVDSMode( ModeNo , ModeIdIndex, pVBInfo) ) @@ -883,7 +883,7 @@ void XGI_XG21Fun14Sub71( PVB_DEVICE_INFO pVBInfo , PX86_REGS pBiosArguments ) if (EModeCount == EModeIndex) { resindex = XGI_GetResInfo( ModeNo , ModeIdIndex, pVBInfo ) ; - pBiosArguments->h.bl = (UCHAR) ModeNo; + pBiosArguments->h.bl = (unsigned char) ModeNo; pBiosArguments->x.cx = pVBInfo->ModeResInfo[ resindex ].HTotal ; /* xres->ax */ pBiosArguments->x.dx = pVBInfo->ModeResInfo[ resindex ].VTotal ; /* yres->bx */ pBiosArguments->x.ax = 0x0014; @@ -966,7 +966,7 @@ void XGI_XG21Fun14Sub72( PVB_DEVICE_INFO pVBInfo , PX86_REGS pBiosArguments ) */ void XGI_XG21Fun14Sub73( PVB_DEVICE_INFO pVBInfo , PX86_REGS pBiosArguments ) { - UCHAR Select; + unsigned char Select; unsigned short lvdstableindex; diff --git a/drivers/staging/xgifb/vb_ext.h b/drivers/staging/xgifb/vb_ext.h index 5cb1862d9542..768aebefc415 100644 --- a/drivers/staging/xgifb/vb_ext.h +++ b/drivers/staging/xgifb/vb_ext.h @@ -11,7 +11,8 @@ struct WORDREGS { }; struct BYTEREGS { - UCHAR al, ah, hi_al, hi_ah, bl, bh, hi_bl, hi_bh, cl, ch, hi_cl, hi_ch, dl, dh, hi_dl, hi_dh; + unsigned char al, ah, hi_al, hi_ah, bl, bh, hi_bl, hi_bh, cl, ch, + hi_cl, hi_ch, dl, dh, hi_dl, hi_dh; }; typedef union _X86_REGS { @@ -25,7 +26,8 @@ extern void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE, unsigned long VESA_POWER_STATE); extern void XGI_GetSenseStatus( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo ); extern void XGINew_SetModeScratch ( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo ) ; -extern void ReadVBIOSTablData( UCHAR ChipType , PVB_DEVICE_INFO pVBInfo); +extern void ReadVBIOSTablData(unsigned char ChipType, + PVB_DEVICE_INFO pVBInfo); extern unsigned short XGINew_SenseLCD(PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO pVBInfo); diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c index 3f0e34bd0d05..343be2527a0e 100644 --- a/drivers/staging/xgifb/vb_init.c +++ b/drivers/staging/xgifb/vb_init.c @@ -18,7 +18,7 @@ -UCHAR XGINew_ChannelAB,XGINew_DataBusWidth; +unsigned char XGINew_ChannelAB, XGINew_DataBusWidth; unsigned short XGINew_DRAMType[17][5] = { {0x0C, 0x0A, 0x02, 0x40, 0x39}, {0x0D, 0x0A, 0x01, 0x40, 0x48}, @@ -79,8 +79,9 @@ void XGINew_SetDRAMModeRegister(PVB_DEVICE_INFO ); void XGINew_SetDRAMModeRegister340( PXGI_HW_DEVICE_INFO HwDeviceExtension ); void XGINew_SetDRAMDefaultRegister340(PXGI_HW_DEVICE_INFO HwDeviceExtension, unsigned long, PVB_DEVICE_INFO); -UCHAR XGINew_GetXG20DRAMType( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo); -unsigned char XGIInitNew( PXGI_HW_DEVICE_INFO HwDeviceExtension) ; +unsigned char XGINew_GetXG20DRAMType(PXGI_HW_DEVICE_INFO HwDeviceExtension, + PVB_DEVICE_INFO pVBInfo); +unsigned char XGIInitNew(PXGI_HW_DEVICE_INFO HwDeviceExtension); int XGINew_DDRSizing340( PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO ); void XGINew_DisableRefresh( PXGI_HW_DEVICE_INFO ,PVB_DEVICE_INFO) ; @@ -90,20 +91,20 @@ int XGINew_DDRSizing( PVB_DEVICE_INFO ); void XGINew_EnableRefresh( PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO); int XGINew_RAMType; /*int ModeIDOffset,StandTable,CRT1Table,ScreenOffset,REFIndex;*/ unsigned long UNIROM; /* UNIROM */ -unsigned char ChkLFB( PVB_DEVICE_INFO ); +unsigned char ChkLFB(PVB_DEVICE_INFO); void XGINew_Delay15us(unsigned long); void SetPowerConsume(PXGI_HW_DEVICE_INFO HwDeviceExtension, unsigned long XGI_P3d4Port); -void ReadVBIOSTablData( UCHAR ChipType , PVB_DEVICE_INFO pVBInfo); +void ReadVBIOSTablData(unsigned char ChipType, PVB_DEVICE_INFO pVBInfo); void XGINew_DDR1x_MRS_XG20(unsigned long P3c4, PVB_DEVICE_INFO pVBInfo); void XGINew_SetDRAMModeRegister_XG20( PXGI_HW_DEVICE_INFO HwDeviceExtension ); void XGINew_SetDRAMModeRegister_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension ); void XGINew_ChkSenseStatus ( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo ) ; void XGINew_SetModeScratch ( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo ) ; void XGINew_GetXG21Sense(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) ; -UCHAR GetXG21FPBits(PVB_DEVICE_INFO pVBInfo); +unsigned char GetXG21FPBits(PVB_DEVICE_INFO pVBInfo); void XGINew_GetXG27Sense(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) ; -UCHAR GetXG27FPBits(PVB_DEVICE_INFO pVBInfo); +unsigned char GetXG27FPBits(PVB_DEVICE_INFO pVBInfo); void DelayUS(unsigned long MicroSeconds) { @@ -117,12 +118,12 @@ void DelayUS(unsigned long MicroSeconds) /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -unsigned char XGIInitNew( PXGI_HW_DEVICE_INFO HwDeviceExtension ) +unsigned char XGIInitNew(PXGI_HW_DEVICE_INFO HwDeviceExtension) { VB_DEVICE_INFO VBINF; PVB_DEVICE_INFO pVBInfo = &VBINF; - UCHAR i , temp = 0 , temp1 ; + unsigned char i, temp = 0, temp1 ; // VBIOSVersion[ 5 ] ; volatile unsigned char *pVideoMemory; @@ -363,8 +364,8 @@ printk("15"); XGI_UnLockCRT2( HwDeviceExtension, pVBInfo) ; XGINew_SetRegANDOR( pVBInfo->Part0Port , 0x3F , 0xEF , 0x00 ) ; /* alan, disable VideoCapture */ XGINew_SetReg1( pVBInfo->Part1Port , 0x00 , 0x00 ) ; - temp1 = ( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x7B ) ; /* chk if BCLK>=100MHz */ - temp = ( UCHAR )( ( temp1 >> 4 ) & 0x0F ) ; + temp1 = (unsigned char)XGINew_GetReg1(pVBInfo->P3d4, 0x7B); /* chk if BCLK>=100MHz */ + temp = (unsigned char)((temp1 >> 4) & 0x0F); XGINew_SetReg1( pVBInfo->Part1Port , 0x02 , ( *pVBInfo->pCRT2Data_1_2 ) ) ; @@ -489,7 +490,7 @@ printk("22"); /* SetDefExt2Regs begin */ /* AGP = 1 ; - temp =( UCHAR )XGINew_GetReg1( pVBInfo->P3c4 , 0x3A ) ; + temp =(unsigned char)XGINew_GetReg1(pVBInfo->P3c4, 0x3A) ; temp &= 0x30 ; if ( temp == 0x30 ) AGP = 0 ; @@ -508,7 +509,7 @@ printk("22"); // Temp = ( InPortLong( 0xcfc ) & 0xFFFF ) ; // if ( Temp == 0x1039 ) // { - XGINew_SetReg1( pVBInfo->P3c4 , 0x22 , ( UCHAR )( ( *pVBInfo->pSR22 ) & 0xFE ) ) ; + XGINew_SetReg1(pVBInfo->P3c4, 0x22, (unsigned char)((*pVBInfo->pSR22) & 0xFE)); // } // else // { @@ -545,9 +546,10 @@ return 1; /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -UCHAR XGINew_GetXG20DRAMType( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo) +unsigned char XGINew_GetXG20DRAMType(PXGI_HW_DEVICE_INFO HwDeviceExtension, + PVB_DEVICE_INFO pVBInfo) { - UCHAR data, temp ; + unsigned char data, temp; if ( HwDeviceExtension->jChipType < XG20 ) { @@ -615,9 +617,9 @@ UCHAR XGINew_GetXG20DRAMType( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -UCHAR XGINew_Get310DRAMType(PVB_DEVICE_INFO pVBInfo) +unsigned char XGINew_Get310DRAMType(PVB_DEVICE_INFO pVBInfo) { - UCHAR data ; + unsigned char data ; /* index = XGINew_GetReg1( pVBInfo->P3c4 , 0x1A ) ; */ /* index &= 07 ; */ @@ -1104,7 +1106,7 @@ void XGINew_DDR2_DefaultRegister(PXGI_HW_DEVICE_INFO HwDeviceExtension, void XGINew_SetDRAMDefaultRegister340(PXGI_HW_DEVICE_INFO HwDeviceExtension, unsigned long Port, PVB_DEVICE_INFO pVBInfo) { - UCHAR temp , temp1 , temp2 , temp3 , + unsigned char temp, temp1, temp2, temp3 , i , j , k ; unsigned long P3d4 = Port , @@ -1316,7 +1318,7 @@ void XGINew_DDR_MRS(PVB_DEVICE_INFO pVBInfo) void XGINew_VerifyMclk( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo) { unsigned char *pVideoMemory = pVBInfo->FBAddr ; - UCHAR i , j ; + unsigned char i, j ; unsigned short Temp , SR21 ; pVideoMemory[ 0 ] = 0xaa ; /* alan */ @@ -1454,7 +1456,7 @@ void XGINew_SetDRAMSize_310( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_ void XGINew_SetDRAMModeRegister340( PXGI_HW_DEVICE_INFO HwDeviceExtension ) { - UCHAR data ; + unsigned char data ; VB_DEVICE_INFO VBINF; PVB_DEVICE_INFO pVBInfo = &VBINF; pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase ; @@ -1749,8 +1751,8 @@ void XGINew_CheckBusWidth_310( PVB_DEVICE_INFO pVBInfo) /* Description : */ /* --------------------------------------------------------------------- */ int XGINew_SetRank(int index, - UCHAR RankNo, - UCHAR XGINew_ChannelAB, + unsigned char RankNo, + unsigned char XGINew_ChannelAB, unsigned short DRAMTYPE_TABLE[][5], PVB_DEVICE_INFO pVBInfo) { @@ -1790,8 +1792,8 @@ int XGINew_SetRank(int index, /* Description : */ /* --------------------------------------------------------------------- */ int XGINew_SetDDRChannel(int index, - UCHAR ChannelNo, - UCHAR XGINew_ChannelAB, + unsigned char ChannelNo, + unsigned char XGINew_ChannelAB, unsigned short DRAMTYPE_TABLE[][5], PVB_DEVICE_INFO pVBInfo) { @@ -2035,7 +2037,7 @@ int XGINew_CheckDDRRanks(int RankNo, int index, int XGINew_SDRSizing(PVB_DEVICE_INFO pVBInfo) { int i ; - UCHAR j ; + unsigned char j ; for( i = 0 ; i < 13 ; i++ ) { @@ -2043,7 +2045,8 @@ int XGINew_SDRSizing(PVB_DEVICE_INFO pVBInfo) for( j = 2 ; j > 0 ; j-- ) { - if ( !XGINew_SetRank( i , ( UCHAR )j , XGINew_ChannelAB , XGINew_SDRDRAM_TYPE , pVBInfo) ) + if (!XGINew_SetRank(i, (unsigned char)j, XGINew_ChannelAB, + XGINew_SDRDRAM_TYPE, pVBInfo)) continue ; else { @@ -2068,7 +2071,7 @@ unsigned short XGINew_SetDRAMSizeReg(int index, { unsigned short data = 0 , memsize = 0; int RankSize ; - UCHAR ChannelNo ; + unsigned char ChannelNo ; RankSize = DRAMTYPE_TABLE[ index ][ 3 ] * XGINew_DataBusWidth / 32 ; data = XGINew_GetReg1( pVBInfo->P3c4 , 0x13 ) ; @@ -2119,7 +2122,7 @@ unsigned short XGINew_SetDRAMSize20Reg(int index, { unsigned short data = 0 , memsize = 0; int RankSize ; - UCHAR ChannelNo ; + unsigned char ChannelNo ; RankSize = DRAMTYPE_TABLE[ index ][ 3 ] * XGINew_DataBusWidth / 8 ; data = XGINew_GetReg1( pVBInfo->P3c4 , 0x13 ) ; @@ -2202,9 +2205,9 @@ int XGINew_ReadWriteRest(unsigned short StopAddr, unsigned short StartAddr, /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -UCHAR XGINew_CheckFrequence( PVB_DEVICE_INFO pVBInfo ) +unsigned char XGINew_CheckFrequence(PVB_DEVICE_INFO pVBInfo) { - UCHAR data ; + unsigned char data ; data = XGINew_GetReg1( pVBInfo->P3d4 , 0x97 ) ; @@ -2227,7 +2230,7 @@ UCHAR XGINew_CheckFrequence( PVB_DEVICE_INFO pVBInfo ) /* --------------------------------------------------------------------- */ void XGINew_CheckChannel( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) { - UCHAR data; + unsigned char data; switch( HwDeviceExtension->jChipType ) { @@ -2564,7 +2567,7 @@ int XGINew_DDRSizing340( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO int XGINew_DDRSizing(PVB_DEVICE_INFO pVBInfo) { int i ; - UCHAR j ; + unsigned char j ; for( i = 0 ; i < 4 ; i++ ) { @@ -2573,7 +2576,8 @@ int XGINew_DDRSizing(PVB_DEVICE_INFO pVBInfo) for( j = 2 ; j > 0 ; j-- ) { XGINew_SetDDRChannel( i , j , XGINew_ChannelAB , XGINew_DDRDRAM_TYPE , pVBInfo ) ; - if ( !XGINew_SetRank( i , ( UCHAR )j , XGINew_ChannelAB , XGINew_DDRDRAM_TYPE, pVBInfo ) ) + if (!XGINew_SetRank(i, (unsigned char)j, XGINew_ChannelAB, + XGINew_DDRDRAM_TYPE, pVBInfo)) continue ; else { @@ -2612,9 +2616,7 @@ void XGINew_SetMemoryClock( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_IN 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 ) ; - } + XGINew_SetReg1(pVBInfo->P3c4, 0x32, ((unsigned char)XGINew_GetReg1(pVBInfo->P3c4, 0x32) & 0xFC) | 0x02); } } @@ -2625,7 +2627,7 @@ void XGINew_SetMemoryClock( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_IN /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -unsigned char ChkLFB( PVB_DEVICE_INFO pVBInfo ) +unsigned char ChkLFB(PVB_DEVICE_INFO pVBInfo) { if (LFBDRAMTrap & XGINew_GetReg1(pVBInfo->P3d4 , 0x78)) return 1; @@ -2646,14 +2648,14 @@ void SetPowerConsume(PXGI_HW_DEVICE_INFO HwDeviceExtension, unsigned long XGI_P3d4Port) { unsigned long lTemp ; - UCHAR bTemp; + unsigned char bTemp; HwDeviceExtension->pQueryVGAConfigSpace( HwDeviceExtension , 0x08 , 0 , &lTemp ) ; /* Get */ if ((lTemp&0xFF)==0) { /* set CR58 D[5]=0 D[3]=0 */ XGINew_SetRegAND( XGI_P3d4Port , 0x58 , 0xD7 ) ; - bTemp = (UCHAR) XGINew_GetReg1( XGI_P3d4Port , 0xCB ) ; + bTemp = (unsigned char) XGINew_GetReg1(XGI_P3d4Port, 0xCB); if (bTemp&0x20) { if (!(bTemp&0x10)) @@ -2720,11 +2722,11 @@ void XGINew_InitVBIOSData(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -void ReadVBIOSTablData( UCHAR ChipType , PVB_DEVICE_INFO pVBInfo) +void ReadVBIOSTablData(unsigned char ChipType, PVB_DEVICE_INFO pVBInfo) { volatile unsigned char *pVideoMemory = (unsigned char *)pVBInfo->ROMAddr; unsigned long i ; - UCHAR j , k ; + unsigned char j, k ; /* Volari customize data area end */ if ( ChipType == XG21 ) @@ -2910,7 +2912,7 @@ void XGINew_SetDRAMModeRegister_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension ) void XGINew_SetDRAMModeRegister_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension ) { - UCHAR data ; + unsigned char data ; VB_DEVICE_INFO VBINF; PVB_DEVICE_INFO pVBInfo = &VBINF; pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase ; @@ -3114,7 +3116,7 @@ void XGINew_SetModeScratch ( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_ /* -------------------------------------------------------- */ void XGINew_GetXG21Sense(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) { - UCHAR Temp; + unsigned char Temp; volatile unsigned char *pVideoMemory = (unsigned char *)pVBInfo->ROMAddr; pVBInfo->IF_DEF_LVDS = 0 ; @@ -3156,7 +3158,7 @@ void XGINew_GetXG21Sense(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO /* -------------------------------------------------------- */ void XGINew_GetXG27Sense(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) { - UCHAR Temp,bCR4A; + unsigned char Temp, bCR4A; pVBInfo->IF_DEF_LVDS = 0 ; bCR4A = XGINew_GetReg1( pVBInfo->P3d4 , 0x4A ) ; @@ -3178,9 +3180,9 @@ void XGINew_GetXG27Sense(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO } -UCHAR GetXG21FPBits(PVB_DEVICE_INFO pVBInfo) +unsigned char GetXG21FPBits(PVB_DEVICE_INFO pVBInfo) { - UCHAR CR38,CR4A,temp; + unsigned char CR38, CR4A, temp; CR4A = XGINew_GetReg1( pVBInfo->P3d4 , 0x4A ) ; XGINew_SetRegANDOR( pVBInfo->P3d4 , 0x4A , ~0x10 , 0x10 ) ; /* enable GPIOE read */ @@ -3198,9 +3200,9 @@ UCHAR GetXG21FPBits(PVB_DEVICE_INFO pVBInfo) return temp; } -UCHAR GetXG27FPBits(PVB_DEVICE_INFO pVBInfo) +unsigned char GetXG27FPBits(PVB_DEVICE_INFO pVBInfo) { - UCHAR CR4A,temp; + unsigned char CR4A, temp; CR4A = XGINew_GetReg1( pVBInfo->P3d4 , 0x4A ) ; XGINew_SetRegANDOR( pVBInfo->P3d4 , 0x4A , ~0x03 , 0x03 ) ; /* enable GPIOA/B/C read */ diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index f27259e80987..5a74c595d78a 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -42,7 +42,7 @@ unsigned char XGI_GetLCDInfo(unsigned short ModeNo, unsigned char XGISetModeNew(PXGI_HW_DEVICE_INFO HwDeviceExtension, unsigned short ModeNo); unsigned char XGI_BridgeIsOn(PVB_DEVICE_INFO pVBInfo); -UCHAR XGI_GetModePtr(unsigned short ModeNo, +unsigned char XGI_GetModePtr(unsigned short ModeNo, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo); unsigned short XGI_GetOffset(unsigned short ModeNo, @@ -131,7 +131,7 @@ void XGI_GetVBType(PVB_DEVICE_INFO pVBInfo); void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,PXGI_HW_DEVICE_INFO HwDeviceExtension,PVB_DEVICE_INFO pVBInfo); void XGI_GetTVInfo(unsigned short ModeNo, unsigned short ModeIdIndex,PVB_DEVICE_INFO pVBInfo); void XGI_SetCRT2ECLK(unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short RefreshRateTableIndex,PVB_DEVICE_INFO pVBInfo); -void InitTo330Pointer(UCHAR,PVB_DEVICE_INFO pVBInfo); +void InitTo330Pointer(unsigned char, PVB_DEVICE_INFO pVBInfo); void XGI_GetLCDSync(unsigned short *HSyncWidth, unsigned short *VSyncWidth, PVB_DEVICE_INFO pVBInfo); void XGI_DisableBridge(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo); void XGI_EnableBridge(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo); @@ -146,7 +146,8 @@ void XGI_SetAntiFlicker(unsigned short ModeNo, unsigned short ModeIdIndex, P void XGI_SetEdgeEnhance(unsigned short ModeNo, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo); void XGI_SetPhaseIncr(PVB_DEVICE_INFO pVBInfo); void XGI_SetYFilter(unsigned short ModeNo, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo); -void XGI_GetTVPtrIndex2(unsigned short *tempbx,UCHAR* tempcl,UCHAR* tempch, PVB_DEVICE_INFO pVBInfo); +void XGI_GetTVPtrIndex2(unsigned short *tempbx, unsigned char* tempcl, + unsigned char *tempch, PVB_DEVICE_INFO pVBInfo); unsigned short XGI_GetTVPtrIndex(PVB_DEVICE_INFO pVBInfo); void XGI_SetCRT2ModeRegs(unsigned short ModeNo,PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO pVBInfo ); void XGI_CloseCRTC(PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO pVBInfo); @@ -155,28 +156,33 @@ void XGI_GetRAMDAC2DATA(unsigned short ModeNo, unsigned short ModeIdIndex, u void XGI_UnLockCRT2(PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO pVBInfo); void XGI_LockCRT2(PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO pVBInfo); void XGINew_EnableCRT2(PVB_DEVICE_INFO pVBInfo); -void XGINew_LCD_Wait_Time(UCHAR DelayTime, PVB_DEVICE_INFO pVBInfo); +void XGINew_LCD_Wait_Time(unsigned char DelayTime, PVB_DEVICE_INFO pVBInfo); void XGI_LongWait(PVB_DEVICE_INFO pVBInfo); void XGI_SetCRT1Offset(unsigned short ModeNo , unsigned short ModeIdIndex , unsigned short RefreshRateTableIndex , PXGI_HW_DEVICE_INFO HwDeviceExtension,PVB_DEVICE_INFO pVBInfo ); -void XGI_GetLCDVCLKPtr(UCHAR* di_0,UCHAR *di_1, PVB_DEVICE_INFO pVBInfo); -UCHAR XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex, unsigned short ModeNo, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo); -void XGI_GetVCLKLen(UCHAR tempal,UCHAR* di_0,UCHAR* di_1, PVB_DEVICE_INFO pVBInfo); +void XGI_GetLCDVCLKPtr(unsigned char *di_0, unsigned char *di_1, + PVB_DEVICE_INFO pVBInfo); +unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex, + unsigned short ModeNo, + unsigned short ModeIdIndex, + PVB_DEVICE_INFO pVBInfo); +void XGI_GetVCLKLen(unsigned char tempal, unsigned char *di_0, + unsigned char *di_1, PVB_DEVICE_INFO pVBInfo); unsigned short XGI_GetLCDCapPtr(PVB_DEVICE_INFO pVBInfo); unsigned short XGI_GetLCDCapPtr1(PVB_DEVICE_INFO pVBInfo); XGI301C_Tap4TimingStruct *XGI_GetTap4Ptr(unsigned short tempcx, PVB_DEVICE_INFO pVBInfo); void XGI_SetXG21FPBits(PVB_DEVICE_INFO pVBInfo); void XGI_SetXG27FPBits(PVB_DEVICE_INFO pVBInfo); -UCHAR XGI_XG21GetPSCValue(PVB_DEVICE_INFO pVBInfo); -UCHAR XGI_XG27GetPSCValue(PVB_DEVICE_INFO pVBInfo); +unsigned char XGI_XG21GetPSCValue(PVB_DEVICE_INFO pVBInfo); +unsigned char XGI_XG27GetPSCValue(PVB_DEVICE_INFO pVBInfo); void XGI_XG21BLSignalVDD(unsigned short tempbh, unsigned short tempbl, PVB_DEVICE_INFO pVBInfo); void XGI_XG27BLSignalVDD(unsigned short tempbh, unsigned short tempbl, PVB_DEVICE_INFO pVBInfo); void XGI_XG21SetPanelDelay(unsigned short tempbl, PVB_DEVICE_INFO pVBInfo); -unsigned char XGI_XG21CheckLVDSMode(unsigned short ModeNo, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo ); +unsigned char XGI_XG21CheckLVDSMode(unsigned short ModeNo, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo); void XGI_SetXG21LVDSPara(unsigned short ModeNo, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo ); void XGI_SetXG27LVDSPara(unsigned short ModeNo, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo ); -UCHAR XGI_SetDefaultVCLK( PVB_DEVICE_INFO pVBInfo ); +unsigned char XGI_SetDefaultVCLK(PVB_DEVICE_INFO pVBInfo); -extern void ReadVBIOSTablData( UCHAR ChipType , PVB_DEVICE_INFO pVBInfo); +extern void ReadVBIOSTablData(unsigned char ChipType, PVB_DEVICE_INFO pVBInfo); /* unsigned short XGINew_flag_clearbuffer; 0: no clear frame buffer 1:clear frame buffer */ @@ -230,7 +236,7 @@ unsigned short XGINew_VGA_DAC[] = { /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -void InitTo330Pointer( UCHAR ChipType ,PVB_DEVICE_INFO pVBInfo) +void InitTo330Pointer(unsigned char ChipType, PVB_DEVICE_INFO pVBInfo) { pVBInfo->SModeIDTable = (XGI_StStruct *) XGI330_SModeIDTable ; pVBInfo->StandTable = (XGI_StandTableStruct *) XGI330_StandTable ; @@ -385,10 +391,11 @@ void InitTo330Pointer( UCHAR ChipType ,PVB_DEVICE_INFO pVBInfo) /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -unsigned char XGISetModeNew(PXGI_HW_DEVICE_INFO HwDeviceExtension, unsigned short ModeNo) +unsigned char XGISetModeNew(PXGI_HW_DEVICE_INFO HwDeviceExtension, + unsigned short ModeNo) { unsigned short ModeIdIndex ; - /* PUCHAR pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress ; */ + /* unsigned char *pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress ; */ VB_DEVICE_INFO VBINF; PVB_DEVICE_INFO pVBInfo = &VBINF; pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase ; @@ -668,14 +675,14 @@ void XGI_SetCRT1Group(PXGI_HW_DEVICE_INFO HwDeviceExtension, { XGINew_SetReg1( pVBInfo->P3c4 , 0x2B , 0x4E) ; XGINew_SetReg1( pVBInfo->P3c4 , 0x2C , 0xE9) ; - b3CC =(UCHAR) XGINew_GetReg2(XGINew_P3cc) ; + b3CC = (unsigned char) XGINew_GetReg2(XGINew_P3cc) ; XGINew_SetReg3(XGINew_P3cc , (b3CC |= 0x0C) ) ; } else if ( ( ModeNo == 0x04) | ( ModeNo == 0x05) | ( ModeNo == 0x0D) ) { XGINew_SetReg1( pVBInfo->P3c4 , 0x2B , 0x1B) ; XGINew_SetReg1( pVBInfo->P3c4 , 0x2C , 0xE3) ; - b3CC = (UCHAR)XGINew_GetReg2(XGINew_P3cc) ; + b3CC = (unsigned char)XGINew_GetReg2(XGINew_P3cc) ; XGINew_SetReg3(XGINew_P3cc , (b3CC |= 0x0C) ) ; } } @@ -730,10 +737,10 @@ void XGI_SetCRT1Group(PXGI_HW_DEVICE_INFO HwDeviceExtension, /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -UCHAR XGI_GetModePtr(unsigned short ModeNo, unsigned short ModeIdIndex, +unsigned char XGI_GetModePtr(unsigned short ModeNo, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo) { - UCHAR index ; + unsigned char index ; if ( ModeNo <= 0x13 ) index = pVBInfo->SModeIDTable[ ModeIdIndex ].St_StTableIndex ; @@ -754,7 +761,7 @@ UCHAR XGI_GetModePtr(unsigned short ModeNo, unsigned short ModeIdIndex, /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -/*UCHAR XGI_SetBIOSData(unsigned short ModeNo , unsigned short ModeIdIndex ) +/*unsigned char XGI_SetBIOSData(unsigned short ModeNo, unsigned short ModeIdIndex) { return( 0 ) ; } @@ -766,7 +773,7 @@ UCHAR XGI_GetModePtr(unsigned short ModeNo, unsigned short ModeIdIndex, /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -/*UCHAR XGI_ClearBankRegs(unsigned short ModeNo , unsigned short ModeIdIndex ) +/*unsigned char XGI_ClearBankRegs(unsigned short ModeNo, unsigned short ModeIdIndex) { return( 0 ) ; } @@ -781,7 +788,7 @@ UCHAR XGI_GetModePtr(unsigned short ModeNo, unsigned short ModeIdIndex, void XGI_SetSeqRegs(unsigned short ModeNo, unsigned short StandTableIndex, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo) { - UCHAR tempah , + unsigned char tempah , SRdata ; unsigned short i , @@ -828,7 +835,7 @@ void XGI_SetSeqRegs(unsigned short ModeNo, unsigned short StandTableIndex, /* --------------------------------------------------------------------- */ void XGI_SetMiscRegs(unsigned short StandTableIndex, PVB_DEVICE_INFO pVBInfo ) { - UCHAR Miscdata ; + unsigned char Miscdata ; Miscdata = pVBInfo->StandTable[ StandTableIndex ].MISC ; /* Get Misc from file */ /* @@ -851,13 +858,13 @@ void XGI_SetMiscRegs(unsigned short StandTableIndex, PVB_DEVICE_INFO pVBInfo ) /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -void XGI_SetCRTCRegs(PXGI_HW_DEVICE_INFO HwDeviceExtension , +void XGI_SetCRTCRegs(PXGI_HW_DEVICE_INFO HwDeviceExtension, unsigned short StandTableIndex, PVB_DEVICE_INFO pVBInfo) { - UCHAR CRTCdata ; + unsigned char CRTCdata ; unsigned short i ; - CRTCdata = ( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x11 ) ; + CRTCdata = (unsigned char)XGINew_GetReg1(pVBInfo->P3d4, 0x11); CRTCdata &= 0x7f ; XGINew_SetReg1( pVBInfo->P3d4 , 0x11 , CRTCdata ) ; /* Unlock CRTC */ @@ -890,7 +897,7 @@ void XGI_SetCRTCRegs(PXGI_HW_DEVICE_INFO HwDeviceExtension , void XGI_SetATTRegs(unsigned short ModeNo, unsigned short StandTableIndex, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo) { - UCHAR ARdata ; + unsigned char ARdata ; unsigned short i, modeflag; if ( ModeNo <= 0x13 ) @@ -939,7 +946,7 @@ void XGI_SetATTRegs(unsigned short ModeNo, unsigned short StandTableIndex, /* --------------------------------------------------------------------- */ void XGI_SetGRCRegs(unsigned short StandTableIndex, PVB_DEVICE_INFO pVBInfo ) { - UCHAR GRdata ; + unsigned char GRdata ; unsigned short i ; for( i = 0 ; i <= 0x08 ; i++ ) @@ -950,7 +957,7 @@ void XGI_SetGRCRegs(unsigned short StandTableIndex, PVB_DEVICE_INFO pVBInfo ) if ( pVBInfo->ModeType > ModeVGA ) { - GRdata = ( UCHAR )XGINew_GetReg1( pVBInfo->P3ce , 0x05 ) ; + GRdata = (unsigned char)XGINew_GetReg1(pVBInfo->P3ce, 0x05); GRdata &= 0xBF ; /* 256 color disable */ XGINew_SetReg1( pVBInfo->P3ce , 0x05 , GRdata ) ; } @@ -978,7 +985,7 @@ void XGI_ClearExt1Regs(PVB_DEVICE_INFO pVBInfo) /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -UCHAR XGI_SetDefaultVCLK( PVB_DEVICE_INFO pVBInfo ) +unsigned char XGI_SetDefaultVCLK(PVB_DEVICE_INFO pVBInfo) { XGINew_SetRegANDOR( pVBInfo->P3c4 , 0x31 , ~0x30 , 0x20 ) ; @@ -1005,7 +1012,7 @@ unsigned short XGI_GetRatePtrCRT2(PXGI_HW_DEVICE_INFO pXGIHWDE, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo) { - SHORT LCDRefreshIndex[] = { 0x00 , 0x00 , 0x03 , 0x01 } , + short LCDRefreshIndex[] = { 0x00 , 0x00 , 0x03 , 0x01 } , LCDARefreshIndex[] = { 0x00 , 0x00 , 0x03 , 0x01 , 0x01 , 0x01 , 0x01 } ; unsigned short RefreshRateTableIndex, i, modeflag, index, temp; @@ -1140,8 +1147,8 @@ unsigned short XGI_GetRatePtrCRT2(PXGI_HW_DEVICE_INFO pXGIHWDE, /* Description : */ /* --------------------------------------------------------------------- */ unsigned char XGI_AjustCRT2Rate(unsigned short ModeNo, unsigned short ModeIdIndex, - unsigned short RefreshRateTableIndex, - unsigned short *i, PVB_DEVICE_INFO pVBInfo) + unsigned short RefreshRateTableIndex, + unsigned short *i, PVB_DEVICE_INFO pVBInfo) { unsigned short tempax, tempbx, resinfo, modeflag, infoflag; @@ -1337,15 +1344,13 @@ void XGI_SetCRT1CRTC(unsigned short ModeNo, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo, PXGI_HW_DEVICE_INFO HwDeviceExtension) { - UCHAR index , - data ; - + unsigned char index, data; unsigned short i; index = pVBInfo->RefIndex[ RefreshRateTableIndex ].Ext_CRT1CRTC ; /* Get index */ index = index&IndexMask ; - data =( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x11 ) ; + data = (unsigned char)XGINew_GetReg1(pVBInfo->P3d4, 0x11); data &= 0x7F ; XGINew_SetReg1(pVBInfo->P3d4,0x11,data); /* Unlock CRTC */ @@ -1375,14 +1380,14 @@ void XGI_SetCRT1CRTC(unsigned short ModeNo, unsigned short ModeIdIndex, /* --------------------------------------------------------------------- */ void XGI_SetCRT1Timing_H( PVB_DEVICE_INFO pVBInfo, PXGI_HW_DEVICE_INFO HwDeviceExtension ) { - UCHAR data , data1, pushax; + unsigned char data, data1, pushax; unsigned short i, j; /* XGINew_SetReg1( pVBInfo->P3d4 , 0x51 , 0 ) ; */ /* XGINew_SetReg1( pVBInfo->P3d4 , 0x56 , 0 ) ; */ /* XGINew_SetRegANDOR( pVBInfo->P3d4 ,0x11 , 0x7f , 0x00 ) ; */ - data = ( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x11 ) ; /* unlock cr0-7 */ + data = (unsigned char)XGINew_GetReg1(pVBInfo->P3d4, 0x11); /* unlock cr0-7 */ data &= 0x7F ; XGINew_SetReg1( pVBInfo->P3d4 , 0x11 , data ) ; @@ -1401,7 +1406,7 @@ void XGI_SetCRT1Timing_H( PVB_DEVICE_INFO pVBInfo, PXGI_HW_DEVICE_INFO HwDeviceE XGINew_SetReg1(pVBInfo->P3c4, (unsigned short)(i + 6), data); } - j = ( UCHAR )XGINew_GetReg1( pVBInfo->P3c4 , 0x0e ) ; + j = (unsigned char)XGINew_GetReg1(pVBInfo->P3c4, 0x0e); j &= 0x1F ; data = pVBInfo->TimingH[ 0 ].data[ 7 ] ; data &= 0xE0 ; @@ -1410,17 +1415,17 @@ void XGI_SetCRT1Timing_H( PVB_DEVICE_INFO pVBInfo, PXGI_HW_DEVICE_INFO HwDeviceE if ( HwDeviceExtension->jChipType >= XG20 ) { - data = ( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x04 ) ; + data = (unsigned char)XGINew_GetReg1(pVBInfo->P3d4, 0x04); data = data - 1 ; XGINew_SetReg1( pVBInfo->P3d4 , 0x04 , data ) ; - data = ( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x05 ) ; + data = (unsigned char)XGINew_GetReg1(pVBInfo->P3d4, 0x05); data1 = data ; data1 &= 0xE0 ; data &= 0x1F ; if ( data == 0 ) { pushax = data ; - data = ( UCHAR )XGINew_GetReg1( pVBInfo->P3c4 , 0x0c ) ; + data = (unsigned char)XGINew_GetReg1(pVBInfo->P3c4, 0x0c); data &= 0xFB ; XGINew_SetReg1( pVBInfo->P3c4 , 0x0c , data ) ; data = pushax ; @@ -1428,7 +1433,7 @@ void XGI_SetCRT1Timing_H( PVB_DEVICE_INFO pVBInfo, PXGI_HW_DEVICE_INFO HwDeviceE data = data - 1 ; data |= data1 ; XGINew_SetReg1( pVBInfo->P3d4 , 0x05 , data ) ; - data = ( UCHAR )XGINew_GetReg1( pVBInfo->P3c4 , 0x0e ) ; + data = (unsigned char)XGINew_GetReg1(pVBInfo->P3c4, 0x0e); data = data >> 5 ; data = data + 3 ; if ( data > 7 ) @@ -1449,7 +1454,7 @@ void XGI_SetCRT1Timing_V(unsigned short ModeIdIndex, unsigned short ModeNo, PVB_DEVICE_INFO pVBInfo) { - UCHAR data ; + unsigned char data; unsigned short i, j; /* XGINew_SetReg1( pVBInfo->P3d4 , 0x51 , 0 ) ; */ @@ -1474,7 +1479,7 @@ void XGI_SetCRT1Timing_V(unsigned short ModeIdIndex, XGINew_SetReg1(pVBInfo->P3d4, (unsigned short)(i + 0x11), data); } - j = ( UCHAR )XGINew_GetReg1( pVBInfo->P3c4 , 0x0a ) ; + j = (unsigned char)XGINew_GetReg1(pVBInfo->P3c4, 0x0a); j &= 0xC0 ; data = pVBInfo->TimingV[ 0 ].data[ 6 ] ; data &= 0x3F ; @@ -1494,7 +1499,7 @@ void XGI_SetCRT1Timing_V(unsigned short ModeIdIndex, if ( i ) data |= 0x80 ; - j = ( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x09 ) ; + j = (unsigned char)XGINew_GetReg1(pVBInfo->P3d4, 0x09); j &= 0x5F ; data |= j ; XGINew_SetReg1( pVBInfo->P3d4 , 0x09 , data ) ; @@ -1511,7 +1516,7 @@ void XGI_SetXG21CRTC(unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo) { - UCHAR StandTableIndex, index, Tempax, Tempbx, Tempcx, Tempdx ; + unsigned char StandTableIndex, index, Tempax, Tempbx, Tempcx, Tempdx; unsigned short Temp1, Temp2, Temp3; if ( ModeNo <= 0x13 ) @@ -1541,7 +1546,7 @@ void XGI_SetXG21CRTC(unsigned short ModeNo, unsigned short ModeIdIndex, Tempdx |= Tempcx ; /* Tempdx: VRS[8:1] */ XGINew_SetReg1( pVBInfo->P3c4 , 0x34 , Tempdx ) ; /* SR34[7:0]: VRS[8:1] */ - Temp1 = Tempcx << 1 ; /* Temp1[8]: VRS[8] UCHAR -> unsigned short */ + Temp1 = Tempcx << 1 ; /* Temp1[8]: VRS[8] unsigned char -> unsigned short */ Temp1 |= Tempbx ; /* Temp1[8:0]: VRS[8:0] */ Tempax &= 0x80 ; /* Tempax[7]: CR7[7] */ Temp2 = Tempax << 2 ; /* Temp2[9]: VRS[9] */ @@ -1555,11 +1560,11 @@ void XGI_SetXG21CRTC(unsigned short ModeNo, unsigned short ModeIdIndex, if ( Tempax < Temp3 ) /* VRE[3:0]>= 9 ; /* [10:9]->[1:0] */ - Tempbx = (UCHAR)Temp1 ; /* Tempbx[1:0]: VRS[10:9] */ + Tempbx = (unsigned char)Temp1; /* Tempbx[1:0]: VRS[10:9] */ Tempax |= Tempbx ; /* VRE[5:0]VRS[10:9] */ Tempax &= 0x7F ; XGINew_SetReg1( pVBInfo->P3c4 , 0x3F , Tempax ) ; /* SR3F D[7:2]->VRE D[1:0]->VRS */ @@ -1593,7 +1598,7 @@ void XGI_SetXG21CRTC(unsigned short ModeNo, unsigned short ModeIdIndex, Temp2 |= 0x40 ; /* Temp2 + 0x40 */ Temp2 &= 0xFF ; - Tempax = (UCHAR)Temp2 ; /* Tempax: HRE[7:0] */ + Tempax = (unsigned char)Temp2; /* Tempax: HRE[7:0] */ Tempax <<= 2 ; /* Tempax[7:2]: HRE[5:0] */ Tempdx >>= 6 ; /* Tempdx[7:6]->[1:0] HRS[9:8] */ Tempax |= Tempdx ; /* HRE[5:0]HRS[9:8] */ @@ -1637,11 +1642,11 @@ void XGI_SetXG21CRTC(unsigned short ModeNo, unsigned short ModeIdIndex, Temp2 |= 0x20 ; /* VRE + 0x20 */ Temp2 &= 0xFF ; - Tempax = (UCHAR)Temp2 ; /* Tempax: VRE[7:0] */ + Tempax = (unsigned char)Temp2; /* Tempax: VRE[7:0] */ Tempax <<= 2 ; /* Tempax[7:0]; VRE[5:0]00 */ Temp1 &= 0x600 ; /* Temp1[10:9]: VRS[10:9] */ Temp1 >>= 9 ; /* Temp1[1:0]: VRS[10:9] */ - Tempbx = (UCHAR)Temp1 ; + Tempbx = (unsigned char)Temp1; Tempax |= Tempbx ; /* Tempax[7:0]: VRE[5:0]VRS[10:9] */ Tempax &= 0x7F ; XGINew_SetReg1( pVBInfo->P3c4 , 0x3F , Tempax ) ; /* SR3F D[7:2]->VRE D[1:0]->VRS */ @@ -1689,7 +1694,7 @@ void XGI_SetXG27CRTC(unsigned short ModeNo, unsigned short ModeIdIndex, Tempbx |= Tempax ; /* Tempbx[9:0]: VRE[9:0] */ if ( Tempax <= (Tempcx & 0x0F) ) /* VRE[3:0]<=VRS[3:0] */ Tempbx |= 0x10 ; /* Tempbx: VRE + 0x10 */ - Tempax = (UCHAR)Tempbx & 0xFF; /* Tempax[7:0]: VRE[7:0] */ + Tempax = (unsigned char)Tempbx & 0xFF; /* Tempax[7:0]: VRE[7:0] */ Tempax <<= 2 ; /* Tempax << 2: VRE[5:0] */ Tempcx = (Tempcx&0x600)>>8; /* Tempcx VRS[10:9] */ XGINew_SetRegANDOR( pVBInfo->P3c4 , 0x3F , ~0xFC, Tempax ) ; /* SR3F D[7:2]->VRE D[5:0] */ @@ -1809,7 +1814,7 @@ void XGI_SetXG21LCD(PVB_DEVICE_INFO pVBInfo, if ( ModeNo <= 0x13 ) { - b3CC = (UCHAR) XGINew_GetReg2( XGI_P3cc ) ; + b3CC = (unsigned char) XGINew_GetReg2(XGI_P3cc); if ( b3CC & 0x40 ) XGINew_SetRegOR( pVBInfo->P3c4 , 0x30 , 0x20 ) ; /* Hsync polarity */ if ( b3CC & 0x80 ) @@ -1863,7 +1868,7 @@ void XGI_SetXG27LCD(PVB_DEVICE_INFO pVBInfo, if ( ModeNo <= 0x13 ) { - b3CC = (UCHAR) XGINew_GetReg2( XGI_P3cc ) ; + b3CC = (unsigned char) XGINew_GetReg2(XGI_P3cc); if ( b3CC & 0x40 ) XGINew_SetRegOR( pVBInfo->P3c4 , 0x30 , 0x20 ) ; /* Hsync polarity */ if ( b3CC & 0x80 ) @@ -1938,7 +1943,7 @@ void XGI_SetCRT1DE(PXGI_HW_DEVICE_INFO HwDeviceExtension, { unsigned short resindex, tempax, tempbx, tempcx, temp, modeflag; - UCHAR data ; + unsigned char data; resindex = XGI_GetResInfo( ModeNo , ModeIdIndex, pVBInfo ) ; @@ -1981,8 +1986,8 @@ void XGI_SetCRT1DE(PXGI_HW_DEVICE_INFO HwDeviceExtension, tempax -= 1 ; tempbx -= 1 ; tempcx = tempax ; - temp = ( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x11 ) ; - data = ( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x11 ) ; + temp = (unsigned char)XGINew_GetReg1(pVBInfo->P3d4, 0x11); + data = (unsigned char)XGINew_GetReg1(pVBInfo->P3d4, 0x11); data &= 0x7F ; XGINew_SetReg1( pVBInfo->P3d4 , 0x11 , data ) ; /* Unlock CRTC */ XGINew_SetReg1(pVBInfo->P3d4, 0x01, (unsigned short)(tempcx & 0xff)); @@ -1998,7 +2003,7 @@ void XGI_SetCRT1DE(PXGI_HW_DEVICE_INFO HwDeviceExtension, tempax |= 0x40 ; XGINew_SetRegANDOR( pVBInfo->P3d4 , 0x07 , ~0x42 , tempax ) ; - data =( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x07 ) ; + data = (unsigned char)XGINew_GetReg1(pVBInfo->P3d4, 0x07); data &= 0xFF ; tempax = 0 ; @@ -2105,7 +2110,7 @@ void XGI_SetCRT1Offset(unsigned short ModeNo, i |= temp ; XGINew_SetReg1( pVBInfo->P3c4 , 0x0E , i ) ; - temp =( UCHAR )temp2 ; + temp = (unsigned char)temp2; temp &= 0xFF ; /* al */ XGINew_SetReg1( pVBInfo->P3d4 , 0x13 , temp ) ; @@ -2142,7 +2147,7 @@ void XGI_SetCRT1VCLK(unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo) { - UCHAR index , data ; + unsigned char index, data; unsigned short vclkindex ; if ( pVBInfo->IF_DEF_LVDS == 1 ) @@ -2398,9 +2403,9 @@ void XGI_SetVCLKState(PXGI_HW_DEVICE_INFO HwDeviceExtension, { unsigned short data , data2 = 0 ; - SHORT VCLK ; + short VCLK ; - UCHAR index ; + unsigned char index; if ( ModeNo <= 0x13 ) VCLK = 0 ; @@ -2817,7 +2822,7 @@ void XGI_ModCRT1Regs(unsigned short ModeNo, unsigned short ModeIdIndex, PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) { - UCHAR index ; + unsigned char index; unsigned short tempbx , i ; XGI_LVDSCRT1HDataStruct *LCDPtr = NULL ; XGI_LVDSCRT1VDataStruct *LCDPtr1 =NULL ; @@ -3184,7 +3189,7 @@ void XGI_SetLVDSRegs(unsigned short ModeNo, unsigned short ModeIdIndex, /* --------------------------------------------------------------------- */ void XGI_SetCRT2ECLK(unsigned short ModeNo , unsigned short ModeIdIndex , unsigned short RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo ) { - UCHAR di_0 , di_1 , tempal ; + unsigned char di_0, di_1, tempal; int i ; tempal = XGI_GetVCLKPtr( RefreshRateTableIndex , ModeNo , ModeIdIndex, pVBInfo ) ; @@ -3788,7 +3793,8 @@ void XGI_GetTVInfo(unsigned short ModeNo , unsigned short ModeIdIndex ,PVB_DEVIC /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -unsigned char XGI_GetLCDInfo(unsigned short ModeNo , unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo) +unsigned char XGI_GetLCDInfo(unsigned short ModeNo, unsigned short ModeIdIndex, + PVB_DEVICE_INFO pVBInfo) { unsigned short temp , tempax , @@ -3997,7 +4003,9 @@ unsigned char XGI_GetLCDInfo(unsigned short ModeNo , unsigned short ModeIdIndex, /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -unsigned char XGI_SearchModeID(unsigned short ModeNo , unsigned short *ModeIdIndex, PVB_DEVICE_INFO pVBInfo ) +unsigned char XGI_SearchModeID(unsigned short ModeNo, + unsigned short *ModeIdIndex, + PVB_DEVICE_INFO pVBInfo) { @@ -4052,7 +4060,10 @@ unsigned char XGI_SearchModeID(unsigned short ModeNo , unsigned short *ModeIdInd /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -unsigned char XGINew_CheckMemorySize(PXGI_HW_DEVICE_INFO HwDeviceExtension, unsigned short ModeNo, unsigned short ModeIdIndex,PVB_DEVICE_INFO pVBInfo) +unsigned char XGINew_CheckMemorySize(PXGI_HW_DEVICE_INFO HwDeviceExtension, + unsigned short ModeNo, + unsigned short ModeIdIndex, + PVB_DEVICE_INFO pVBInfo) { unsigned short memorysize , modeflag , @@ -4134,7 +4145,7 @@ unsigned char XGINew_CheckMemorySize(PXGI_HW_DEVICE_INFO HwDeviceExtension, unsi /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -/*void XGINew_IsLowResolution(unsigned short ModeNo , unsigned short ModeIdIndex, unsigned char XGINew_CheckMemorySize(PXGI_HW_DEVICE_INFO HwDeviceExtension, unsigned short ModeNo, unsigned short ModeIdIndex,PVB_DEVICE_INFO pVBInfo) +/*void XGINew_IsLowResolution(unsigned short ModeNo, unsigned short ModeIdIndex, unsigned char XGINew_CheckMemorySize(PXGI_HW_DEVICE_INFO HwDeviceExtension, unsigned short ModeNo, unsigned short ModeIdIndex,PVB_DEVICE_INFO pVBInfo) { unsigned short data ; unsigned short ModeFlag ; @@ -4296,40 +4307,41 @@ void XGI_WaitDisply( PVB_DEVICE_INFO pVBInfo ) void XGI_SenseCRT1( PVB_DEVICE_INFO pVBInfo ) { - UCHAR CRTCData[ 17 ] = { 0x5F , 0x4F , 0x50 , 0x82 , 0x55 , 0x81 , - 0x0B , 0x3E , 0xE9 , 0x0B , 0xDF , 0xE7 , - 0x04 , 0x00 , 0x00 , 0x05 , 0x00 } ; + unsigned char CRTCData[17] = { + 0x5F , 0x4F , 0x50 , 0x82 , 0x55 , 0x81 , + 0x0B , 0x3E , 0xE9 , 0x0B , 0xDF , 0xE7 , + 0x04 , 0x00 , 0x00 , 0x05 , 0x00 }; - UCHAR SR01 = 0 , SR1F = 0 , SR07 = 0 , SR06 = 0 ; + unsigned char SR01 = 0, SR1F = 0, SR07 = 0, SR06 = 0; - UCHAR CR17 , CR63 , SR31 ; - unsigned short temp ; - UCHAR DAC_TEST_PARMS[ 3 ] = { 0x0F , 0x0F , 0x0F } ; + unsigned char CR17, CR63, SR31; + unsigned short temp ; + unsigned char DAC_TEST_PARMS[3] = { 0x0F, 0x0F, 0x0F } ; int i ; XGINew_SetReg1( pVBInfo->P3c4 , 0x05 , 0x86 ) ; /* [2004/05/06] Vicent to fix XG42 single LCD sense to CRT+LCD */ XGINew_SetReg1( pVBInfo->P3d4 , 0x57 , 0x4A ) ; - XGINew_SetReg1( pVBInfo->P3d4 , 0x53 , ( UCHAR )( XGINew_GetReg1( pVBInfo->P3d4 , 0x53 ) | 0x02 ) ) ; + XGINew_SetReg1(pVBInfo->P3d4, 0x53, (unsigned char)(XGINew_GetReg1(pVBInfo->P3d4, 0x53) | 0x02)); - SR31 = ( UCHAR )XGINew_GetReg1( pVBInfo->P3c4 , 0x31 ) ; - CR63 = ( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x63 ) ; - SR01 = ( UCHAR )XGINew_GetReg1( pVBInfo->P3c4 , 0x01 ) ; + SR31 = (unsigned char)XGINew_GetReg1(pVBInfo->P3c4, 0x31); + CR63 = (unsigned char)XGINew_GetReg1(pVBInfo->P3d4, 0x63); + SR01 = (unsigned char)XGINew_GetReg1(pVBInfo->P3c4, 0x01); - XGINew_SetReg1( pVBInfo->P3c4 , 0x01 , ( UCHAR )( SR01 & 0xDF ) ) ; - XGINew_SetReg1( pVBInfo->P3d4 , 0x63 , ( UCHAR )( CR63 & 0xBF ) ) ; + XGINew_SetReg1(pVBInfo->P3c4, 0x01, (unsigned char)(SR01 & 0xDF)); + XGINew_SetReg1(pVBInfo->P3d4, 0x63, (unsigned char)(CR63 & 0xBF)); - CR17 = ( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x17 ) ; - XGINew_SetReg1( pVBInfo->P3d4 , 0x17 , ( UCHAR )( CR17 | 0x80 ) ) ; + CR17 = (unsigned char)XGINew_GetReg1(pVBInfo->P3d4, 0x17); + XGINew_SetReg1(pVBInfo->P3d4, 0x17, (unsigned char)(CR17 | 0x80)) ; - SR1F = ( UCHAR )XGINew_GetReg1( pVBInfo->P3c4 , 0x1F ) ; - XGINew_SetReg1( pVBInfo->P3c4 , 0x1F , ( UCHAR )( SR1F | 0x04 ) ) ; + SR1F = (unsigned char)XGINew_GetReg1(pVBInfo->P3c4, 0x1F); + XGINew_SetReg1(pVBInfo->P3c4, 0x1F, (unsigned char)(SR1F | 0x04)); - SR07 = ( UCHAR )XGINew_GetReg1( pVBInfo->P3c4 , 0x07 ) ; - XGINew_SetReg1( pVBInfo->P3c4 , 0x07 , ( UCHAR )( SR07 & 0xFB ) ) ; - SR06 = ( UCHAR )XGINew_GetReg1( pVBInfo->P3c4 , 0x06 ) ; - XGINew_SetReg1( pVBInfo->P3c4 , 0x06 , ( UCHAR )( SR06 & 0xC3 ) ) ; + SR07 = (unsigned char)XGINew_GetReg1(pVBInfo->P3c4, 0x07); + XGINew_SetReg1(pVBInfo->P3c4, 0x07, (unsigned char)(SR07 & 0xFB)); + SR06 = (unsigned char)XGINew_GetReg1(pVBInfo->P3c4, 0x06); + XGINew_SetReg1(pVBInfo->P3c4, 0x06, (unsigned char)(SR06 & 0xC3)); XGINew_SetReg1( pVBInfo->P3d4 , 0x11 , 0x00 ) ; @@ -4345,7 +4357,7 @@ void XGI_SenseCRT1( PVB_DEVICE_INFO pVBInfo ) for( i = 13 ; i < 16 ; i++ ) XGINew_SetReg1(pVBInfo->P3c4, (unsigned short)(i - 3), CRTCData[i]); - XGINew_SetReg1(pVBInfo->P3c4, 0x0E, (UCHAR)(CRTCData[16] & 0xE0)); + XGINew_SetReg1(pVBInfo->P3c4, 0x0E, (unsigned char)(CRTCData[16] & 0xE0)); XGINew_SetReg1( pVBInfo->P3c4 , 0x31 , 0x00 ) ; XGINew_SetReg1( pVBInfo->P3c4 , 0x2B , 0x1B ) ; @@ -4355,9 +4367,9 @@ void XGI_SenseCRT1( PVB_DEVICE_INFO pVBInfo ) for( i = 0 ; i < 256 ; i++ ) { - XGINew_SetReg3( ( pVBInfo->P3c8 + 1 ) , ( UCHAR )DAC_TEST_PARMS[ 0 ] ) ; - XGINew_SetReg3( ( pVBInfo->P3c8 + 1 ) , ( UCHAR )DAC_TEST_PARMS[ 1 ] ) ; - XGINew_SetReg3( ( pVBInfo->P3c8 + 1 ) , ( UCHAR )DAC_TEST_PARMS[ 2 ] ) ; + XGINew_SetReg3((pVBInfo->P3c8 + 1), (unsigned char)DAC_TEST_PARMS[0]); + XGINew_SetReg3((pVBInfo->P3c8 + 1), (unsigned char)DAC_TEST_PARMS[1]); + XGINew_SetReg3((pVBInfo->P3c8 + 1), (unsigned char)DAC_TEST_PARMS[2]); } XGI_VBLongWait( pVBInfo ) ; @@ -4393,8 +4405,9 @@ void XGI_SenseCRT1( PVB_DEVICE_INFO pVBInfo ) XGINew_SetReg1( pVBInfo->P3c4 , 0x31 , SR31 ) ; /* [2004/05/11] Vicent */ - XGINew_SetReg1( pVBInfo->P3d4 , 0x53 , ( UCHAR )( XGINew_GetReg1( pVBInfo->P3d4 , 0x53 ) & 0xFD ) ) ; - XGINew_SetReg1( pVBInfo->P3c4 , 0x1F , ( UCHAR ) SR1F ) ; + XGINew_SetReg1(pVBInfo->P3d4, 0x53, + (unsigned char)(XGINew_GetReg1(pVBInfo->P3d4, 0x53) & 0xFD)); + XGINew_SetReg1(pVBInfo->P3c4, 0x1F, (unsigned char)SR1F); } @@ -4428,7 +4441,9 @@ void XGI_WaitDisplay( PVB_DEVICE_INFO pVBInfo ) /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -unsigned char XGI_SetCRT2Group301(unsigned short ModeNo , PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo ) +unsigned char XGI_SetCRT2Group301(unsigned short ModeNo, + PXGI_HW_DEVICE_INFO HwDeviceExtension, + PVB_DEVICE_INFO pVBInfo) { unsigned short tempbx , ModeIdIndex , @@ -4593,7 +4608,7 @@ void XGI_GetCRT2ResInfo(unsigned short ModeNo, /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -unsigned char XGI_IsLCDDualLink( PVB_DEVICE_INFO pVBInfo ) +unsigned char XGI_IsLCDDualLink(PVB_DEVICE_INFO pVBInfo) { if ( ( ( ( pVBInfo->VBInfo & SetCRT2ToLCD ) | SetCRT2ToLCDA ) ) && ( pVBInfo->LCDInfo & SetLCDDualLink ) ) /* shampoo0129 */ @@ -4837,9 +4852,7 @@ void XGI_GetCRT2Data( unsigned short ModeNo , unsigned short ModeIdIndex , unsi /* --------------------------------------------------------------------- */ void XGI_SetCRT2VCLK(unsigned short ModeNo , unsigned short ModeIdIndex , unsigned short RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo ) { - UCHAR di_0 , - di_1 , - tempal ; + unsigned char di_0, di_1, tempal; tempal = XGI_GetVCLKPtr( RefreshRateTableIndex , ModeNo , ModeIdIndex, pVBInfo ) ; XGI_GetVCLKLen( tempal, &di_0 , &di_1, pVBInfo ) ; @@ -4872,7 +4885,8 @@ void XGI_SetCRT2VCLK(unsigned short ModeNo , unsigned short ModeIdIndex , unsign /* Output : al -> VCLK Index */ /* Description : */ /* --------------------------------------------------------------------- */ -void XGI_GetLCDVCLKPtr( UCHAR* di_0 , UCHAR *di_1, PVB_DEVICE_INFO pVBInfo ) +void XGI_GetLCDVCLKPtr(unsigned char *di_0, unsigned char *di_1, + PVB_DEVICE_INFO pVBInfo) { unsigned short index ; @@ -4908,14 +4922,16 @@ void XGI_GetLCDVCLKPtr( UCHAR* di_0 , UCHAR *di_1, PVB_DEVICE_INFO pVBInfo ) /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -UCHAR XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex, unsigned short ModeNo, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo) +unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex, + unsigned short ModeNo, unsigned short ModeIdIndex, + PVB_DEVICE_INFO pVBInfo) { unsigned short index , modeflag ; unsigned short tempbx ; - UCHAR tempal ; - UCHAR *CHTVVCLKPtr = NULL ; + unsigned char tempal; + unsigned char *CHTVVCLKPtr = NULL; if ( ModeNo <= 0x13 ) modeflag = pVBInfo->SModeIDTable[ ModeIdIndex ].St_ModeFlag ; /* si+St_ResInfo */ @@ -5067,7 +5083,7 @@ UCHAR XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex, unsigned short ModeNo } - tempal = ( UCHAR )XGINew_GetReg2( ( pVBInfo->P3ca + 0x02 ) ) ; + tempal = (unsigned char)XGINew_GetReg2((pVBInfo->P3ca + 0x02)); tempal = tempal >> 2 ; tempal &= 0x03 ; @@ -5088,19 +5104,20 @@ UCHAR XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex, unsigned short ModeNo /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -void XGI_GetVCLKLen(UCHAR tempal,UCHAR* di_0,UCHAR* di_1, PVB_DEVICE_INFO pVBInfo) +void XGI_GetVCLKLen(unsigned char tempal, unsigned char *di_0, + unsigned char *di_1, PVB_DEVICE_INFO pVBInfo) { if ( pVBInfo->IF_DEF_CH7007 == 1 ) /* [Billy] 2007/05/16 */ { /* VideoDebugPrint((0, "XGI_GetVCLKLen: pVBInfo->IF_DEF_CH7007==1\n")); */ - *di_0 = ( UCHAR )XGI_CH7007VCLKData[ tempal ].SR2B ; - *di_1 = ( UCHAR )XGI_CH7007VCLKData[ tempal ].SR2C ; + *di_0 = (unsigned char)XGI_CH7007VCLKData[tempal].SR2B; + *di_1 = (unsigned char)XGI_CH7007VCLKData[tempal].SR2C; } else if ( pVBInfo->VBType & ( VB_XGI301 | VB_XGI301B | VB_XGI302B | VB_XGI301LV | VB_XGI302LV | VB_XGI301C ) ) { if ( ( !( pVBInfo->VBInfo & SetCRT2ToLCDA ) ) && ( pVBInfo->SetFlag & ProgrammingCRT2 ) ) { - *di_0 = ( UCHAR )XGI_VBVCLKData[ tempal ].SR2B ; + *di_0 = (unsigned char)XGI_VBVCLKData[tempal].SR2B; *di_1 = XGI_VBVCLKData[ tempal ].SR2C ; } } @@ -5118,11 +5135,14 @@ void XGI_GetVCLKLen(UCHAR tempal,UCHAR* di_0,UCHAR* di_1, PVB_DEVICE_INFO pVBInf /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -void XGI_SetCRT2Offset(unsigned short ModeNo , - unsigned short ModeIdIndex , unsigned short RefreshRateTableIndex , PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo ) +void XGI_SetCRT2Offset(unsigned short ModeNo, + unsigned short ModeIdIndex, + unsigned short RefreshRateTableIndex, + PXGI_HW_DEVICE_INFO HwDeviceExtension, + PVB_DEVICE_INFO pVBInfo) { unsigned short offset ; - UCHAR temp ; + unsigned char temp; if ( pVBInfo->VBInfo & SetInSlaveMode ) { @@ -5130,12 +5150,12 @@ void XGI_SetCRT2Offset(unsigned short ModeNo , } offset = XGI_GetOffset( ModeNo , ModeIdIndex , RefreshRateTableIndex , HwDeviceExtension, pVBInfo ) ; - temp = ( UCHAR )( offset & 0xFF ) ; + temp = (unsigned char)(offset & 0xFF); XGINew_SetReg1( pVBInfo->Part1Port , 0x07 , temp ) ; - temp =( UCHAR)( ( offset & 0xFF00 ) >> 8 ) ; - XGINew_SetReg1( pVBInfo->Part1Port , 0x09 , temp ) ; - temp =( UCHAR )( ( ( offset >> 3 ) & 0xFF ) + 1 ) ; - XGINew_SetReg1( pVBInfo->Part1Port , 0x03 , temp ) ; + temp = (unsigned char)((offset & 0xFF00) >> 8); + XGINew_SetReg1(pVBInfo->Part1Port , 0x09 , temp); + temp = (unsigned char)(((offset >> 3) & 0xFF) + 1) ; + XGINew_SetReg1(pVBInfo->Part1Port, 0x03, temp); } @@ -5884,7 +5904,7 @@ void XGI_SetGroup2(unsigned short ModeNo, unsigned short ModeIdIndex, unsigned s modeflag , resinfo , crt2crtc ; - UCHAR *TimingPoint ; + unsigned char *TimingPoint ; unsigned long longtemp , tempeax , @@ -6360,7 +6380,7 @@ void XGI_SetGroup2(unsigned short ModeNo, unsigned short ModeIdIndex, unsigned s if ( pVBInfo->TVInfo & SetPALMTV ) { - tempax = ( UCHAR )XGINew_GetReg1( pVBInfo->Part2Port , 0x01 ) ; + tempax = (unsigned char)XGINew_GetReg1(pVBInfo->Part2Port, 0x01); tempax-- ; XGINew_SetRegAND( pVBInfo->Part2Port , 0x01 , tempax ) ; @@ -6745,7 +6765,7 @@ void XGI_SetTap4Regs( PVB_DEVICE_INFO pVBInfo) void XGI_SetGroup3(unsigned short ModeNo, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo) { unsigned short i; - UCHAR *tempdi; + unsigned char *tempdi; unsigned short modeflag; if(ModeNo<=0x13) @@ -7781,9 +7801,9 @@ void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo, /* --------------------------------------------------------------------- */ unsigned char XGI_BacklightByDrv(PVB_DEVICE_INFO pVBInfo) { - UCHAR tempah ; + unsigned char tempah ; - tempah = ( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x3A ) ; + tempah = (unsigned char)XGINew_GetReg1(pVBInfo->P3d4, 0x3A) ; if (tempah & BacklightControlBit) return 1; else @@ -7889,10 +7909,10 @@ void XGI_SetPanelPower(unsigned short tempah, unsigned short tempbl, PVB_DEVICE_ XGINew_SetRegANDOR( pVBInfo->P3c4 , 0x11 , tempbl , tempah ) ; } -UCHAR XG21GPIODataTransfer(UCHAR ujDate) +unsigned char XG21GPIODataTransfer(unsigned char ujDate) { - UCHAR ujRet = 0; - UCHAR i = 0; + unsigned char ujRet = 0; + unsigned char i = 0; for (i=0; i<8; i++) { @@ -7910,9 +7930,9 @@ UCHAR XG21GPIODataTransfer(UCHAR ujDate) /* bl[1] : LVDS backlight */ /* bl[0] : LVDS VDD */ /*----------------------------------------------------------------------------*/ -UCHAR XGI_XG21GetPSCValue(PVB_DEVICE_INFO pVBInfo) +unsigned char XGI_XG21GetPSCValue(PVB_DEVICE_INFO pVBInfo) { - UCHAR CR4A,temp; + unsigned char CR4A, temp; CR4A = XGINew_GetReg1( pVBInfo->P3d4 , 0x4A ) ; XGINew_SetRegAND( pVBInfo->P3d4 , 0x4A , ~0x23 ) ; /* enable GPIO write */ @@ -7931,9 +7951,9 @@ UCHAR XGI_XG21GetPSCValue(PVB_DEVICE_INFO pVBInfo) /* bl[1] : LVDS backlight */ /* bl[0] : LVDS VDD */ /*----------------------------------------------------------------------------*/ -UCHAR XGI_XG27GetPSCValue(PVB_DEVICE_INFO pVBInfo) +unsigned char XGI_XG27GetPSCValue(PVB_DEVICE_INFO pVBInfo) { - UCHAR CR4A,CRB4,temp; + unsigned char CR4A, CRB4, temp; CR4A = XGINew_GetReg1( pVBInfo->P3d4 , 0x4A ) ; XGINew_SetRegAND( pVBInfo->P3d4 , 0x4A , ~0x0C ) ; /* enable GPIO write */ @@ -7958,7 +7978,7 @@ UCHAR XGI_XG27GetPSCValue(PVB_DEVICE_INFO pVBInfo) /*----------------------------------------------------------------------------*/ void XGI_XG21BLSignalVDD(unsigned short tempbh, unsigned short tempbl, PVB_DEVICE_INFO pVBInfo) { - UCHAR CR4A,temp; + unsigned char CR4A, temp; CR4A = XGINew_GetReg1( pVBInfo->P3d4 , 0x4A ) ; tempbh &= 0x23; @@ -7983,7 +8003,7 @@ void XGI_XG21BLSignalVDD(unsigned short tempbh, unsigned short tempbl, PVB_DEVIC void XGI_XG27BLSignalVDD(unsigned short tempbh, unsigned short tempbl, PVB_DEVICE_INFO pVBInfo) { - UCHAR CR4A,temp; + unsigned char CR4A, temp; unsigned short tempbh0, tempbl0; tempbh0 = tempbh; @@ -8118,7 +8138,7 @@ unsigned char XGI_XG21CheckLVDSMode(unsigned short ModeNo, void XGI_SetXG21FPBits(PVB_DEVICE_INFO pVBInfo) { - UCHAR temp; + unsigned char temp; temp = XGINew_GetReg1( pVBInfo->P3d4 , 0x37 ) ; /* D[0] 1: 18bit */ temp = ( temp & 1 ) << 6; @@ -8129,7 +8149,7 @@ void XGI_SetXG21FPBits(PVB_DEVICE_INFO pVBInfo) void XGI_SetXG27FPBits(PVB_DEVICE_INFO pVBInfo) { - UCHAR temp; + unsigned char temp; temp = XGINew_GetReg1( pVBInfo->P3d4 , 0x37 ) ; /* D[1:0] 01: 18bit, 00: dual 12, 10: single 24 */ temp = ( temp & 3 ) << 6; @@ -8141,7 +8161,7 @@ void XGI_SetXG27FPBits(PVB_DEVICE_INFO pVBInfo) void XGI_SetXG21LVDSPara(unsigned short ModeNo, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo) { - UCHAR temp,Miscdata; + unsigned char temp, Miscdata; unsigned short xres , yres , modeflag , @@ -8153,13 +8173,13 @@ void XGI_SetXG21LVDSPara(unsigned short ModeNo, unsigned short ModeIdIndex, lvdstableindex = XGI_GetLVDSOEMTableIndex( pVBInfo ); - temp = (UCHAR) ( ( pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDS_Capability & (LCDPolarity << 8 ) ) >> 8 ); + temp = (unsigned char) ((pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDS_Capability & (LCDPolarity << 8)) >> 8); temp &= LCDPolarity; - Miscdata =(UCHAR) XGINew_GetReg2(pVBInfo->P3cc) ; + Miscdata = (unsigned char) XGINew_GetReg2(pVBInfo->P3cc) ; XGINew_SetReg3( pVBInfo->P3c2 , (Miscdata & 0x3F) | temp ) ; - temp = (UCHAR) ( pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDS_Capability & LCDPolarity ) ; + temp = (unsigned char) (pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDS_Capability & LCDPolarity) ; XGINew_SetRegANDOR( pVBInfo->P3c4 , 0x35 , ~0x80 , temp&0x80 ) ; /* SR35[7] FP VSync polarity */ XGINew_SetRegANDOR( pVBInfo->P3c4 , 0x30 , ~0x20 , (temp&0x40)>>1 ) ; /* SR30[5] FP HSync polarity */ @@ -8215,7 +8235,7 @@ void XGI_SetXG21LVDSPara(unsigned short ModeNo, unsigned short ModeIdIndex, LVDSVBE = LVDSVBS + LVDSVT - pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDSVDE ; - temp = ( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x11 ) ; + temp = (unsigned char)XGINew_GetReg1(pVBInfo->P3d4, 0x11) ; XGINew_SetReg1( pVBInfo->P3d4 , 0x11 , temp & 0x7f ) ; /* Unlock CRTC */ if (!( modeflag & Charx8Dot )) @@ -8325,7 +8345,7 @@ void XGI_SetXG21LVDSPara(unsigned short ModeNo, unsigned short ModeIdIndex, void XGI_SetXG27LVDSPara(unsigned short ModeNo, unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo) { - UCHAR temp,Miscdata; + unsigned char temp, Miscdata; unsigned short xres , yres , modeflag , @@ -8336,13 +8356,13 @@ void XGI_SetXG27LVDSPara(unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short value; lvdstableindex = XGI_GetLVDSOEMTableIndex( pVBInfo ); - temp = (UCHAR) ( ( pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDS_Capability & (LCDPolarity << 8 ) ) >> 8 ); + temp = (unsigned char) ((pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDS_Capability & (LCDPolarity << 8)) >> 8); temp &= LCDPolarity; - Miscdata =(UCHAR) XGINew_GetReg2(pVBInfo->P3cc) ; + Miscdata = (unsigned char) XGINew_GetReg2(pVBInfo->P3cc); XGINew_SetReg3( pVBInfo->P3c2 , (Miscdata & 0x3F) | temp ) ; - temp = (UCHAR) ( pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDS_Capability & LCDPolarity ) ; + temp = (unsigned char) (pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDS_Capability & LCDPolarity) ; XGINew_SetRegANDOR( pVBInfo->P3c4 , 0x35 , ~0x80 , temp&0x80 ) ; /* SR35[7] FP VSync polarity */ XGINew_SetRegANDOR( pVBInfo->P3c4 , 0x30 , ~0x20 , (temp&0x40)>>1 ) ; /* SR30[5] FP HSync polarity */ @@ -8398,7 +8418,7 @@ void XGI_SetXG27LVDSPara(unsigned short ModeNo, unsigned short ModeIdIndex, LVDSVBE = LVDSVBS + LVDSVT - pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDSVDE ; - temp = ( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x11 ) ; + temp = (unsigned char)XGINew_GetReg1(pVBInfo->P3d4, 0x11) ; XGINew_SetReg1( pVBInfo->P3d4 , 0x11 , temp & 0x7f ) ; /* Unlock CRTC */ if (!( modeflag & Charx8Dot )) @@ -8627,7 +8647,7 @@ unsigned char XGI_EnableChISLCD(PVB_DEVICE_INFO pVBInfo) /* --------------------------------------------------------------------- */ unsigned short XGI_GetLCDCapPtr(PVB_DEVICE_INFO pVBInfo) { - UCHAR tempal , + unsigned char tempal , tempah , tempbl , i ; @@ -8800,7 +8820,7 @@ void XGI_EnableBridge( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO p { if ( ( pVBInfo->SetFlag & EnableChB ) || ( pVBInfo->VBInfo & ( SetCRT2ToLCD | SetCRT2ToTV | SetCRT2ToRAMDAC ) ) ) { - tempah = ( UCHAR )XGINew_GetReg1( pVBInfo->P3c4 , 0x32 ) ; + tempah = (unsigned char)XGINew_GetReg1(pVBInfo->P3c4, 0x32); tempah &= 0xDF; if ( pVBInfo->VBInfo & SetInSlaveMode ) { @@ -8810,8 +8830,7 @@ void XGI_EnableBridge( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO p XGINew_SetReg1( pVBInfo->P3c4 , 0x32 , tempah ) ; XGINew_SetRegOR( pVBInfo->P3c4 , 0x1E , 0x20 ) ; - - tempah = ( UCHAR )XGINew_GetReg1( pVBInfo->Part1Port , 0x2E ) ; + tempah = (unsigned char)XGINew_GetReg1(pVBInfo->Part1Port, 0x2E); if ( !( tempah & 0x80 ) ) XGINew_SetRegOR( pVBInfo->Part1Port , 0x2E , 0x80 ) ; /* BVBDOENABLE = 1 */ @@ -8892,7 +8911,7 @@ void XGI_EnableBridge( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO p - tempah = ( UCHAR )XGINew_GetReg1( pVBInfo->Part1Port , 0x2E ) ; + tempah = (unsigned char)XGINew_GetReg1(pVBInfo->Part1Port, 0x2E); if ( !( tempah & 0x80 ) ) XGINew_SetRegOR( pVBInfo->Part1Port , 0x2E , 0x80 ) ; /* BVBDOENABLE = 1 */ @@ -9185,7 +9204,7 @@ void XGI_SetDelayComp( PVB_DEVICE_INFO pVBInfo ) { unsigned short index ; - UCHAR tempah , + unsigned char tempah , tempbl , tempbh ; @@ -9270,7 +9289,7 @@ void XGI_SetLCDCap( PVB_DEVICE_INFO pVBInfo ) if ( pVBInfo->VBType & ( VB_XGI301LV | VB_XGI302LV | VB_XGI301C ) ) { /* 301LV/302LV only */ /* Set 301LV Capability */ - XGINew_SetReg1(pVBInfo->Part4Port, 0x24, (UCHAR)(tempcx & 0x1F)); + XGINew_SetReg1(pVBInfo->Part4Port, 0x24, (unsigned char)(tempcx & 0x1F)); } /* VB Driving */ XGINew_SetRegANDOR(pVBInfo->Part4Port, 0x0D, @@ -9391,7 +9410,7 @@ void XGI_SetAntiFlicker(unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short tempbx , index ; - UCHAR tempah ; + unsigned char tempah ; if (pVBInfo->TVInfo & ( SetYPbPrMode525p | SetYPbPrMode750p ) ) return ; @@ -9427,7 +9446,7 @@ void XGI_SetEdgeEnhance(unsigned short ModeNo , unsigned short ModeIdIndex , PVB unsigned short tempbx , index ; - UCHAR tempah ; + unsigned char tempah ; tempbx = XGI_GetTVPtrIndex(pVBInfo ) ; @@ -9460,7 +9479,7 @@ void XGI_SetPhaseIncr( PVB_DEVICE_INFO pVBInfo ) { unsigned short tempbx ; - UCHAR tempcl , + unsigned char tempcl , tempch ; unsigned long tempData ; @@ -9491,7 +9510,7 @@ void XGI_SetYFilter(unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short tempbx , index ; - UCHAR tempcl , + unsigned char tempcl , tempch , tempal , *filterPtr ; @@ -9590,7 +9609,8 @@ void XGI_SetYFilter(unsigned short ModeNo, unsigned short ModeIdIndex, /* 1 : 301B/302B/301LV/302LV */ /* Description : */ /* --------------------------------------------------------------------- */ -void XGI_GetTVPtrIndex2(unsigned short *tempbx,UCHAR* tempcl,UCHAR* tempch, PVB_DEVICE_INFO pVBInfo) +void XGI_GetTVPtrIndex2(unsigned short *tempbx, unsigned char *tempcl, + unsigned char *tempch, PVB_DEVICE_INFO pVBInfo) { *tempbx = 0 ; *tempcl = 0 ; @@ -9637,9 +9657,9 @@ void XGI_SetCRT2ModeRegs(unsigned short ModeNo, PVB_DEVICE_INFO pVBInfo) { unsigned short tempbl ; - SHORT tempcl ; + short tempcl ; - UCHAR tempah ; + unsigned char tempah ; /* XGINew_SetReg1( pVBInfo->Part1Port , 0x03 , 0x00 ) ; // fix write part1 index 0 BTDRAM bit Bug */ tempah=0; @@ -9966,7 +9986,7 @@ void XGI_GetRAMDAC2DATA(unsigned short ModeNo , unsigned short ModeIdIndex , uns unsigned short XGI_GetColorDepth(unsigned short ModeNo , unsigned short ModeIdIndex, PVB_DEVICE_INFO pVBInfo) { unsigned short ColorDepth[ 6 ] = { 1 , 2 , 4 , 4 , 6 , 8 } ; - SHORT index ; + short index ; unsigned short modeflag ; if ( ModeNo <= 0x13 ) @@ -10036,7 +10056,7 @@ void XGINew_EnableCRT2( PVB_DEVICE_INFO pVBInfo) /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -void XGINew_LCD_Wait_Time(UCHAR DelayTime, PVB_DEVICE_INFO pVBInfo) +void XGINew_LCD_Wait_Time(unsigned char DelayTime, PVB_DEVICE_INFO pVBInfo) { unsigned short i , j ; @@ -10073,7 +10093,7 @@ void XGINew_LCD_Wait_Time(UCHAR DelayTime, PVB_DEVICE_INFO pVBInfo) /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -unsigned char XGI_BridgeIsOn( PVB_DEVICE_INFO pVBInfo ) +unsigned char XGI_BridgeIsOn(PVB_DEVICE_INFO pVBInfo) { unsigned short flag ; @@ -10218,7 +10238,7 @@ unsigned short XGI_GetVCLK2Ptr(unsigned short ModeNo , unsigned short ModeIdInde unsigned short CRT2Index , VCLKIndex ; unsigned short modeflag , resinfo ; - UCHAR *CHTVVCLKPtr = NULL ; + unsigned char *CHTVVCLKPtr = NULL ; if ( ModeNo <= 0x13 ) { @@ -10333,7 +10353,7 @@ unsigned short XGI_GetVCLK2Ptr(unsigned short ModeNo , unsigned short ModeIdInde } else { /* for CRT2 */ - VCLKIndex = ( UCHAR )XGINew_GetReg2( ( pVBInfo->P3ca + 0x02 ) ) ; /* Port 3cch */ + VCLKIndex = (unsigned char)XGINew_GetReg2((pVBInfo->P3ca + 0x02)); /* Port 3cch */ VCLKIndex = ( ( VCLKIndex >> 2 ) & 0x03 ) ; if ( ModeNo > 0x13 ) { diff --git a/drivers/staging/xgifb/vb_setmode.h b/drivers/staging/xgifb/vb_setmode.h index 67a56b9d4c14..1c37f809dadb 100644 --- a/drivers/staging/xgifb/vb_setmode.h +++ b/drivers/staging/xgifb/vb_setmode.h @@ -1,7 +1,7 @@ #ifndef _VBSETMODE_ #define _VBSETMODE_ -extern void InitTo330Pointer(UCHAR,PVB_DEVICE_INFO); +extern void InitTo330Pointer(unsigned char, PVB_DEVICE_INFO); extern void XGI_UnLockCRT2(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO ); extern void XGI_LockCRT2(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO ); extern void XGI_LongWait( PVB_DEVICE_INFO ); diff --git a/drivers/staging/xgifb/vb_struct.h b/drivers/staging/xgifb/vb_struct.h index c0498d87327b..1d401c04de8e 100644 --- a/drivers/staging/xgifb/vb_struct.h +++ b/drivers/staging/xgifb/vb_struct.h @@ -12,7 +12,7 @@ typedef struct _XGI_PanelDelayTblStruct { - UCHAR timer[2]; + unsigned char timer[2]; } XGI_PanelDelayTblStruct; typedef struct _XGI_LCDDataStruct @@ -28,11 +28,11 @@ typedef struct _XGI_LCDDataStruct typedef struct _XGI_LVDSCRT1HDataStruct { - UCHAR Reg[8]; + unsigned char Reg[8]; } XGI_LVDSCRT1HDataStruct; typedef struct _XGI_LVDSCRT1VDataStruct { - UCHAR Reg[7]; + unsigned char Reg[7]; } XGI_LVDSCRT1VDataStruct; @@ -45,12 +45,12 @@ typedef struct _XGI_TVDataStruct unsigned short TVHDE; unsigned short TVVDE; unsigned short RVBHRS; - UCHAR FlickerMode; + unsigned char FlickerMode; unsigned short HALFRVBHRS; - UCHAR RY1COE; - UCHAR RY2COE; - UCHAR RY3COE; - UCHAR RY4COE; + unsigned char RY1COE; + unsigned char RY2COE; + unsigned char RY3COE; + unsigned char RY4COE; } XGI_TVDataStruct; typedef struct _XGI_LVDSDataStruct @@ -69,7 +69,7 @@ typedef struct _XGI_LVDSDesStruct typedef struct _XGI_LVDSCRT1DataStruct { - UCHAR CR[15]; + unsigned char CR[15]; } XGI_LVDSCRT1DataStruct; /*add for LCDA*/ @@ -77,53 +77,53 @@ typedef struct _XGI_LVDSCRT1DataStruct typedef struct _XGI_StStruct { - UCHAR St_ModeID; + unsigned char St_ModeID; unsigned short St_ModeFlag; - UCHAR St_StTableIndex; - UCHAR St_CRT2CRTC; - UCHAR St_CRT2CRTC2; - UCHAR St_ResInfo; - UCHAR VB_StTVFlickerIndex; - UCHAR VB_StTVEdgeIndex; - UCHAR VB_StTVYFilterIndex; + unsigned char St_StTableIndex; + unsigned char St_CRT2CRTC; + unsigned char St_CRT2CRTC2; + unsigned char St_ResInfo; + unsigned char VB_StTVFlickerIndex; + unsigned char VB_StTVEdgeIndex; + unsigned char VB_StTVYFilterIndex; } XGI_StStruct; typedef struct _XGI_StandTableStruct { - UCHAR CRT_COLS; - UCHAR ROWS; - UCHAR CHAR_HEIGHT; + unsigned char CRT_COLS; + unsigned char ROWS; + unsigned char CHAR_HEIGHT; unsigned short CRT_LEN; - UCHAR SR[4]; - UCHAR MISC; - UCHAR CRTC[0x19]; - UCHAR ATTR[0x14]; - UCHAR GRC[9]; + unsigned char SR[4]; + unsigned char MISC; + unsigned char CRTC[0x19]; + unsigned char ATTR[0x14]; + unsigned char GRC[9]; } XGI_StandTableStruct; typedef struct _XGI_ExtStruct { - UCHAR Ext_ModeID; + unsigned char Ext_ModeID; unsigned short Ext_ModeFlag; unsigned short Ext_ModeInfo; unsigned short Ext_Point; unsigned short Ext_VESAID; - UCHAR Ext_VESAMEMSize; - UCHAR Ext_RESINFO; - UCHAR VB_ExtTVFlickerIndex; - UCHAR VB_ExtTVEdgeIndex; - UCHAR VB_ExtTVYFilterIndex; - UCHAR REFindex; + unsigned char Ext_VESAMEMSize; + unsigned char Ext_RESINFO; + unsigned char VB_ExtTVFlickerIndex; + unsigned char VB_ExtTVEdgeIndex; + unsigned char VB_ExtTVYFilterIndex; + unsigned char REFindex; } XGI_ExtStruct; typedef struct _XGI_Ext2Struct { unsigned short Ext_InfoFlag; - UCHAR Ext_CRT1CRTC; - UCHAR Ext_CRTVCLK; - UCHAR Ext_CRT2CRTC; - UCHAR Ext_CRT2CRTC2; - UCHAR ModeID; + unsigned char Ext_CRT1CRTC; + unsigned char Ext_CRTVCLK; + unsigned char Ext_CRT2CRTC; + unsigned char Ext_CRT2CRTC2; + unsigned char ModeID; unsigned short XRes; unsigned short YRes; /* unsigned short ROM_OFFSET; */ @@ -132,25 +132,25 @@ typedef struct _XGI_Ext2Struct typedef struct _XGI_MCLKDataStruct { - UCHAR SR28,SR29,SR2A; + unsigned char SR28, SR29, SR2A; unsigned short CLOCK; } XGI_MCLKDataStruct; typedef struct _XGI_ECLKDataStruct { - UCHAR SR2E,SR2F,SR30; + unsigned char SR2E, SR2F, SR30; unsigned short CLOCK; } XGI_ECLKDataStruct; typedef struct _XGI_VCLKDataStruct { - UCHAR SR2B,SR2C; + unsigned char SR2B, SR2C; unsigned short CLOCK; } XGI_VCLKDataStruct; typedef struct _XGI_VBVCLKDataStruct { - UCHAR Part4_A,Part4_B; + unsigned char Part4_A, Part4_B; unsigned short CLOCK; } XGI_VBVCLKDataStruct; @@ -164,13 +164,13 @@ typedef struct _XGI_ModeResInfoStruct { unsigned short HTotal; unsigned short VTotal; - UCHAR XChar; - UCHAR YChar; + unsigned char XChar; + unsigned char YChar; } XGI_ModeResInfoStruct; typedef struct _XGI_LCDNBDesStruct { - UCHAR NB[12]; + unsigned char NB[12]; } XGI_LCDNBDesStruct; /*add for new UNIVGABIOS*/ typedef struct _XGI_LCDDesStruct @@ -183,7 +183,7 @@ typedef struct _XGI_LCDDesStruct typedef struct _XGI_LCDDataTablStruct { - UCHAR PANELID; + unsigned char PANELID; unsigned short MASK; unsigned short CAP; unsigned short DATAPTR; @@ -243,13 +243,13 @@ typedef struct _XGI330_TVDataStruct unsigned short TVHDE; unsigned short TVVDE; unsigned short RVBHRS; - UCHAR FlickerMode; + unsigned char FlickerMode; unsigned short HALFRVBHRS; } XGI330_TVDataStruct; typedef struct _XGI330_LCDDataTablStruct { - UCHAR PANELID; + unsigned char PANELID; unsigned short MASK; unsigned short CAP; unsigned short DATAPTR; @@ -273,61 +273,61 @@ typedef struct _XGI330_CHTVDataStruct typedef struct _XGI_TimingHStruct { - UCHAR data[8]; + unsigned char data[8]; } XGI_TimingHStruct; typedef struct _XGI_TimingVStruct { - UCHAR data[7]; + unsigned char data[7]; } XGI_TimingVStruct; typedef struct _XGI_CH7007TV_TimingHStruct { - UCHAR data[10]; + unsigned char data[10]; } XGI_CH7007TV_TimingHStruct; typedef struct _XGI_CH7007TV_TimingVStruct { - UCHAR data[10]; + unsigned char data[10]; } XGI_CH7007TV_TimingVStruct; typedef struct _XGI_XG21CRT1Struct { - UCHAR ModeID,CR02,CR03,CR15,CR16; + unsigned char ModeID, CR02, CR03, CR15, CR16; } XGI_XG21CRT1Struct; typedef struct _XGI330_CHTVRegDataStruct { - UCHAR Reg[16]; + unsigned char Reg[16]; } XGI330_CHTVRegDataStruct; typedef struct _XGI330_LCDCapStruct { - UCHAR LCD_ID; + unsigned char LCD_ID; unsigned short LCD_Capability; - UCHAR LCD_SetFlag; - UCHAR LCD_DelayCompensation; - UCHAR LCD_HSyncWidth; - UCHAR LCD_VSyncWidth; - UCHAR LCD_VCLK; - UCHAR LCDA_VCLKData1; - UCHAR LCDA_VCLKData2; - UCHAR LCUCHAR_VCLKData1; - UCHAR LCUCHAR_VCLKData2; - UCHAR PSC_S1; - UCHAR PSC_S2; - UCHAR PSC_S3; - UCHAR PSC_S4; - UCHAR PSC_S5; - UCHAR PWD_2B; - UCHAR PWD_2C; - UCHAR PWD_2D; - UCHAR PWD_2E; - UCHAR PWD_2F; - UCHAR Spectrum_31; - UCHAR Spectrum_32; - UCHAR Spectrum_33; - UCHAR Spectrum_34; + unsigned char LCD_SetFlag; + unsigned char LCD_DelayCompensation; + unsigned char LCD_HSyncWidth; + unsigned char LCD_VSyncWidth; + unsigned char LCD_VCLK; + unsigned char LCDA_VCLKData1; + unsigned char LCDA_VCLKData2; + unsigned char LCUCHAR_VCLKData1; + unsigned char LCUCHAR_VCLKData2; + unsigned char PSC_S1; + unsigned char PSC_S2; + unsigned char PSC_S3; + unsigned char PSC_S4; + unsigned char PSC_S5; + unsigned char PWD_2B; + unsigned char PWD_2C; + unsigned char PWD_2D; + unsigned char PWD_2E; + unsigned char PWD_2F; + unsigned char Spectrum_31; + unsigned char Spectrum_32; + unsigned char Spectrum_33; + unsigned char Spectrum_34; } XGI330_LCDCapStruct; typedef struct _XGI21_LVDSCapStruct @@ -341,50 +341,50 @@ typedef struct _XGI21_LVDSCapStruct unsigned short LVDSVFP; unsigned short LVDSHSYNC; unsigned short LVDSVSYNC; - UCHAR VCLKData1; - UCHAR VCLKData2; - UCHAR PSC_S1; - UCHAR PSC_S2; - UCHAR PSC_S3; - UCHAR PSC_S4; - UCHAR PSC_S5; + unsigned char VCLKData1; + unsigned char VCLKData2; + unsigned char PSC_S1; + unsigned char PSC_S2; + unsigned char PSC_S3; + unsigned char PSC_S4; + unsigned char PSC_S5; } XGI21_LVDSCapStruct; typedef struct _XGI_CRT1TableStruct { - UCHAR CR[16]; + unsigned char CR[16]; } XGI_CRT1TableStruct; typedef struct _XGI330_VCLKDataStruct { - UCHAR SR2B,SR2C; + unsigned char SR2B, SR2C; unsigned short CLOCK; } XGI330_VCLKDataStruct; typedef struct _XGI301C_Tap4TimingStruct { unsigned short DE; - UCHAR Reg[64]; /* C0-FF */ + unsigned char Reg[64]; /* C0-FF */ } XGI301C_Tap4TimingStruct; typedef struct _XGI_New_StandTableStruct { - UCHAR CRT_COLS; - UCHAR ROWS; - UCHAR CHAR_HEIGHT; + unsigned char CRT_COLS; + unsigned char ROWS; + unsigned char CHAR_HEIGHT; unsigned short CRT_LEN; - UCHAR SR[4]; - UCHAR MISC; - UCHAR CRTC[0x19]; - UCHAR ATTR[0x14]; - UCHAR GRC[9]; + unsigned char SR[4]; + unsigned char MISC; + unsigned char CRTC[0x19]; + unsigned char ATTR[0x14]; + unsigned char GRC[9]; } XGI_New_StandTableStruct; -typedef UCHAR DRAM8Type[8]; -typedef UCHAR DRAM4Type[4]; -typedef UCHAR DRAM32Type[32]; -typedef UCHAR DRAM2Type[2]; +typedef unsigned char DRAM8Type[8]; +typedef unsigned char DRAM4Type[4]; +typedef unsigned char DRAM32Type[32]; +typedef unsigned char DRAM2Type[2]; typedef struct _VB_DEVICE_INFO VB_DEVICE_INFO; typedef VB_DEVICE_INFO * PVB_DEVICE_INFO; @@ -427,8 +427,8 @@ struct _VB_DEVICE_INFO DRAM8Type *SR15; /* pointer : point to array */ DRAM8Type *CR40; - UCHAR *pSoftSetting; - UCHAR *pOutputSelect; + unsigned char *pSoftSetting; + unsigned char *pOutputSelect; unsigned short *pRGBSenseData; unsigned short *pRGBSenseData2; /*301b*/ @@ -437,62 +437,62 @@ struct _VB_DEVICE_INFO unsigned short *pYCSenseData; unsigned short *pYCSenseData2; - UCHAR *pSR07; - UCHAR *CR49; - UCHAR *pSR1F; - UCHAR *AGPReg; - UCHAR *SR16; - UCHAR *pSR21; - UCHAR *pSR22; - UCHAR *pSR23; - UCHAR *pSR24; - UCHAR *SR25; - UCHAR *pSR31; - UCHAR *pSR32; - UCHAR *pSR33; - UCHAR *pSR36; /* alan 12/07/2006 */ - UCHAR *pCRCF; - UCHAR *pCRD0; /* alan 12/07/2006 */ - UCHAR *pCRDE; /* alan 12/07/2006 */ - UCHAR *pCR8F; /* alan 12/07/2006 */ - UCHAR *pSR40; /* alan 12/07/2006 */ - UCHAR *pSR41; /* alan 12/07/2006 */ - UCHAR *pDVOSetting; - UCHAR *pCR2E; - UCHAR *pCR2F; - UCHAR *pCR46; - UCHAR *pCR47; - UCHAR *pCRT2Data_1_2; - UCHAR *pCRT2Data_4_D; - UCHAR *pCRT2Data_4_E; - UCHAR *pCRT2Data_4_10; + unsigned char *pSR07; + unsigned char *CR49; + unsigned char *pSR1F; + unsigned char *AGPReg; + unsigned char *SR16; + unsigned char *pSR21; + unsigned char *pSR22; + unsigned char *pSR23; + unsigned char *pSR24; + unsigned char *SR25; + unsigned char *pSR31; + unsigned char *pSR32; + unsigned char *pSR33; + unsigned char *pSR36; /* alan 12/07/2006 */ + unsigned char *pCRCF; + unsigned char *pCRD0; /* alan 12/07/2006 */ + unsigned char *pCRDE; /* alan 12/07/2006 */ + unsigned char *pCR8F; /* alan 12/07/2006 */ + unsigned char *pSR40; /* alan 12/07/2006 */ + unsigned char *pSR41; /* alan 12/07/2006 */ + unsigned char *pDVOSetting; + unsigned char *pCR2E; + unsigned char *pCR2F; + unsigned char *pCR46; + unsigned char *pCR47; + unsigned char *pCRT2Data_1_2; + unsigned char *pCRT2Data_4_D; + unsigned char *pCRT2Data_4_E; + unsigned char *pCRT2Data_4_10; XGI_MCLKDataStruct *MCLKData; XGI_ECLKDataStruct *ECLKData; - UCHAR *XGI_TVDelayList; - UCHAR *XGI_TVDelayList2; - UCHAR *CHTVVCLKUNTSC; - UCHAR *CHTVVCLKONTSC; - UCHAR *CHTVVCLKUPAL; - UCHAR *CHTVVCLKOPAL; - UCHAR *NTSCTiming; - UCHAR *PALTiming; - UCHAR *HiTVExtTiming; - UCHAR *HiTVSt1Timing; - UCHAR *HiTVSt2Timing; - UCHAR *HiTVTextTiming; - UCHAR *YPbPr750pTiming; - UCHAR *YPbPr525pTiming; - UCHAR *YPbPr525iTiming; - UCHAR *HiTVGroup3Data; - UCHAR *HiTVGroup3Simu; - UCHAR *HiTVGroup3Text; - UCHAR *Ren525pGroup3; - UCHAR *Ren750pGroup3; - UCHAR *ScreenOffset; - UCHAR *pXGINew_DRAMTypeDefinition; - UCHAR *pXGINew_I2CDefinition ; - UCHAR *pXGINew_CR97 ; + unsigned char *XGI_TVDelayList; + unsigned char *XGI_TVDelayList2; + unsigned char *CHTVVCLKUNTSC; + unsigned char *CHTVVCLKONTSC; + unsigned char *CHTVVCLKUPAL; + unsigned char *CHTVVCLKOPAL; + unsigned char *NTSCTiming; + unsigned char *PALTiming; + unsigned char *HiTVExtTiming; + unsigned char *HiTVSt1Timing; + unsigned char *HiTVSt2Timing; + unsigned char *HiTVTextTiming; + unsigned char *YPbPr750pTiming; + unsigned char *YPbPr525pTiming; + unsigned char *YPbPr525iTiming; + unsigned char *HiTVGroup3Data; + unsigned char *HiTVGroup3Simu; + unsigned char *HiTVGroup3Text; + unsigned char *Ren525pGroup3; + unsigned char *Ren750pGroup3; + unsigned char *ScreenOffset; + unsigned char *pXGINew_DRAMTypeDefinition; + unsigned char *pXGINew_I2CDefinition ; + unsigned char *pXGINew_CR97 ; XGI330_LCDCapStruct *LCDCapList; XGI21_LVDSCapStruct *XG21_LVDSCapList; @@ -525,8 +525,8 @@ typedef struct unsigned short Vertical_SYNC; unsigned short Vertical_BP; double DCLK; - UCHAR FrameRate; - UCHAR Interlace; + unsigned char FrameRate; + unsigned char Interlace; unsigned short Margin; } TimingInfo; diff --git a/drivers/staging/xgifb/vb_table.h b/drivers/staging/xgifb/vb_table.h index 5e06afe368b0..5f394d065764 100644 --- a/drivers/staging/xgifb/vb_table.h +++ b/drivers/staging/xgifb/vb_table.h @@ -63,14 +63,14 @@ XGI_ECLKDataStruct XGI340_ECLKData[]= -UCHAR XGI340_SR13[4][8]={ +unsigned char XGI340_SR13[4][8] = { {0x35,0x45,0xb1,0x00,0x00,0x00,0x00,0x00},/* SR13 */ {0x41,0x51,0x5c,0x00,0x00,0x00,0x00,0x00},/* SR14 */ {0x31,0x42,0x42,0x00,0x00,0x00,0x00,0x00},/* SR18 */ {0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00}/* SR1B */ }; -UCHAR XGI340_cr41[24][8]= +unsigned char XGI340_cr41[24][8] = {{0x20,0x50,0x60,0x00,0x00,0x00,0x00,0x00},/* 0 CR41 */ {0xc4,0x40,0x84,0x00,0x00,0x00,0x00,0x00},/* 1 CR8A */ {0xc4,0x40,0x84,0x00,0x00,0x00,0x00,0x00},/* 2 CR8B */ @@ -98,7 +98,7 @@ UCHAR XGI340_cr41[24][8]= }; -UCHAR XGI27_cr41[24][8]= +unsigned char XGI27_cr41[24][8] = { {0x20,0x40,0x60,0x00,0x00,0x00,0x00,0x00},/* 0 CR41 */ {0xC4,0x40,0x84,0x00,0x00,0x00,0x00,0x00},/* 1 CR8A */ @@ -126,7 +126,7 @@ UCHAR XGI27_cr41[24][8]= {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}/* 23 CRC5 */ }; -UCHAR XGI340_CR6B[8][4]={ +unsigned char XGI340_CR6B[8][4] = { {0xaa,0xaa,0xaa,0xaa}, {0xaa,0xaa,0xaa,0xaa}, {0xaa,0xaa,0xaa,0xaa}, @@ -137,7 +137,7 @@ UCHAR XGI340_CR6B[8][4]={ {0x00,0x00,0x00,0x00} }; -UCHAR XGI340_CR6E[8][4]={ +unsigned char XGI340_CR6E[8][4] = { {0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00}, @@ -148,7 +148,7 @@ UCHAR XGI340_CR6E[8][4]={ {0x00,0x00,0x00,0x00} }; -UCHAR XGI340_CR6F[8][32]={ +unsigned char XGI340_CR6F[8][32] = { {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, @@ -159,7 +159,7 @@ UCHAR XGI340_CR6F[8][32]={ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} }; -UCHAR XGI340_CR89[8][2]={ +unsigned char XGI340_CR89[8][2] = { {0x00,0x00}, {0x00,0x00}, {0x00,0x00}, @@ -170,11 +170,12 @@ UCHAR XGI340_CR89[8][2]={ {0x00,0x00} }; /* CR47,CR48,CR49,CR4A,CR4B,CR4C,CR70,CR71,CR74,CR75,CR76,CR77 */ -UCHAR XGI340_AGPReg[12]={0x28,0x23,0x00,0x20,0x00,0x20,0x00,0x05,0xd0,0x10,0x10,0x00}; +unsigned char XGI340_AGPReg[12] = {0x28, 0x23, 0x00, 0x20, 0x00, 0x20, 0x00, + 0x05, 0xd0, 0x10, 0x10, 0x00}; -UCHAR XGI340_SR16[4]={0x03,0x83,0x03,0x83}; +unsigned char XGI340_SR16[4] = {0x03, 0x83, 0x03, 0x83}; -UCHAR XGI330_SR15_1[8][8]={ +unsigned char XGI330_SR15_1[8][8] = { {0x0,0x0,0x00,0x00,0x20,0x20,0x00,0x00}, {0x5,0x15,0x15,0x15,0x15,0x15,0x00,0x00}, {0xba,0xba,0xba,0xba,0xBA,0xBA,0x00,0x00}, @@ -185,7 +186,7 @@ UCHAR XGI330_SR15_1[8][8]={ {0x0,0xa5,0xfb,0xf6,0xF6,0xF6,0x00,0x00} }; -UCHAR XGI330_cr40_1[15][8]={ +unsigned char XGI330_cr40_1[15][8] = { {0x66,0x40,0x40,0x28,0x24,0x24,0x00,0x00}, {0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, @@ -203,12 +204,12 @@ UCHAR XGI330_cr40_1[15][8]={ {0x00,0xA2,0x00,0x00,0xA2,0xA2,0x00,0x00}, }; -UCHAR XGI330_sr25[]={0x00,0x0}; -UCHAR XGI330_sr31=0xc0; -UCHAR XGI330_sr32=0x11; -UCHAR XGI330_SR33=0x00; -UCHAR XG40_CRCF=0x13; -UCHAR XG40_DRAMTypeDefinition=0xFF ; +unsigned char XGI330_sr25[] = {0x00, 0x0}; +unsigned char XGI330_sr31 = 0xc0; +unsigned char XGI330_sr32 = 0x11; +unsigned char XGI330_SR33 = 0x00; +unsigned char XG40_CRCF = 0x13; +unsigned char XG40_DRAMTypeDefinition = 0xFF ; XGI_StStruct XGI330_SModeIDTable[]= { @@ -964,10 +965,10 @@ XGI330_CHTVRegDataStruct XGI_CHTVRegOPAL[]={ {{ 0xE4,0x7F,0xB7,0x1E,0xAF,0x29,0x37,0x5A,0x05,0x00,0x80,0x25,0x8C,0xB2,0x2A,0x00 }}/* 06 (1024x768) ;;1/12/02 */ }; -UCHAR XGI_CH7017LV1024x768[]={0x60,0x02,0x00,0x07,0x40,0xED,0xA3, - 0xC8,0xC7,0xAC,0xE0,0x02}; -UCHAR XGI_CH7017LV1400x1050[]={0x60,0x03,0x11,0x00,0x40,0xE3,0xAD, - 0xDB,0xF6,0xAC,0xE0,0x02}; +unsigned char XGI_CH7017LV1024x768[] = {0x60, 0x02, 0x00, 0x07, 0x40, 0xED, 0xA3, + 0xC8, 0xC7, 0xAC, 0xE0, 0x02}; +unsigned char XGI_CH7017LV1400x1050[] = {0x60, 0x03, 0x11, 0x00, 0x40, 0xE3, 0xAD, + 0xDB, 0xF6, 0xAC, 0xE0, 0x02}; /*add for new UNIVGABIOS*/ @@ -1754,7 +1755,7 @@ XGI330_TVDataStruct XGI_StYPbPr750pData[]= { 1, 1,1650, 750,1280, 480, 0, 0, 760}, }; -UCHAR XGI330_NTSCTiming[] = { +unsigned char XGI330_NTSCTiming[] = { 0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c, 0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a, 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x1b, @@ -1764,7 +1765,7 @@ UCHAR XGI330_NTSCTiming[] = { 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x50, 0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00}; -UCHAR XGI330_PALTiming[] = { +unsigned char XGI330_PALTiming[] = { 0x21,0x5A,0x35,0x6e,0x04,0x38,0x3d,0x70, 0x94,0x49,0x01,0x12,0x06,0x3e,0x35,0x6d, 0x06,0x14,0x3e,0x35,0x6d,0x00,0x45,0x2b, @@ -1774,7 +1775,7 @@ UCHAR XGI330_PALTiming[] = { 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x63, 0x00,0x40,0x3e,0x00,0xe1,0x02,0x28,0x00}; -UCHAR XGI330_HiTVExtTiming[] = +unsigned char XGI330_HiTVExtTiming[] = { 0x2D,0x60,0x2C,0x5F,0x08,0x31,0x3A,0x64, 0x28,0x02,0x01,0x3D,0x06,0x3E,0x35,0x6D, @@ -1788,7 +1789,7 @@ UCHAR XGI330_HiTVExtTiming[] = }; -UCHAR XGI330_HiTVSt1Timing[] = +unsigned char XGI330_HiTVSt1Timing[] = { 0x32,0x65,0x2C,0x5F,0x08,0x31,0x3A,0x65, 0x28,0x02,0x01,0x3D,0x06,0x3E,0x35,0x6D, @@ -1801,7 +1802,7 @@ UCHAR XGI330_HiTVSt1Timing[] = 0x0E,0x00,0xfc,0xff,0x2d,0x00 }; -UCHAR XGI330_HiTVSt2Timing[] = +unsigned char XGI330_HiTVSt2Timing[] = { 0x32,0x65,0x2C,0x5F,0x08,0x31,0x3A,0x64, 0x28,0x02,0x01,0x3D,0x06,0x3E,0x35,0x6D, @@ -1814,7 +1815,7 @@ UCHAR XGI330_HiTVSt2Timing[] = 0x27,0x00,0xFC,0xff,0x6a,0x00 }; -UCHAR XGI330_HiTVTextTiming[] = +unsigned char XGI330_HiTVTextTiming[] = { 0x32,0x65,0x2C,0x5F,0x08,0x31,0x3A,0x65, 0x28,0x02,0x01,0x3D,0x06,0x3E,0x35,0x6D, @@ -1827,7 +1828,7 @@ UCHAR XGI330_HiTVTextTiming[] = 0x11,0x00,0xFC,0xFF,0x32,0x00 }; -UCHAR XGI330_YPbPr750pTiming[] = +unsigned char XGI330_YPbPr750pTiming[] = { 0x30,0x1d,0xe8,0x09,0x09,0xed,0x0c,0x0c, 0x98,0x0a,0x01,0x0c,0x06,0x0d,0x04,0x0a, @@ -1840,7 +1841,7 @@ UCHAR XGI330_YPbPr750pTiming[] = 0x11,0x00,0xfc,0xff,0x32,0x00 }; -UCHAR XGI330_YPbPr525pTiming[] = +unsigned char XGI330_YPbPr525pTiming[] = { 0x3E,0x11,0x06,0x09,0x0b,0x0c,0x0c,0x0c, 0x98,0x0a,0x01,0x0d,0x06,0x0d,0x04,0x0a, @@ -1853,7 +1854,7 @@ UCHAR XGI330_YPbPr525pTiming[] = 0x11,0x00,0xFC,0xFF,0x32,0x00 }; -UCHAR XGI330_YPbPr525iTiming[] = +unsigned char XGI330_YPbPr525iTiming[] = { 0x1B,0x21,0x03,0x09,0x05,0x06,0x0C,0x0C, 0x94,0x49,0x01,0x0A,0x06,0x0D,0x04,0x0A, @@ -1867,7 +1868,7 @@ UCHAR XGI330_YPbPr525iTiming[] = }; -UCHAR XGI330_HiTVGroup3Data[] = +unsigned char XGI330_HiTVGroup3Data[] = { 0x00,0x1A,0x22,0x63,0x62,0x22,0x08,0x5F, 0x05,0x21,0xB2,0xB2,0x55,0x77,0x2A,0xA6, @@ -1879,7 +1880,7 @@ UCHAR XGI330_HiTVGroup3Data[] = 0x18,0x05,0x18,0x05,0x4C,0xA8,0x01 }; -UCHAR XGI330_HiTVGroup3Simu[] = +unsigned char XGI330_HiTVGroup3Simu[] = { 0x00,0x1A,0x22,0x63,0x62,0x22,0x08,0x95, 0xDB,0x20,0xB8,0xB8,0x55,0x47,0x2A,0xA6, @@ -1891,7 +1892,7 @@ UCHAR XGI330_HiTVGroup3Simu[] = 0x18,0x05,0x18,0x05,0x4C,0xA8,0x01 }; -UCHAR XGI330_HiTVGroup3Text[] = +unsigned char XGI330_HiTVGroup3Text[] = { 0x00,0x1A,0x22,0x63,0x62,0x22,0x08,0xA7, 0xF5,0x20,0xCE,0xCE,0x55,0x47,0x2A,0xA6, @@ -1903,7 +1904,7 @@ UCHAR XGI330_HiTVGroup3Text[] = 0x18,0x05,0x18,0x05,0x4C,0xA8,0x01 }; -UCHAR XGI330_Ren525pGroup3[] = +unsigned char XGI330_Ren525pGroup3[] = { 0x00,0x14,0x15,0x25,0x55,0x15,0x0b,0x13, 0xB1,0x41,0x62,0x62,0xFF,0xF4,0x45,0xa6, @@ -1915,7 +1916,7 @@ UCHAR XGI330_Ren525pGroup3[] = 0x1a,0x1F,0x25,0x2a,0x4C,0xAA,0x01 }; -UCHAR XGI330_Ren750pGroup3[] = +unsigned char XGI330_Ren750pGroup3[] = { 0x00,0x14,0x15,0x25,0x55,0x15,0x0b,0x7a, 0x54,0x41,0xE7,0xE7,0xFF,0xF4,0x45,0xa6, @@ -3392,7 +3393,9 @@ XGI_VBVCLKDataStruct XGI330_VBVCLKData[]= { 0x70,0x44,108}, /* 0x49 chiawen for 1400x1050*/ }; -UCHAR XGI330_ScreenOffset[]={ 0x14,0x19,0x20,0x28,0x32,0x40,0x50,0x64,0x78,0x80,0x2d,0x35,0x57,0x48 }; +unsigned char XGI330_ScreenOffset[] = { 0x14, 0x19, 0x20, 0x28, 0x32, 0x40, + 0x50, 0x64, 0x78, 0x80, 0x2d, 0x35, + 0x57, 0x48}; XGI_StResInfoStruct XGI330_StResInfo[]= { @@ -3430,10 +3433,10 @@ XGI_ModeResInfoStruct XGI330_ModeResInfo[]= { 1152, 864, 8,16} }; -UCHAR XGI330_OutputSelect =0x40; -UCHAR XGI330_SoftSetting = 0x30; -UCHAR XGI330_SR07=0x18; -UCHAR XGI330New_SR15[8][8]={ +unsigned char XGI330_OutputSelect = 0x40; +unsigned char XGI330_SoftSetting = 0x30; +unsigned char XGI330_SR07 = 0x18; +unsigned char XGI330New_SR15[8][8] = { {0x0,0x4,0x60,0x60}, {0xf,0xf,0xf,0xf}, {0xba,0xba,0xba,0xba}, @@ -3444,7 +3447,7 @@ UCHAR XGI330New_SR15[8][8]={ {0x0,0xa5,0xfb,0xf6} }; -UCHAR XGI330New_CR40[5][8]={ +unsigned char XGI330New_CR40[5][8] = { {0x77,0x77,0x44,0x44}, {0x77,0x77,0x44,0x44}, {0x0,0x0,0x0,0x0}, @@ -3452,63 +3455,63 @@ UCHAR XGI330New_CR40[5][8]={ {0x0,0x0,0xf0,0xf8} }; -UCHAR XGI330_CR49[]={0xaa,0x88}; -UCHAR XGI330_SR1F=0x0; -UCHAR XGI330_SR21=0xa3; -UCHAR XGI330_650_SR21=0xa7; -UCHAR XGI330_SR22=0xfb; -UCHAR XGI330_SR23=0xf6; -UCHAR XGI330_SR24=0xd; - -UCHAR XGI660_SR21=0xa3;/* 2003.0312 */ -UCHAR XGI660_SR22=0xf3;/* 2003.0312 */ - -UCHAR XGI330_LVDS_SR32=0x00; /* ynlai for 650 LVDS */ -UCHAR XGI330_LVDS_SR33=0x00; /* chiawen for 650 LVDS */ -UCHAR XGI330_650_SR31=0x40; -UCHAR XGI330_650_SR33=0x04; -UCHAR XGI330_CRT2Data_1_2 = 0x0; -UCHAR XGI330_CRT2Data_4_D = 0x0; -UCHAR XGI330_CRT2Data_4_E = 0x0; -UCHAR XGI330_CRT2Data_4_10 = 0x80; +unsigned char XGI330_CR49[] = {0xaa, 0x88}; +unsigned char XGI330_SR1F = 0x0; +unsigned char XGI330_SR21 = 0xa3; +unsigned char XGI330_650_SR21 = 0xa7; +unsigned char XGI330_SR22 = 0xfb; +unsigned char XGI330_SR23 = 0xf6; +unsigned char XGI330_SR24 = 0xd; + +unsigned char XGI660_SR21 = 0xa3;/* 2003.0312 */ +unsigned char XGI660_SR22 = 0xf3;/* 2003.0312 */ + +unsigned char XGI330_LVDS_SR32 = 0x00; /* ynlai for 650 LVDS */ +unsigned char XGI330_LVDS_SR33 = 0x00; /* chiawen for 650 LVDS */ +unsigned char XGI330_650_SR31 = 0x40; +unsigned char XGI330_650_SR33 = 0x04; +unsigned char XGI330_CRT2Data_1_2 = 0x0; +unsigned char XGI330_CRT2Data_4_D = 0x0; +unsigned char XGI330_CRT2Data_4_E = 0x0; +unsigned char XGI330_CRT2Data_4_10 = 0x80; unsigned short XGI330_RGBSenseData = 0xd1; unsigned short XGI330_VideoSenseData = 0xb9; unsigned short XGI330_YCSenseData = 0xb3; unsigned short XGI330_RGBSenseData2 = 0x0190; /*301b*/ unsigned short XGI330_VideoSenseData2 = 0x0110; unsigned short XGI330_YCSenseData2 = 0x016B; -UCHAR XGI330_NTSCPhase[] = {0x21,0xed,0x8a,0x8}; -UCHAR XGI330_PALPhase[] = {0x2a,0x5,0xd3,0x0}; -UCHAR XGI330_NTSCPhase2[] = {0x21,0xF0,0x7B,0xD6};/*301b*/ -UCHAR XGI330_PALPhase2[] = {0x2a,0x09,0x86,0xe9}; -UCHAR XGI330_PALMPhase[] = {0x21,0xE4,0x2E,0x9B}; /*palmn*/ -UCHAR XGI330_PALNPhase[] = {0x21,0xF4,0x3E,0xBA}; -UCHAR XG40_I2CDefinition = 0x00 ; -UCHAR XG20_CR97 = 0x10 ; - -UCHAR XG21_DVOSetting = 0x00 ; -UCHAR XG21_CR2E = 0x00 ; -UCHAR XG21_CR2F = 0x00 ; -UCHAR XG21_CR46 = 0x00 ; -UCHAR XG21_CR47 = 0x00 ; - -UCHAR XG27_CR97 = 0xC1 ; -UCHAR XG27_SR36 = 0x30 ; -UCHAR XG27_CR8F = 0x0C ; -UCHAR XG27_CRD0[] = {0,0,0,0,0,0,0,0x82,0x00,0x66,0x01,0x00} ; -UCHAR XG27_CRDE[] = {0,0} ; -UCHAR XG27_SR40 = 0x04 ; -UCHAR XG27_SR41 = 0x00 ; - -UCHAR XGI330_CHTVVCLKUNTSC[]={0x00 }; - -UCHAR XGI330_CHTVVCLKONTSC[]={0x00 }; - -UCHAR XGI330_CHTVVCLKUPAL[]={0x00 }; - -UCHAR XGI330_CHTVVCLKOPAL[]={0x00 }; - -UCHAR XGI7007_CHTVVCLKUNTSC[]={CH7007TVVCLK30_2, +unsigned char XGI330_NTSCPhase[] = {0x21, 0xed, 0x8a, 0x8}; +unsigned char XGI330_PALPhase[] = {0x2a, 0x5, 0xd3, 0x0}; +unsigned char XGI330_NTSCPhase2[] = {0x21, 0xF0, 0x7B, 0xD6};/*301b*/ +unsigned char XGI330_PALPhase2[] = {0x2a, 0x09, 0x86, 0xe9}; +unsigned char XGI330_PALMPhase[] = {0x21, 0xE4, 0x2E, 0x9B}; /*palmn*/ +unsigned char XGI330_PALNPhase[] = {0x21, 0xF4, 0x3E, 0xBA}; +unsigned char XG40_I2CDefinition = 0x00 ; +unsigned char XG20_CR97 = 0x10 ; + +unsigned char XG21_DVOSetting = 0x00 ; +unsigned char XG21_CR2E = 0x00 ; +unsigned char XG21_CR2F = 0x00 ; +unsigned char XG21_CR46 = 0x00 ; +unsigned char XG21_CR47 = 0x00 ; + +unsigned char XG27_CR97 = 0xC1 ; +unsigned char XG27_SR36 = 0x30 ; +unsigned char XG27_CR8F = 0x0C ; +unsigned char XG27_CRD0[] = {0, 0, 0, 0, 0, 0, 0, 0x82, 0x00, 0x66, 0x01, 0x00}; +unsigned char XG27_CRDE[] = {0, 0}; +unsigned char XG27_SR40 = 0x04 ; +unsigned char XG27_SR41 = 0x00 ; + +unsigned char XGI330_CHTVVCLKUNTSC[] = {0x00}; + +unsigned char XGI330_CHTVVCLKONTSC[] = {0x00}; + +unsigned char XGI330_CHTVVCLKUPAL[] = {0x00}; + +unsigned char XGI330_CHTVVCLKOPAL[] = {0x00}; + +unsigned char XGI7007_CHTVVCLKUNTSC[] = {CH7007TVVCLK30_2, CH7007TVVCLK30_2, CH7007TVVCLK30_2, CH7007TVVCLK30_2, @@ -3516,7 +3519,7 @@ UCHAR XGI7007_CHTVVCLKUNTSC[]={CH7007TVVCLK30_2, CH7007TVVCLK47_8 }; -UCHAR XGI7007_CHTVVCLKONTSC[]={CH7007TVVCLK26_4, +unsigned char XGI7007_CHTVVCLKONTSC[] = {CH7007TVVCLK26_4, CH7007TVVCLK26_4, CH7007TVVCLK26_4, CH7007TVVCLK26_4, @@ -3524,7 +3527,7 @@ UCHAR XGI7007_CHTVVCLKONTSC[]={CH7007TVVCLK26_4, CH7007TVVCLK43_6 }; -UCHAR XGI7007_CHTVVCLKUPAL[]={CH7007TVVCLK31_5, +unsigned char XGI7007_CHTVVCLKUPAL[] = {CH7007TVVCLK31_5, CH7007TVVCLK31_5, CH7007TVVCLK31_5, CH7007TVVCLK31_5, @@ -3532,7 +3535,7 @@ UCHAR XGI7007_CHTVVCLKUPAL[]={CH7007TVVCLK31_5, CH7007TVVCLK39 }; -UCHAR XGI7007_CHTVVCLKOPAL[]={CH7007TVVCLK31_5, +unsigned char XGI7007_CHTVVCLKOPAL[] = {CH7007TVVCLK31_5, CH7007TVVCLK31_5, CH7007TVVCLK31_5, CH7007TVVCLK31_5, @@ -3957,7 +3960,7 @@ XGI330_VCLKDataStruct XGI_VBVCLKData[]= { 0xFF,0x00,0 } /* End mark */ }; -UCHAR XGI660_TVDelayList[]= +unsigned char XGI660_TVDelayList[] = { 0x44, /* ; 0 ExtNTSCDelay */ 0x44, /* ; 1 StNTSCDelay */ @@ -3973,7 +3976,7 @@ UCHAR XGI660_TVDelayList[]= 0x44 /* ; B StYPbPrDealy(750p) */ }; -UCHAR XGI660_TVDelayList2[]= +unsigned char XGI660_TVDelayList2[] = { 0x44, /* ; 0 ExtNTSCDelay */ 0x44, /* ; 1 StNTSCDelay */ @@ -3989,7 +3992,7 @@ UCHAR XGI660_TVDelayList2[]= 0x44 /* ; B StYPbPrDealy(750p) */ }; -UCHAR XGI301TVDelayList[]= +unsigned char XGI301TVDelayList[] = { 0x22, /* ; 0 ExtNTSCDelay */ 0x22, /* ; 1 StNTSCDelay */ @@ -4005,7 +4008,7 @@ UCHAR XGI301TVDelayList[]= 0x22 /* B StYPbPrDealy(750p) */ }; -UCHAR XGI301TVDelayList2[]= +unsigned char XGI301TVDelayList2[] = { 0x22, /* ; 0 ExtNTSCDelay */ 0x22, /* ; 1 StNTSCDelay */ @@ -4022,7 +4025,7 @@ UCHAR XGI301TVDelayList2[]= }; -UCHAR TVAntiFlickList[]= +unsigned char TVAntiFlickList[] = {/* NTSCAntiFlicker */ 0x04, /* ; 0 Adaptive */ 0x00, /* ; 1 new anti-flicker ? */ @@ -4035,7 +4038,7 @@ UCHAR TVAntiFlickList[]= }; -UCHAR TVEdgeList[]= +unsigned char TVEdgeList[] = { 0x00, /* ; 0 NTSC No Edge enhance */ 0x04, /* ; 1 NTSC Adaptive Edge enhance */ @@ -4062,7 +4065,7 @@ unsigned long TVPhaseList[]= 0xE00A831E /* ; D PAL-M 1024x768 */ }; -UCHAR NTSCYFilter1[]= +unsigned char NTSCYFilter1[] = { 0x00,0xF4,0x10,0x38 ,/* 0 : 320x text mode */ 0x00,0xF4,0x10,0x38 ,/* 1 : 360x text mode */ @@ -4073,7 +4076,7 @@ UCHAR NTSCYFilter1[]= 0xEB,0x15,0x25,0xF6 /* 6 : 800x gra. mode */ }; -UCHAR PALYFilter1[]= +unsigned char PALYFilter1[] = { 0x00,0xF4,0x10,0x38, /* 0 : 320x text mode */ 0x00,0xF4,0x10,0x38 ,/* 1 : 360x text mode */ @@ -4084,7 +4087,7 @@ UCHAR PALYFilter1[]= 0xFC,0xFB,0x14,0x2A /* 6 : 800x gra. mode */ }; -UCHAR PALMYFilter1[]= +unsigned char PALMYFilter1[] = { 0x00,0xF4,0x10,0x38, /* 0 : 320x text mode */ 0x00,0xF4,0x10,0x38, /* 1 : 360x text mode */ @@ -4096,7 +4099,7 @@ UCHAR PALMYFilter1[]= 0xFF,0xFF,0xFF,0xFF /* End of Table */ }; -UCHAR PALNYFilter1[]= +unsigned char PALNYFilter1[] = { 0x00,0xF4,0x10,0x38, /* 0 : 320x text mode */ 0x00,0xF4,0x10,0x38, /* 1 : 360x text mode */ @@ -4108,7 +4111,7 @@ UCHAR PALNYFilter1[]= 0xFF,0xFF,0xFF,0xFF /* End of Table */ }; -UCHAR NTSCYFilter2[]= +unsigned char NTSCYFilter2[] = { 0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 0 : 320x text mode */ 0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C, /* 1 : 360x text mode */ @@ -4120,7 +4123,7 @@ UCHAR NTSCYFilter2[]= 0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28 /* 7 : 1024xgra. mode */ }; -UCHAR PALYFilter2[]= +unsigned char PALYFilter2[] = { 0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 0 : 320x text mode */ 0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C, /* 1 : 360x text mode */ @@ -4132,7 +4135,7 @@ UCHAR PALYFilter2[]= 0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28 /* 7 : 1024xgra. mode */ }; -UCHAR PALMYFilter2[]= +unsigned char PALMYFilter2[] = { 0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 0 : 320x text mode */ 0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C, /* 1 : 360x text mode */ @@ -4144,7 +4147,7 @@ UCHAR PALMYFilter2[]= 0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28 /* 7 : 1024xgra. mode */ }; -UCHAR PALNYFilter2[]= +unsigned char PALNYFilter2[] = { 0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46, /* 0 : 320x text mode */ 0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C, /* 1 : 360x text mode */ @@ -4156,7 +4159,7 @@ UCHAR PALNYFilter2[]= 0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28 /* 7 : 1024xgra. mode */ }; -UCHAR XGI_NTSC1024AdjTime[]= +unsigned char XGI_NTSC1024AdjTime[] = { 0xa7,0x07,0xf2,0x6e,0x17,0x8b,0x73,0x53, 0x13,0x40,0x34,0xF4,0x63,0xBB,0xCC,0x7A, diff --git a/drivers/staging/xgifb/vb_util.c b/drivers/staging/xgifb/vb_util.c index 5e32afda28c2..2c40368ceee2 100644 --- a/drivers/staging/xgifb/vb_util.c +++ b/drivers/staging/xgifb/vb_util.c @@ -10,8 +10,8 @@ void XGINew_SetReg1(unsigned long,unsigned short,unsigned short); void XGINew_SetReg2(unsigned long,unsigned short,unsigned short); void XGINew_SetReg3(unsigned long,unsigned short); void XGINew_SetReg4(unsigned long,unsigned long); -UCHAR XGINew_GetReg1(unsigned long,unsigned short); -UCHAR XGINew_GetReg2(unsigned long); +unsigned char XGINew_GetReg1(unsigned long, unsigned short); +unsigned char XGINew_GetReg2(unsigned long); unsigned long XGINew_GetReg3(unsigned long); void XGINew_ClearDAC(unsigned char *); void XGINew_SetRegANDOR(unsigned long Port,unsigned short Index, @@ -43,7 +43,7 @@ void XGINew_SetReg1( unsigned long port , unsigned short index , unsigned short /* --------------------------------------------------------------------- */ /*void XGINew_SetReg2( unsigned long port , unsigned short index , unsigned short data ) { - InPortByte( ( PUCHAR )port + 0x3da - 0x3c0 ) ; + InPortByte((P unsigned char )port + 0x3da - 0x3c0) ; OutPortByte( XGINew_P3c0 , index ) ; OutPortByte( XGINew_P3c0 , data ) ; OutPortByte( XGINew_P3c0 , 0x20 ) ; @@ -80,9 +80,9 @@ void XGINew_SetReg4( unsigned long port , unsigned long data ) /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -UCHAR XGINew_GetReg1( unsigned long port , unsigned short index ) +unsigned char XGINew_GetReg1(unsigned long port, unsigned short index) { - UCHAR data ; + unsigned char data ; outb(index, port); data = inb(port + 1) ; @@ -96,9 +96,9 @@ UCHAR XGINew_GetReg1( unsigned long port , unsigned short index ) /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -UCHAR XGINew_GetReg2( unsigned long port ) +unsigned char XGINew_GetReg2(unsigned long port) { - UCHAR data ; + unsigned char data ; data = inb(port) ; @@ -197,7 +197,7 @@ void NewDelaySeconds( int seconds ) /* Output : */ /* Description : */ /* --------------------------------------------------------------------- */ -void Newdebugcode( UCHAR code ) +void Newdebugcode(unsigned char code) { // OutPortByte ( 0x80 , code ) ; /* OutPortByte ( 0x300 , code ) ; */ diff --git a/drivers/staging/xgifb/vb_util.h b/drivers/staging/xgifb/vb_util.h index aaaf361477ab..156f6445c88d 100644 --- a/drivers/staging/xgifb/vb_util.h +++ b/drivers/staging/xgifb/vb_util.h @@ -1,11 +1,11 @@ #ifndef _VBUTIL_ #define _VBUTIL_ extern void NewDelaySeconds( int ); -extern void Newdebugcode( UCHAR ); +extern void Newdebugcode(unsigned char); extern void XGINew_SetReg1(unsigned long, unsigned short, unsigned short); extern void XGINew_SetReg3(unsigned long, unsigned short); -extern UCHAR XGINew_GetReg1(unsigned long, unsigned short); -extern UCHAR XGINew_GetReg2(unsigned long); +extern unsigned char XGINew_GetReg1(unsigned long, unsigned short); +extern unsigned char XGINew_GetReg2(unsigned long); extern void XGINew_SetReg4(unsigned long, unsigned long); extern unsigned long XGINew_GetReg3(unsigned long); extern void XGINew_SetRegOR(unsigned long Port,unsigned short Index,unsigned short DataOR); diff --git a/drivers/staging/xgifb/vgatypes.h b/drivers/staging/xgifb/vgatypes.h index a85f21a7aebc..a518d27c0d11 100644 --- a/drivers/staging/xgifb/vgatypes.h +++ b/drivers/staging/xgifb/vgatypes.h @@ -4,25 +4,6 @@ #include -#ifndef CHAR -typedef char CHAR; -#endif - -#ifndef SHORT -typedef short SHORT; -#endif - -#ifndef LONG -typedef long LONG; -#endif - -#ifndef UCHAR -typedef unsigned char UCHAR; -#endif - -typedef unsigned long XGIIOADDRESS; - - #ifndef VBIOS_VER_MAX_LENGTH #define VBIOS_VER_MAX_LENGTH 4 #endif @@ -74,8 +55,8 @@ typedef enum _XGI_LCD_TYPE { #ifndef PXGI_DSReg typedef struct _XGI_DSReg { - UCHAR jIdx; - UCHAR jVal; + unsigned char jIdx; + unsigned char jVal; } XGI_DSReg, *PXGI_DSReg; #endif @@ -109,13 +90,13 @@ struct _XGI_HW_DEVICE_INFO unsigned long ul2ndVideoMemorySize; unsigned char *pj2ndIOAddress; - UCHAR jChipType; /* Used to Identify Graphics Chip */ + unsigned char jChipType; /* Used to Identify Graphics Chip */ /* defined in the data structure type */ /* "XGI_CHIP_TYPE" */ - UCHAR jChipRevision; /* Used to Identify Graphics Chip Revision */ + unsigned char jChipRevision; /* Used to Identify Graphics Chip Revision */ - UCHAR ujVBChipID; /* the ID of video bridge */ + unsigned char ujVBChipID; /* the ID of video bridge */ /* defined in the data structure type */ /* "XGI_VB_CHIP_TYPE" */ @@ -152,7 +133,7 @@ struct _XGI_HW_DEVICE_INFO PXGI_QUERYSPACE pQueryNorthBridgeSpace; - UCHAR szVBIOSVer[VBIOS_VER_MAX_LENGTH]; + unsigned char szVBIOSVer[VBIOS_VER_MAX_LENGTH]; }; #endif -- 2.34.1