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