Staging: xgifb: Remove defines for TRUE, FALSE, and NULL
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Arnaud Patard <apatard@mandriva.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
1e59f7119f
commit
dda08c5968
@ -440,10 +440,10 @@ XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
|
||||
DPRINTK("XGIfb: Set offset 0x%lx to 0x%lx\n", offset, *value);
|
||||
|
||||
if (!init) {
|
||||
init = TRUE;
|
||||
init = 1;
|
||||
pdev = pci_get_device(PCI_VENDOR_ID_XG, xgi_video_info.chip_id, pdev);
|
||||
if (pdev) {
|
||||
valid_pdev = TRUE;
|
||||
valid_pdev = 1;
|
||||
pci_dev_put(pdev);
|
||||
}
|
||||
}
|
||||
@ -451,7 +451,7 @@ XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
|
||||
if (!valid_pdev) {
|
||||
printk(KERN_DEBUG "XGIfb: Can't find XGI %d VGA device.\n",
|
||||
xgi_video_info.chip_id);
|
||||
return FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (set == 0)
|
||||
@ -459,7 +459,7 @@ XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
|
||||
else
|
||||
pci_write_config_dword(pdev, offset, (u32)(*value));
|
||||
|
||||
return TRUE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*BOOLEAN XGIfb_query_north_bridge_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
|
||||
@ -470,7 +470,7 @@ XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
|
||||
u16 nbridge_id = 0;
|
||||
|
||||
if (!init) {
|
||||
init = TRUE;
|
||||
init = 1;
|
||||
switch (xgi_video_info.chip) {
|
||||
case XGI_540:
|
||||
nbridge_id = PCI_DEVICE_ID_XG_540;
|
||||
@ -497,13 +497,13 @@ XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
|
||||
|
||||
pdev = pci_find_device(PCI_VENDOR_ID_SI, nbridge_id, pdev);
|
||||
if (pdev)
|
||||
valid_pdev = TRUE;
|
||||
valid_pdev = 1;
|
||||
}
|
||||
|
||||
if (!valid_pdev) {
|
||||
printk(KERN_DEBUG "XGIfb: Can't find XGI %d North Bridge device.\n",
|
||||
nbridge_id);
|
||||
return FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (set == 0)
|
||||
@ -511,7 +511,7 @@ XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
|
||||
else
|
||||
pci_write_config_dword(pdev, offset, (u32)(*value));
|
||||
|
||||
return TRUE;
|
||||
return 1;
|
||||
}
|
||||
*/
|
||||
/* ------------------ Internal helper routines ----------------- */
|
||||
@ -953,14 +953,14 @@ static BOOLEAN XGIfb_bridgeisslave(void)
|
||||
{
|
||||
unsigned char usScratchP1_00;
|
||||
|
||||
if(xgi_video_info.hasVB == HASVB_NONE) return FALSE;
|
||||
if (xgi_video_info.hasVB == HASVB_NONE)
|
||||
return 0;
|
||||
|
||||
inXGIIDXREG(XGIPART1,0x00,usScratchP1_00);
|
||||
if( (usScratchP1_00 & 0x50) == 0x10) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
if ((usScratchP1_00 & 0x50) == 0x10)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static BOOLEAN XGIfbcheckvretracecrt1(void)
|
||||
@ -968,24 +968,30 @@ static BOOLEAN XGIfbcheckvretracecrt1(void)
|
||||
unsigned char temp;
|
||||
|
||||
inXGIIDXREG(XGICR,0x17,temp);
|
||||
if(!(temp & 0x80)) return FALSE;
|
||||
if (!(temp & 0x80))
|
||||
return 0;
|
||||
|
||||
|
||||
inXGIIDXREG(XGISR,0x1f,temp);
|
||||
if(temp & 0xc0) return FALSE;
|
||||
if (temp & 0xc0)
|
||||
return 0;
|
||||
|
||||
|
||||
if(inXGIREG(XGIINPSTAT) & 0x08) return TRUE;
|
||||
else return FALSE;
|
||||
if (inXGIREG(XGIINPSTAT) & 0x08)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static BOOLEAN XGIfbcheckvretracecrt2(void)
|
||||
{
|
||||
unsigned char temp;
|
||||
if(xgi_video_info.hasVB == HASVB_NONE) return FALSE;
|
||||
if (xgi_video_info.hasVB == HASVB_NONE)
|
||||
return 0;
|
||||
inXGIIDXREG(XGIPART1, 0x30, temp);
|
||||
if(temp & 0x02) return FALSE;
|
||||
else return TRUE;
|
||||
if (temp & 0x02)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
static BOOLEAN XGIfb_CheckVBRetrace(void)
|
||||
@ -1989,9 +1995,9 @@ static int XGIfb_has_VB(void)
|
||||
break;
|
||||
default:
|
||||
xgi_video_info.hasVB = HASVB_NONE;
|
||||
return FALSE;
|
||||
return 0;
|
||||
}
|
||||
return TRUE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@ -2645,7 +2651,7 @@ static void XGIfb_pre_setmode(void)
|
||||
static void XGIfb_post_setmode(void)
|
||||
{
|
||||
u8 reg;
|
||||
BOOLEAN doit = TRUE;
|
||||
BOOLEAN doit = 1;
|
||||
#if 0 /* TW: Wrong: Is not in MMIO space, but in RAM */
|
||||
/* Backup mode number to MMIO space */
|
||||
if(xgi_video_info.mmio_vbase) {
|
||||
@ -2659,11 +2665,11 @@ static void XGIfb_post_setmode(void)
|
||||
if (xgi_video_info.video_bpp == 8) {
|
||||
/* TW: We can't switch off CRT1 on LVDS/Chrontel in 8bpp Modes */
|
||||
if ((xgi_video_info.hasVB == HASVB_LVDS) || (xgi_video_info.hasVB == HASVB_LVDS_CHRONTEL)) {
|
||||
doit = FALSE;
|
||||
doit = 0;
|
||||
}
|
||||
/* TW: We can't switch off CRT1 on 301B-DH in 8bpp Modes if using LCD */
|
||||
if (xgi_video_info.disp_state & DISPTYPE_LCD) {
|
||||
doit = FALSE;
|
||||
doit = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2672,11 +2678,12 @@ static void XGIfb_post_setmode(void)
|
||||
inXGIIDXREG(XGIPART1, 0x00, reg);
|
||||
|
||||
|
||||
if((reg & 0x50) == 0x10) {
|
||||
doit = FALSE;
|
||||
}
|
||||
if ((reg & 0x50) == 0x10)
|
||||
doit = 0;
|
||||
|
||||
} else XGIfb_crt1off = 0;
|
||||
|
||||
} else
|
||||
XGIfb_crt1off = 0;
|
||||
|
||||
inXGIIDXREG(XGICR, 0x17, reg);
|
||||
if ((XGIfb_crt1off) && (doit))
|
||||
@ -3027,7 +3034,7 @@ int __devinit xgifb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
case XG20:
|
||||
case XG21:
|
||||
case XG27:
|
||||
XGIhw_ext.bIntegratedMMEnabled = TRUE;
|
||||
XGIhw_ext.bIntegratedMMEnabled = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -3316,14 +3323,14 @@ int __devinit xgifb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
inXGIIDXREG(XGICR,0x38,tmp);
|
||||
if((tmp & 0x03) == 0x03)
|
||||
{
|
||||
// XGI_Pr.XGI_UseLCDA = TRUE;
|
||||
/* XGI_Pr.XGI_UseLCDA = 1; */
|
||||
}else
|
||||
{
|
||||
// Currently on LCDA? (Some newer BIOSes set D0 in CR35)
|
||||
inXGIIDXREG(XGICR,0x35,tmp);
|
||||
if(tmp & 0x01)
|
||||
{
|
||||
// XGI_Pr.XGI_UseLCDA = TRUE;
|
||||
/* XGI_Pr.XGI_UseLCDA = 1; */
|
||||
}else
|
||||
{
|
||||
inXGIIDXREG(XGICR,0x30,tmp);
|
||||
@ -3332,7 +3339,7 @@ int __devinit xgifb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
inXGIIDXREG(XGIPART1,0x13,tmp);
|
||||
if(tmp & 0x04)
|
||||
{
|
||||
// XGI_Pr.XGI_UseLCDA = TRUE;
|
||||
/* XGI_Pr.XGI_UseLCDA = 1; */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -148,18 +148,16 @@ BOOLEAN XGIInitNew( PXGI_HW_DEVICE_INFO HwDeviceExtension )
|
||||
|
||||
|
||||
/* if ( pVBInfo->ROMAddr == 0 ) */
|
||||
/* return( FALSE ) ; */
|
||||
/* return( 0 ) ; */
|
||||
|
||||
if ( pVBInfo->FBAddr == 0 )
|
||||
{
|
||||
if (pVBInfo->FBAddr == 0) {
|
||||
printk("\n pVBInfo->FBAddr == 0 ");
|
||||
return( FALSE ) ;
|
||||
return 0;
|
||||
}
|
||||
printk("1");
|
||||
if ( pVBInfo->BaseAddr == 0 )
|
||||
{
|
||||
if (pVBInfo->BaseAddr == 0) {
|
||||
printk("\npVBInfo->BaseAddr == 0 ");
|
||||
return( FALSE ) ;
|
||||
return 0;
|
||||
}
|
||||
printk("2");
|
||||
|
||||
@ -169,9 +167,8 @@ printk("2");
|
||||
printk("3");
|
||||
|
||||
if ( !HwDeviceExtension->bIntegratedMMEnabled )
|
||||
{
|
||||
return( FALSE ) ; /* alan */
|
||||
}
|
||||
return 0; /* alan */
|
||||
|
||||
printk("4");
|
||||
|
||||
// VBIOSVersion[ 4 ] = 0x0 ;
|
||||
@ -422,8 +419,7 @@ printk("18");
|
||||
XGINew_SetReg1( pVBInfo->P3d4 , 0x83 , 0x00 ) ;
|
||||
printk("181");
|
||||
|
||||
if ( HwDeviceExtension->bSkipSense == FALSE )
|
||||
{
|
||||
if (HwDeviceExtension->bSkipSense == 0) {
|
||||
printk("182");
|
||||
|
||||
XGI_SenseCRT1(pVBInfo) ;
|
||||
@ -466,8 +462,7 @@ printk("19");
|
||||
|
||||
XGINew_SetDRAMDefaultRegister340( HwDeviceExtension , pVBInfo->P3d4, pVBInfo ) ;
|
||||
|
||||
if ( HwDeviceExtension->bSkipDramSizing == TRUE )
|
||||
{
|
||||
if (HwDeviceExtension->bSkipDramSizing == 1) {
|
||||
pSR = HwDeviceExtension->pSR ;
|
||||
if ( pSR!=NULL )
|
||||
{
|
||||
@ -547,7 +542,7 @@ XGINew_SetReg1( pVBInfo->P3d4 , 0x8c , 0x87);
|
||||
XGINew_SetReg1( pVBInfo->P3c4 , 0x14 , 0x31);
|
||||
printk("25");
|
||||
|
||||
return( TRUE ) ;
|
||||
return 1;
|
||||
} /* end of init */
|
||||
|
||||
|
||||
@ -2609,9 +2604,9 @@ void XGINew_SetMemoryClock( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_IN
|
||||
BOOLEAN ChkLFB( PVB_DEVICE_INFO pVBInfo )
|
||||
{
|
||||
if (LFBDRAMTrap & XGINew_GetReg1(pVBInfo->P3d4 , 0x78))
|
||||
return( TRUE ) ;
|
||||
return 1;
|
||||
else
|
||||
return( FALSE );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -510,15 +510,9 @@ BOOLEAN XGISetModeNew( PXGI_HW_DEVICE_INFO HwDeviceExtension , USHORT ModeNo )
|
||||
} /* !XG20 */
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
if (pVBInfo->IF_DEF_LVDS == 1)
|
||||
{
|
||||
if (!XGI_XG21CheckLVDSMode(ModeNo , ModeIdIndex, pVBInfo))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
if ( ModeNo <= 0x13 )
|
||||
{
|
||||
@ -577,7 +571,7 @@ BOOLEAN XGISetModeNew( PXGI_HW_DEVICE_INFO HwDeviceExtension , USHORT ModeNo )
|
||||
XGI_LockCRT2( HwDeviceExtension, pVBInfo ) ;
|
||||
}
|
||||
|
||||
return( TRUE ) ;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@ -3990,7 +3984,7 @@ BOOLEAN XGI_SearchModeID( USHORT ModeNo , USHORT *ModeIdIndex, PVB_DEVICE_INFO p
|
||||
if (pVBInfo->SModeIDTable[*ModeIdIndex].St_ModeID == ModeNo)
|
||||
break;
|
||||
if (pVBInfo->SModeIDTable[*ModeIdIndex].St_ModeID == 0xFF)
|
||||
return( FALSE ) ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( ModeNo == 0x07 )
|
||||
@ -4008,13 +4002,13 @@ BOOLEAN XGI_SearchModeID( USHORT ModeNo , USHORT *ModeIdIndex, PVB_DEVICE_INFO p
|
||||
if (pVBInfo->EModeIDTable[*ModeIdIndex].Ext_ModeID == ModeNo)
|
||||
break;
|
||||
if (pVBInfo->EModeIDTable[*ModeIdIndex].Ext_ModeID == 0xFF)
|
||||
return( FALSE ) ;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return( TRUE ) ;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@ -4039,7 +4033,7 @@ BOOLEAN XGINew_CheckMemorySize(PXGI_HW_DEVICE_INFO HwDeviceExtension,USHORT Mode
|
||||
/* if ( ( HwDeviceExtension->jChipType == XGI_650 ) ||
|
||||
( HwDeviceExtension->jChipType == XGI_650M ) )
|
||||
{
|
||||
return( TRUE ) ;
|
||||
return 1;
|
||||
} */
|
||||
|
||||
if ( ModeNo <= 0x13 )
|
||||
@ -4098,9 +4092,9 @@ BOOLEAN XGINew_CheckMemorySize(PXGI_HW_DEVICE_INFO HwDeviceExtension,USHORT Mode
|
||||
}
|
||||
}
|
||||
if (temp < memorysize)
|
||||
return( FALSE ) ;
|
||||
return 0;
|
||||
else
|
||||
return( TRUE ) ;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@ -7736,7 +7730,7 @@ void* XGI_GetTVPtr (USHORT BX,USHORT ModeNo,USHORT ModeIdIndex,USHORT RefreshRat
|
||||
/* --------------------------------------------------------------------- */
|
||||
/* Function : XGI_BacklightByDrv */
|
||||
/* Input : */
|
||||
/* Output : TRUE -> Skip backlight control */
|
||||
/* Output : 1 -> Skip backlight control */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
BOOLEAN XGI_BacklightByDrv( PVB_DEVICE_INFO pVBInfo )
|
||||
@ -7745,9 +7739,9 @@ BOOLEAN XGI_BacklightByDrv( PVB_DEVICE_INFO pVBInfo )
|
||||
|
||||
tempah = ( UCHAR )XGINew_GetReg1( pVBInfo->P3d4 , 0x3A ) ;
|
||||
if (tempah & BacklightControlBit)
|
||||
return TRUE ;
|
||||
return 1;
|
||||
else
|
||||
return FALSE ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -8055,10 +8049,10 @@ BOOLEAN XGI_XG21CheckLVDSMode(USHORT ModeNo,USHORT ModeIdIndex, PVB_DEVICE_INFO
|
||||
|
||||
lvdstableindex = XGI_GetLVDSOEMTableIndex( pVBInfo );
|
||||
if ( xres > (pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDSHDE) )
|
||||
return FALSE;
|
||||
return 0;
|
||||
|
||||
if ( yres > (pVBInfo->XG21_LVDSCapList[lvdstableindex].LVDSVDE) )
|
||||
return FALSE;
|
||||
return 0;
|
||||
|
||||
if ( ModeNo > 0x13 )
|
||||
{
|
||||
@ -8067,12 +8061,11 @@ BOOLEAN XGI_XG21CheckLVDSMode(USHORT ModeNo,USHORT ModeIdIndex, PVB_DEVICE_INFO
|
||||
{
|
||||
colordepth = XGI_GetColorDepth( ModeNo , ModeIdIndex, pVBInfo ) ;
|
||||
if (colordepth > 2)
|
||||
{
|
||||
return FALSE;
|
||||
return 0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void XGI_SetXG21FPBits(PVB_DEVICE_INFO pVBInfo)
|
||||
@ -8463,8 +8456,8 @@ void XGI_SetXG27LVDSPara(USHORT ModeNo,USHORT ModeIdIndex, PVB_DEVICE_INFO pVBIn
|
||||
/* --------------------------------------------------------------------- */
|
||||
/* Function : XGI_IsLCDON */
|
||||
/* Input : */
|
||||
/* Output : FALSE : Skip PSC Control */
|
||||
/* TRUE: Disable PSC */
|
||||
/* Output : 0 : Skip PSC Control */
|
||||
/* 1: Disable PSC */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
BOOLEAN XGI_IsLCDON(PVB_DEVICE_INFO pVBInfo)
|
||||
@ -8473,11 +8466,11 @@ BOOLEAN XGI_IsLCDON(PVB_DEVICE_INFO pVBInfo)
|
||||
|
||||
tempax = pVBInfo->VBInfo ;
|
||||
if ( tempax & SetCRT2ToDualEdge )
|
||||
return FALSE ;
|
||||
return 0;
|
||||
else if ( tempax & ( DisableCRT2Display | SwitchToCRT2 | SetSimuScanMode ) )
|
||||
return TRUE ;
|
||||
return 1;
|
||||
|
||||
return FALSE ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -8518,7 +8511,7 @@ void XGI_DisablePWD( PVB_DEVICE_INFO pVBInfo )
|
||||
/* --------------------------------------------------------------------- */
|
||||
/* Function : XGI_DisableChISLCD */
|
||||
/* Input : */
|
||||
/* Output : FALSE -> Not LCD Mode */
|
||||
/* Output : 0 -> Not LCD Mode */
|
||||
/* Description : */
|
||||
/* --------------------------------------------------------------------- */
|
||||
BOOLEAN XGI_DisableChISLCD(PVB_DEVICE_INFO pVBInfo)
|
||||
@ -8532,16 +8525,16 @@ BOOLEAN XGI_DisableChISLCD(PVB_DEVICE_INFO pVBInfo)
|
||||
if ( tempbx & ( EnableChA | DisableChA ) )
|
||||
{
|
||||
if ( !( tempah & 0x08 ) ) /* Chk LCDA Mode */
|
||||
return FALSE ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
if ( !( tempbx & ( EnableChB | DisableChB ) ) )
|
||||
return FALSE ;
|
||||
return 0;
|
||||
|
||||
if ( tempah & 0x01 ) /* Chk LCDB Mode */
|
||||
return TRUE ;
|
||||
return 1;
|
||||
|
||||
return FALSE ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -8563,16 +8556,16 @@ BOOLEAN XGI_EnableChISLCD(PVB_DEVICE_INFO pVBInfo)
|
||||
if ( tempbx & ( EnableChA | DisableChA ) )
|
||||
{
|
||||
if ( !( tempah & 0x08 ) ) /* Chk LCDA Mode */
|
||||
return FALSE ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( !( tempbx & ( EnableChB | DisableChB ) ) )
|
||||
return FALSE ;
|
||||
return 0;
|
||||
|
||||
if ( tempah & 0x01 ) /* Chk LCDB Mode */
|
||||
return TRUE ;
|
||||
return 1;
|
||||
|
||||
return FALSE ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -4,18 +4,6 @@
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#ifndef CHAR
|
||||
typedef char CHAR;
|
||||
#endif
|
||||
@ -186,12 +174,12 @@ struct _XGI_HW_DEVICE_INFO
|
||||
PXGI_DSReg pSR; /* restore SR registers in initial function. */
|
||||
/* end data :(idx, val) = (FF, FF). */
|
||||
/* Note : restore SR registers if */
|
||||
/* bSkipDramSizing = TRUE */
|
||||
/* bSkipDramSizing = 1 */
|
||||
|
||||
PXGI_DSReg pCR; /* restore CR registers in initial function. */
|
||||
/* end data :(idx, val) = (FF, FF) */
|
||||
/* Note : restore cR registers if */
|
||||
/* bSkipDramSizing = TRUE */
|
||||
/* bSkipDramSizing = 1 */
|
||||
/*
|
||||
#endif
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user