Commit c30660ea authored by Richard Knutsson's avatar Richard Knutsson Committed by Linus Torvalds

[PATCH] drivers/video/sis: Convert to generic boolean

Convert:
FALSE   -> false
TRUE    -> true
BOOLEAN -> bool
Signed-off-by: default avatarRichard Knutsson <ricknu-0@student.ltu.se>
Cc: Thomas Hellstrom <thomas@tungstengraphics.com>
Cc: James Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3aebbd8f
This diff is collapsed.
...@@ -1521,13 +1521,13 @@ static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1640x480_1_H[] = ...@@ -1521,13 +1521,13 @@ static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1640x480_1_H[] =
0x00}} 0x00}}
}; };
BOOLEAN SiSInitPtr(struct SiS_Private *SiS_Pr); bool SiSInitPtr(struct SiS_Private *SiS_Pr);
#ifdef SIS_XORG_XF86 #ifdef SIS_XORG_XF86
unsigned short SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay, unsigned short SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay,
int Depth, BOOLEAN FSTN, int LCDwith, int LCDheight); int Depth, bool FSTN, int LCDwith, int LCDheight);
#endif #endif
unsigned short SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay, unsigned short SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay,
int VDisplay, int Depth, BOOLEAN FSTN, int VDisplay, int Depth, bool FSTN,
unsigned short CustomT, int LCDwith, int LCDheight, unsigned short CustomT, int LCDwith, int LCDheight,
unsigned int VBFlags2); unsigned int VBFlags2);
unsigned short SiS_GetModeID_TV(int VGAEngine, unsigned int VBFlags, int HDisplay, unsigned short SiS_GetModeID_TV(int VGAEngine, unsigned int VBFlags, int HDisplay,
...@@ -1558,12 +1558,12 @@ void SiS_SetEnableDstn(struct SiS_Private *SiS_Pr, int enable); ...@@ -1558,12 +1558,12 @@ void SiS_SetEnableDstn(struct SiS_Private *SiS_Pr, int enable);
void SiS_SetEnableFstn(struct SiS_Private *SiS_Pr, int enable); void SiS_SetEnableFstn(struct SiS_Private *SiS_Pr, int enable);
unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex); unsigned short ModeIdIndex);
BOOLEAN SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr); bool SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr);
#ifndef SIS_LINUX_KERNEL #ifndef SIS_LINUX_KERNEL
void SiS_GetVBType(struct SiS_Private *SiS_Pr); void SiS_GetVBType(struct SiS_Private *SiS_Pr);
#endif #endif
BOOLEAN SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo, bool SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo,
unsigned short *ModeIdIndex); unsigned short *ModeIdIndex);
unsigned short SiS_GetModePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short SiS_GetModePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex); unsigned short ModeIdIndex);
...@@ -1581,17 +1581,17 @@ unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned shor ...@@ -1581,17 +1581,17 @@ unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned shor
#endif #endif
void SiS_LoadDAC(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex); void SiS_LoadDAC(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
#ifdef SIS_XORG_XF86 #ifdef SIS_XORG_XF86
BOOLEAN SiSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, unsigned short ModeNo, bool SiSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, unsigned short ModeNo,
BOOLEAN dosetpitch); bool dosetpitch);
BOOLEAN SiSBIOSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, bool SiSBIOSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
DisplayModePtr mode, BOOLEAN IsCustom); DisplayModePtr mode, bool IsCustom);
BOOLEAN SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, bool SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
DisplayModePtr mode, BOOLEAN IsCustom); DisplayModePtr mode, bool IsCustom);
BOOLEAN SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, bool SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
DisplayModePtr mode, BOOLEAN IsCustom); DisplayModePtr mode, bool IsCustom);
#endif #endif
#ifdef SIS_LINUX_KERNEL #ifdef SIS_LINUX_KERNEL
BOOLEAN SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo); bool SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
#endif #endif
void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth); void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth);
void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo, void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
...@@ -1602,7 +1602,7 @@ void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdat ...@@ -1602,7 +1602,7 @@ void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdat
#endif #endif
#ifdef SIS_LINUX_KERNEL #ifdef SIS_LINUX_KERNEL
void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres, void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres,
int yres, struct fb_var_screeninfo *var, BOOLEAN writeres); int yres, struct fb_var_screeninfo *var, bool writeres);
#endif #endif
/* From init301.c: */ /* From init301.c: */
...@@ -1615,7 +1615,7 @@ extern void SiS_SetTVMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo, ...@@ -1615,7 +1615,7 @@ extern void SiS_SetTVMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex); unsigned short ModeIdIndex);
extern void SiS_UnLockCRT2(struct SiS_Private *SiS_Pr); extern void SiS_UnLockCRT2(struct SiS_Private *SiS_Pr);
extern void SiS_DisableBridge(struct SiS_Private *); extern void SiS_DisableBridge(struct SiS_Private *);
extern BOOLEAN SiS_SetCRT2Group(struct SiS_Private *, unsigned short); extern bool SiS_SetCRT2Group(struct SiS_Private *, unsigned short);
extern unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, extern unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex); unsigned short ModeIdIndex);
extern void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr); extern void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr);
...@@ -1624,8 +1624,8 @@ extern unsigned short SiS_GetResInfo(struct SiS_Private *SiS_Pr, unsigned short ...@@ -1624,8 +1624,8 @@ extern unsigned short SiS_GetResInfo(struct SiS_Private *SiS_Pr, unsigned short
extern unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short tempax); extern unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short tempax);
extern unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, extern unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex, unsigned short RRTI); unsigned short ModeIdIndex, unsigned short RRTI);
extern BOOLEAN SiS_IsVAMode(struct SiS_Private *); extern bool SiS_IsVAMode(struct SiS_Private *);
extern BOOLEAN SiS_IsDualEdge(struct SiS_Private *); extern bool SiS_IsDualEdge(struct SiS_Private *);
#ifdef SIS_XORG_XF86 #ifdef SIS_XORG_XF86
/* From other modules: */ /* From other modules: */
......
This diff is collapsed.
...@@ -363,8 +363,8 @@ void SiS_LockCRT2(struct SiS_Private *SiS_Pr); ...@@ -363,8 +363,8 @@ void SiS_LockCRT2(struct SiS_Private *SiS_Pr);
void SiS_EnableCRT2(struct SiS_Private *SiS_Pr); void SiS_EnableCRT2(struct SiS_Private *SiS_Pr);
unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex); unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr); void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr);
BOOLEAN SiS_IsDualEdge(struct SiS_Private *SiS_Pr); bool SiS_IsDualEdge(struct SiS_Private *SiS_Pr);
BOOLEAN SiS_IsVAMode(struct SiS_Private *SiS_Pr); bool SiS_IsVAMode(struct SiS_Private *SiS_Pr);
void SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo, void SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex, int checkcrt2mode); unsigned short ModeIdIndex, int checkcrt2mode);
void SiS_SetYPbPr(struct SiS_Private *SiS_Pr); void SiS_SetYPbPr(struct SiS_Private *SiS_Pr);
...@@ -379,7 +379,7 @@ void SiS_DisableBridge(struct SiS_Private *SiS_Pr); ...@@ -379,7 +379,7 @@ void SiS_DisableBridge(struct SiS_Private *SiS_Pr);
#ifndef SIS_LINUX_KERNEL #ifndef SIS_LINUX_KERNEL
void SiS_EnableBridge(struct SiS_Private *SiS_Pr); void SiS_EnableBridge(struct SiS_Private *SiS_Pr);
#endif #endif
BOOLEAN SiS_SetCRT2Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo); bool SiS_SetCRT2Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
void SiS_SiS30xBLOn(struct SiS_Private *SiS_Pr); void SiS_SiS30xBLOn(struct SiS_Private *SiS_Pr);
void SiS_SiS30xBLOff(struct SiS_Private *SiS_Pr); void SiS_SiS30xBLOff(struct SiS_Private *SiS_Pr);
...@@ -403,7 +403,7 @@ void SiS_Chrontel701xBLOff(struct SiS_Private *SiS_Pr); ...@@ -403,7 +403,7 @@ void SiS_Chrontel701xBLOff(struct SiS_Private *SiS_Pr);
#endif /* 315 */ #endif /* 315 */
#ifdef SIS300 #ifdef SIS300
static BOOLEAN SiS_SetTrumpionBlock(struct SiS_Private *SiS_Pr, unsigned char *dataptr); static bool SiS_SetTrumpionBlock(struct SiS_Private *SiS_Pr, unsigned char *dataptr);
void SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo); void SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo);
#endif #endif
...@@ -416,14 +416,14 @@ unsigned short SiS_HandleDDC(struct SiS_Private *SiS_Pr, unsigned int VBFlags, i ...@@ -416,14 +416,14 @@ unsigned short SiS_HandleDDC(struct SiS_Private *SiS_Pr, unsigned int VBFlags, i
#ifdef SIS_XORG_XF86 #ifdef SIS_XORG_XF86
unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags, unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags,
int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype, int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype,
BOOLEAN checkcr32, unsigned int VBFlags2); bool checkcr32, unsigned int VBFlags2);
unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr); unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr);
unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype, unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype,
unsigned char *buffer); unsigned char *buffer);
#else #else
static unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags, static unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags,
int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype, int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype,
BOOLEAN checkcr32, unsigned int VBFlags2); bool checkcr32, unsigned int VBFlags2);
static unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr); static unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr);
static unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype, static unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype,
unsigned char *buffer); unsigned char *buffer);
...@@ -469,7 +469,7 @@ extern void SiS_SetRegOR(SISIOADDRESS, unsigned short, unsigned short); ...@@ -469,7 +469,7 @@ extern void SiS_SetRegOR(SISIOADDRESS, unsigned short, unsigned short);
extern void SiS_SetRegAND(SISIOADDRESS, unsigned short, unsigned short); extern void SiS_SetRegAND(SISIOADDRESS, unsigned short, unsigned short);
extern void SiS_DisplayOff(struct SiS_Private *SiS_Pr); extern void SiS_DisplayOff(struct SiS_Private *SiS_Pr);
extern void SiS_DisplayOn(struct SiS_Private *SiS_Pr); extern void SiS_DisplayOn(struct SiS_Private *SiS_Pr);
extern BOOLEAN SiS_SearchModeID(struct SiS_Private *, unsigned short *, unsigned short *); extern bool SiS_SearchModeID(struct SiS_Private *, unsigned short *, unsigned short *);
extern unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo, extern unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex); unsigned short ModeIdIndex);
extern unsigned short SiS_GetModePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex); extern unsigned short SiS_GetModePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
......
...@@ -38,14 +38,14 @@ int sisfb_mode_rate_to_dclock(struct SiS_Private *SiS_Pr, ...@@ -38,14 +38,14 @@ int sisfb_mode_rate_to_dclock(struct SiS_Private *SiS_Pr,
unsigned char modeno, unsigned char rateindex); unsigned char modeno, unsigned char rateindex);
int sisfb_mode_rate_to_ddata(struct SiS_Private *SiS_Pr, unsigned char modeno, int sisfb_mode_rate_to_ddata(struct SiS_Private *SiS_Pr, unsigned char modeno,
unsigned char rateindex, struct fb_var_screeninfo *var); unsigned char rateindex, struct fb_var_screeninfo *var);
BOOLEAN sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno, bool sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno,
int *htotal, int *vtotal, unsigned char rateindex); int *htotal, int *vtotal, unsigned char rateindex);
extern BOOLEAN SiSInitPtr(struct SiS_Private *SiS_Pr); extern bool SiSInitPtr(struct SiS_Private *SiS_Pr);
extern BOOLEAN SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo, extern bool SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo,
unsigned short *ModeIdIndex); unsigned short *ModeIdIndex);
extern void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, extern void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata,
int xres, int yres, struct fb_var_screeninfo *var, BOOLEAN writeres); int xres, int yres, struct fb_var_screeninfo *var, bool writeres);
int int
sisfb_mode_rate_to_dclock(struct SiS_Private *SiS_Pr, unsigned char modeno, sisfb_mode_rate_to_dclock(struct SiS_Private *SiS_Pr, unsigned char modeno,
...@@ -131,7 +131,7 @@ sisfb_mode_rate_to_ddata(struct SiS_Private *SiS_Pr, unsigned char modeno, ...@@ -131,7 +131,7 @@ sisfb_mode_rate_to_ddata(struct SiS_Private *SiS_Pr, unsigned char modeno,
(unsigned char *)&SiS_Pr->SiS_CRT1Table[index].CR[0], (unsigned char *)&SiS_Pr->SiS_CRT1Table[index].CR[0],
SiS_Pr->SiS_RefIndex[RRTI].XRes, SiS_Pr->SiS_RefIndex[RRTI].XRes,
SiS_Pr->SiS_RefIndex[RRTI].YRes, SiS_Pr->SiS_RefIndex[RRTI].YRes,
var, FALSE); var, false);
if(SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag & 0x8000) if(SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag & 0x8000)
var->sync &= ~FB_SYNC_VERT_HIGH_ACT; var->sync &= ~FB_SYNC_VERT_HIGH_ACT;
...@@ -175,7 +175,7 @@ sisfb_mode_rate_to_ddata(struct SiS_Private *SiS_Pr, unsigned char modeno, ...@@ -175,7 +175,7 @@ sisfb_mode_rate_to_ddata(struct SiS_Private *SiS_Pr, unsigned char modeno,
return 1; return 1;
} }
BOOLEAN bool
sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno, int *htotal, sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno, int *htotal,
int *vtotal, unsigned char rateindex) int *vtotal, unsigned char rateindex)
{ {
...@@ -184,7 +184,7 @@ sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno, int *ht ...@@ -184,7 +184,7 @@ sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno, int *ht
unsigned short RRTI = 0; unsigned short RRTI = 0;
unsigned char sr_data, cr_data, cr_data2; unsigned char sr_data, cr_data, cr_data2;
if(!SiSInitPtr(SiS_Pr)) return FALSE; if(!SiSInitPtr(SiS_Pr)) return false;
if(rateindex > 0) rateindex--; if(rateindex > 0) rateindex--;
...@@ -195,7 +195,7 @@ sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno, int *ht ...@@ -195,7 +195,7 @@ sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno, int *ht
} }
#endif #endif
if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return FALSE; if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return false;
RRTI = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].REFindex; RRTI = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].REFindex;
if(SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag & HaveWideTiming) { if(SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag & HaveWideTiming) {
...@@ -226,7 +226,7 @@ sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno, int *ht ...@@ -226,7 +226,7 @@ sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno, int *ht
if(SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag & InterlaceMode) if(SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag & InterlaceMode)
*vtotal *= 2; *vtotal *= 2;
return TRUE; return true;
} }
......
...@@ -526,7 +526,7 @@ struct sis_video_info { ...@@ -526,7 +526,7 @@ struct sis_video_info {
u16 vmax; u16 vmax;
u32 dclockmax; u32 dclockmax;
u8 feature; u8 feature;
BOOLEAN datavalid; bool datavalid;
} sisfb_thismonitor; } sisfb_thismonitor;
unsigned short chip_id; /* PCI ID of chip */ unsigned short chip_id; /* PCI ID of chip */
......
This diff is collapsed.
...@@ -411,54 +411,54 @@ static const struct _sis_vrate { ...@@ -411,54 +411,54 @@ static const struct _sis_vrate {
u16 xres; u16 xres;
u16 yres; u16 yres;
u16 refresh; u16 refresh;
BOOLEAN SiS730valid32bpp; bool SiS730valid32bpp;
} sisfb_vrate[] = { } sisfb_vrate[] = {
{1, 320, 200, 70, TRUE}, {1, 320, 200, 70, true},
{1, 320, 240, 60, TRUE}, {1, 320, 240, 60, true},
{1, 400, 300, 60, TRUE}, {1, 400, 300, 60, true},
{1, 512, 384, 60, TRUE}, {1, 512, 384, 60, true},
{1, 640, 400, 72, TRUE}, {1, 640, 400, 72, true},
{1, 640, 480, 60, TRUE}, {2, 640, 480, 72, TRUE}, {3, 640, 480, 75, TRUE}, {1, 640, 480, 60, true}, {2, 640, 480, 72, true}, {3, 640, 480, 75, true},
{4, 640, 480, 85, TRUE}, {5, 640, 480, 100, TRUE}, {6, 640, 480, 120, TRUE}, {4, 640, 480, 85, true}, {5, 640, 480, 100, true}, {6, 640, 480, 120, true},
{7, 640, 480, 160, TRUE}, {8, 640, 480, 200, TRUE}, {7, 640, 480, 160, true}, {8, 640, 480, 200, true},
{1, 720, 480, 60, TRUE}, {1, 720, 480, 60, true},
{1, 720, 576, 58, TRUE}, {1, 720, 576, 58, true},
{1, 768, 576, 58, TRUE}, {1, 768, 576, 58, true},
{1, 800, 480, 60, TRUE}, {2, 800, 480, 75, TRUE}, {3, 800, 480, 85, TRUE}, {1, 800, 480, 60, true}, {2, 800, 480, 75, true}, {3, 800, 480, 85, true},
{1, 800, 600, 56, TRUE}, {2, 800, 600, 60, TRUE}, {3, 800, 600, 72, TRUE}, {1, 800, 600, 56, true}, {2, 800, 600, 60, true}, {3, 800, 600, 72, true},
{4, 800, 600, 75, TRUE}, {5, 800, 600, 85, TRUE}, {6, 800, 600, 105, TRUE}, {4, 800, 600, 75, true}, {5, 800, 600, 85, true}, {6, 800, 600, 105, true},
{7, 800, 600, 120, TRUE}, {8, 800, 600, 160, TRUE}, {7, 800, 600, 120, true}, {8, 800, 600, 160, true},
{1, 848, 480, 39, TRUE}, {2, 848, 480, 60, TRUE}, {1, 848, 480, 39, true}, {2, 848, 480, 60, true},
{1, 856, 480, 39, TRUE}, {2, 856, 480, 60, TRUE}, {1, 856, 480, 39, true}, {2, 856, 480, 60, true},
{1, 960, 540, 60, TRUE}, {1, 960, 540, 60, true},
{1, 960, 600, 60, TRUE}, {1, 960, 600, 60, true},
{1, 1024, 576, 60, TRUE}, {2, 1024, 576, 75, TRUE}, {3, 1024, 576, 85, TRUE}, {1, 1024, 576, 60, true}, {2, 1024, 576, 75, true}, {3, 1024, 576, 85, true},
{1, 1024, 600, 60, TRUE}, {1, 1024, 600, 60, true},
{1, 1024, 768, 43, TRUE}, {2, 1024, 768, 60, TRUE}, {3, 1024, 768, 70, FALSE}, {1, 1024, 768, 43, true}, {2, 1024, 768, 60, true}, {3, 1024, 768, 70, false},
{4, 1024, 768, 75, FALSE}, {5, 1024, 768, 85, TRUE}, {6, 1024, 768, 100, TRUE}, {4, 1024, 768, 75, false}, {5, 1024, 768, 85, true}, {6, 1024, 768, 100, true},
{7, 1024, 768, 120, TRUE}, {7, 1024, 768, 120, true},
{1, 1152, 768, 60, TRUE}, {1, 1152, 768, 60, true},
{1, 1152, 864, 60, TRUE}, {2, 1152, 864, 75, TRUE}, {3, 1152, 864, 84, TRUE}, {1, 1152, 864, 60, true}, {2, 1152, 864, 75, true}, {3, 1152, 864, 84, true},
{1, 1280, 720, 60, TRUE}, {2, 1280, 720, 75, TRUE}, {3, 1280, 720, 85, TRUE}, {1, 1280, 720, 60, true}, {2, 1280, 720, 75, true}, {3, 1280, 720, 85, true},
{1, 1280, 768, 60, TRUE}, {1, 1280, 768, 60, true},
{1, 1280, 800, 60, TRUE}, {1, 1280, 800, 60, true},
{1, 1280, 854, 60, TRUE}, {1, 1280, 854, 60, true},
{1, 1280, 960, 60, TRUE}, {2, 1280, 960, 85, TRUE}, {1, 1280, 960, 60, true}, {2, 1280, 960, 85, true},
{1, 1280, 1024, 43, TRUE}, {2, 1280, 1024, 60, TRUE}, {3, 1280, 1024, 75, TRUE}, {1, 1280, 1024, 43, true}, {2, 1280, 1024, 60, true}, {3, 1280, 1024, 75, true},
{4, 1280, 1024, 85, TRUE}, {4, 1280, 1024, 85, true},
{1, 1360, 768, 60, TRUE}, {1, 1360, 768, 60, true},
{1, 1360, 1024, 59, TRUE}, {1, 1360, 1024, 59, true},
{1, 1400, 1050, 60, TRUE}, {2, 1400, 1050, 75, TRUE}, {1, 1400, 1050, 60, true}, {2, 1400, 1050, 75, true},
{1, 1600, 1200, 60, TRUE}, {2, 1600, 1200, 65, TRUE}, {3, 1600, 1200, 70, TRUE}, {1, 1600, 1200, 60, true}, {2, 1600, 1200, 65, true}, {3, 1600, 1200, 70, true},
{4, 1600, 1200, 75, TRUE}, {5, 1600, 1200, 85, TRUE}, {6, 1600, 1200, 100, TRUE}, {4, 1600, 1200, 75, true}, {5, 1600, 1200, 85, true}, {6, 1600, 1200, 100, true},
{7, 1600, 1200, 120, TRUE}, {7, 1600, 1200, 120, true},
{1, 1680, 1050, 60, TRUE}, {1, 1680, 1050, 60, true},
{1, 1920, 1080, 30, TRUE}, {1, 1920, 1080, 30, true},
{1, 1920, 1440, 60, TRUE}, {2, 1920, 1440, 65, TRUE}, {3, 1920, 1440, 70, TRUE}, {1, 1920, 1440, 60, true}, {2, 1920, 1440, 65, true}, {3, 1920, 1440, 70, true},
{4, 1920, 1440, 75, TRUE}, {5, 1920, 1440, 85, TRUE}, {6, 1920, 1440, 100, TRUE}, {4, 1920, 1440, 75, true}, {5, 1920, 1440, 85, true}, {6, 1920, 1440, 100, true},
{1, 2048, 1536, 60, TRUE}, {2, 2048, 1536, 65, TRUE}, {3, 2048, 1536, 70, TRUE}, {1, 2048, 1536, 60, true}, {2, 2048, 1536, 65, true}, {3, 2048, 1536, 70, true},
{4, 2048, 1536, 75, TRUE}, {5, 2048, 1536, 85, TRUE}, {4, 2048, 1536, 75, true}, {5, 2048, 1536, 85, true},
{0, 0, 0, 0, FALSE} {0, 0, 0, 0, false}
}; };
static struct _sisfbddcsmodes { static struct _sisfbddcsmodes {
...@@ -691,7 +691,7 @@ extern int sisfb_initaccel(struct sis_video_info *ivideo); ...@@ -691,7 +691,7 @@ extern int sisfb_initaccel(struct sis_video_info *ivideo);
extern void sisfb_syncaccel(struct sis_video_info *ivideo); extern void sisfb_syncaccel(struct sis_video_info *ivideo);
/* Internal general routines */ /* Internal general routines */
static void sisfb_search_mode(char *name, BOOLEAN quiet); static void sisfb_search_mode(char *name, bool quiet);
static int sisfb_validate_mode(struct sis_video_info *ivideo, int modeindex, u32 vbflags); static int sisfb_validate_mode(struct sis_video_info *ivideo, int modeindex, u32 vbflags);
static u8 sisfb_search_refresh_rate(struct sis_video_info *ivideo, unsigned int rate, static u8 sisfb_search_refresh_rate(struct sis_video_info *ivideo, unsigned int rate,
int index); int index);
...@@ -702,10 +702,10 @@ static int sisfb_do_set_var(struct fb_var_screeninfo *var, int isactive, ...@@ -702,10 +702,10 @@ static int sisfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
struct fb_info *info); struct fb_info *info);
static void sisfb_pre_setmode(struct sis_video_info *ivideo); static void sisfb_pre_setmode(struct sis_video_info *ivideo);
static void sisfb_post_setmode(struct sis_video_info *ivideo); static void sisfb_post_setmode(struct sis_video_info *ivideo);
static BOOLEAN sisfb_CheckVBRetrace(struct sis_video_info *ivideo); static bool sisfb_CheckVBRetrace(struct sis_video_info *ivideo);
static BOOLEAN sisfbcheckvretracecrt2(struct sis_video_info *ivideo); static bool sisfbcheckvretracecrt2(struct sis_video_info *ivideo);
static BOOLEAN sisfbcheckvretracecrt1(struct sis_video_info *ivideo); static bool sisfbcheckvretracecrt1(struct sis_video_info *ivideo);
static BOOLEAN sisfb_bridgeisslave(struct sis_video_info *ivideo); static bool sisfb_bridgeisslave(struct sis_video_info *ivideo);
static void sisfb_detect_VB_connect(struct sis_video_info *ivideo); static void sisfb_detect_VB_connect(struct sis_video_info *ivideo);
static void sisfb_get_VB_type(struct sis_video_info *ivideo); static void sisfb_get_VB_type(struct sis_video_info *ivideo);
static void sisfb_set_TVxposoffset(struct sis_video_info *ivideo, int val); static void sisfb_set_TVxposoffset(struct sis_video_info *ivideo, int val);
...@@ -737,20 +737,20 @@ static void sisfb_free_node(struct SIS_HEAP *memheap, struct SIS_OH *poh); ...@@ -737,20 +737,20 @@ static void sisfb_free_node(struct SIS_HEAP *memheap, struct SIS_OH *poh);
/* Routines from init.c/init301.c */ /* Routines from init.c/init301.c */
extern unsigned short SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay, extern unsigned short SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay,
int VDisplay, int Depth, BOOLEAN FSTN, unsigned short CustomT, int VDisplay, int Depth, bool FSTN, unsigned short CustomT,
int LCDwith, int LCDheight, unsigned int VBFlags2); int LCDwith, int LCDheight, unsigned int VBFlags2);
extern unsigned short SiS_GetModeID_TV(int VGAEngine, unsigned int VBFlags, int HDisplay, extern unsigned short SiS_GetModeID_TV(int VGAEngine, unsigned int VBFlags, int HDisplay,
int VDisplay, int Depth, unsigned int VBFlags2); int VDisplay, int Depth, unsigned int VBFlags2);
extern unsigned short SiS_GetModeID_VGA2(int VGAEngine, unsigned int VBFlags, int HDisplay, extern unsigned short SiS_GetModeID_VGA2(int VGAEngine, unsigned int VBFlags, int HDisplay,
int VDisplay, int Depth, unsigned int VBFlags2); int VDisplay, int Depth, unsigned int VBFlags2);
extern void SiSRegInit(struct SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr); extern void SiSRegInit(struct SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr);
extern BOOLEAN SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo); extern bool SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
extern void SiS_SetEnableDstn(struct SiS_Private *SiS_Pr, int enable); extern void SiS_SetEnableDstn(struct SiS_Private *SiS_Pr, int enable);
extern void SiS_SetEnableFstn(struct SiS_Private *SiS_Pr, int enable); extern void SiS_SetEnableFstn(struct SiS_Private *SiS_Pr, int enable);
extern BOOLEAN SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr); extern bool SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr);
extern BOOLEAN sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno, extern bool sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno,
int *htotal, int *vtotal, unsigned char rateindex); int *htotal, int *vtotal, unsigned char rateindex);
extern int sisfb_mode_rate_to_dclock(struct SiS_Private *SiS_Pr, extern int sisfb_mode_rate_to_dclock(struct SiS_Private *SiS_Pr,
unsigned char modeno, unsigned char rateindex); unsigned char modeno, unsigned char rateindex);
......
...@@ -57,18 +57,6 @@ ...@@ -57,18 +57,6 @@
#include <linux/version.h> #include <linux/version.h>
#endif #endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef BOOLEAN
typedef unsigned int BOOLEAN;
#endif
#define SISIOMEMTYPE #define SISIOMEMTYPE
#ifdef SIS_LINUX_KERNEL #ifdef SIS_LINUX_KERNEL
......
...@@ -240,7 +240,7 @@ struct SiS_Private ...@@ -240,7 +240,7 @@ struct SiS_Private
void *ivideo; void *ivideo;
#endif #endif
unsigned char *VirtualRomBase; unsigned char *VirtualRomBase;
BOOLEAN UseROM; bool UseROM;
#ifdef SIS_LINUX_KERNEL #ifdef SIS_LINUX_KERNEL
unsigned char SISIOMEMTYPE *VideoMemoryAddress; unsigned char SISIOMEMTYPE *VideoMemoryAddress;
unsigned int VideoMemorySize; unsigned int VideoMemorySize;
...@@ -283,24 +283,24 @@ struct SiS_Private ...@@ -283,24 +283,24 @@ struct SiS_Private
#ifdef SIS_XORG_XF86 #ifdef SIS_XORG_XF86
unsigned short SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4; unsigned short SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4;
#endif #endif
BOOLEAN SiS_UseROM; bool SiS_UseROM;
BOOLEAN SiS_ROMNew; bool SiS_ROMNew;
BOOLEAN SiS_XGIROM; bool SiS_XGIROM;
BOOLEAN SiS_NeedRomModeData; bool SiS_NeedRomModeData;
BOOLEAN PanelSelfDetected; bool PanelSelfDetected;
BOOLEAN DDCPortMixup; bool DDCPortMixup;
int SiS_CHOverScan; int SiS_CHOverScan;
BOOLEAN SiS_CHSOverScan; bool SiS_CHSOverScan;
BOOLEAN SiS_ChSW; bool SiS_ChSW;
BOOLEAN SiS_UseLCDA; bool SiS_UseLCDA;
int SiS_UseOEM; int SiS_UseOEM;
unsigned int SiS_CustomT; unsigned int SiS_CustomT;
int SiS_UseWide, SiS_UseWideCRT2; int SiS_UseWide, SiS_UseWideCRT2;
int SiS_TVBlue; int SiS_TVBlue;
unsigned short SiS_Backup70xx; unsigned short SiS_Backup70xx;
BOOLEAN HaveEMI; bool HaveEMI;
BOOLEAN HaveEMILCD; bool HaveEMILCD;
BOOLEAN OverruleEMI; bool OverruleEMI;
unsigned char EMI_30,EMI_31,EMI_32,EMI_33; unsigned char EMI_30,EMI_31,EMI_32,EMI_33;
unsigned short SiS_EMIOffset; unsigned short SiS_EMIOffset;
unsigned short SiS_PWDOffset; unsigned short SiS_PWDOffset;
...@@ -352,7 +352,7 @@ struct SiS_Private ...@@ -352,7 +352,7 @@ struct SiS_Private
unsigned short SiS_DDC_ReadAddr; unsigned short SiS_DDC_ReadAddr;
unsigned short SiS_DDC_SecAddr; unsigned short SiS_DDC_SecAddr;
unsigned short SiS_ChrontelInit; unsigned short SiS_ChrontelInit;
BOOLEAN SiS_SensibleSR11; bool SiS_SensibleSR11;
unsigned short SiS661LCD2TableSize; unsigned short SiS661LCD2TableSize;
unsigned short SiS_PanelMinLVDS; unsigned short SiS_PanelMinLVDS;
...@@ -494,10 +494,10 @@ struct SiS_Private ...@@ -494,10 +494,10 @@ struct SiS_Private
unsigned short PanelVRS, PanelVRE; unsigned short PanelVRS, PanelVRE;
unsigned short PanelVCLKIdx300; unsigned short PanelVCLKIdx300;
unsigned short PanelVCLKIdx315; unsigned short PanelVCLKIdx315;
BOOLEAN Alternate1600x1200; bool Alternate1600x1200;
BOOLEAN UseCustomMode; bool UseCustomMode;
BOOLEAN CRT1UsesCustomMode; bool CRT1UsesCustomMode;
unsigned short CHDisplay; unsigned short CHDisplay;
unsigned short CHSyncStart; unsigned short CHSyncStart;
unsigned short CHSyncEnd; unsigned short CHSyncEnd;
...@@ -523,7 +523,7 @@ struct SiS_Private ...@@ -523,7 +523,7 @@ struct SiS_Private
int LVDSHL; int LVDSHL;
BOOLEAN Backup; bool Backup;
unsigned char Backup_Mode; unsigned char Backup_Mode;
unsigned char Backup_14; unsigned char Backup_14;
unsigned char Backup_15; unsigned char Backup_15;
...@@ -542,12 +542,12 @@ struct SiS_Private ...@@ -542,12 +542,12 @@ struct SiS_Private
int CenterScreen; int CenterScreen;
unsigned short CP_Vendor, CP_Product; unsigned short CP_Vendor, CP_Product;
BOOLEAN CP_HaveCustomData; bool CP_HaveCustomData;
int CP_PreferredX, CP_PreferredY, CP_PreferredIndex; int CP_PreferredX, CP_PreferredY, CP_PreferredIndex;
int CP_MaxX, CP_MaxY, CP_MaxClock; int CP_MaxX, CP_MaxY, CP_MaxClock;
unsigned char CP_PrefSR2B, CP_PrefSR2C; unsigned char CP_PrefSR2B, CP_PrefSR2C;
unsigned short CP_PrefClock; unsigned short CP_PrefClock;
BOOLEAN CP_Supports64048075; bool CP_Supports64048075;
int CP_HDisplay[7], CP_VDisplay[7]; /* For Custom LCD panel dimensions */ int CP_HDisplay[7], CP_VDisplay[7]; /* For Custom LCD panel dimensions */
int CP_HTotal[7], CP_VTotal[7]; int CP_HTotal[7], CP_VTotal[7];
int CP_HSyncStart[7], CP_VSyncStart[7]; int CP_HSyncStart[7], CP_VSyncStart[7];
...@@ -555,8 +555,8 @@ struct SiS_Private ...@@ -555,8 +555,8 @@ struct SiS_Private
int CP_HBlankStart[7], CP_VBlankStart[7]; int CP_HBlankStart[7], CP_VBlankStart[7];
int CP_HBlankEnd[7], CP_VBlankEnd[7]; int CP_HBlankEnd[7], CP_VBlankEnd[7];
int CP_Clock[7]; int CP_Clock[7];
BOOLEAN CP_DataValid[7]; bool CP_DataValid[7];
BOOLEAN CP_HSync_P[7], CP_VSync_P[7], CP_SyncValid[7]; bool CP_HSync_P[7], CP_VSync_P[7], CP_SyncValid[7];
}; };
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment