aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sis/init.c
diff options
context:
space:
mode:
authorRichard Knutsson <ricknu-0@student.ltu.se>2007-02-12 03:55:06 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:42 -0500
commitc30660ead2dd6ced47ac6ad4c099fb9305263ffb (patch)
treeb85e8c6db87e0627924568ac6ad2b5d71965bcfb /drivers/video/sis/init.c
parent3aebbd8f92ef1aa3048800b4991db60403b85964 (diff)
[PATCH] drivers/video/sis: Convert to generic boolean
Convert: FALSE -> false TRUE -> true BOOLEAN -> bool Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se> Cc: Thomas Hellstrom <thomas@tungstengraphics.com> Cc: James Simmons <jsimmons@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/sis/init.c')
-rw-r--r--drivers/video/sis/init.c140
1 files changed, 70 insertions, 70 deletions
diff --git a/drivers/video/sis/init.c b/drivers/video/sis/init.c
index 2ab3868efde3..c311ad3c3687 100644
--- a/drivers/video/sis/init.c
+++ b/drivers/video/sis/init.c
@@ -317,23 +317,23 @@ InitTo310Pointer(struct SiS_Private *SiS_Pr)
317} 317}
318#endif 318#endif
319 319
320BOOLEAN 320bool
321SiSInitPtr(struct SiS_Private *SiS_Pr) 321SiSInitPtr(struct SiS_Private *SiS_Pr)
322{ 322{
323 if(SiS_Pr->ChipType < SIS_315H) { 323 if(SiS_Pr->ChipType < SIS_315H) {
324#ifdef SIS300 324#ifdef SIS300
325 InitTo300Pointer(SiS_Pr); 325 InitTo300Pointer(SiS_Pr);
326#else 326#else
327 return FALSE; 327 return false;
328#endif 328#endif
329 } else { 329 } else {
330#ifdef SIS315H 330#ifdef SIS315H
331 InitTo310Pointer(SiS_Pr); 331 InitTo310Pointer(SiS_Pr);
332#else 332#else
333 return FALSE; 333 return false;
334#endif 334#endif
335 } 335 }
336 return TRUE; 336 return true;
337} 337}
338 338
339/*********************************************/ 339/*********************************************/
@@ -345,7 +345,7 @@ static
345#endif 345#endif
346unsigned short 346unsigned short
347SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay, 347SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay,
348 int Depth, BOOLEAN FSTN, int LCDwidth, int LCDheight) 348 int Depth, bool FSTN, int LCDwidth, int LCDheight)
349{ 349{
350 unsigned short ModeIndex = 0; 350 unsigned short ModeIndex = 0;
351 351
@@ -483,7 +483,7 @@ SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay,
483 483
484unsigned short 484unsigned short
485SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay, 485SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay,
486 int Depth, BOOLEAN FSTN, unsigned short CustomT, int LCDwidth, int LCDheight, 486 int Depth, bool FSTN, unsigned short CustomT, int LCDwidth, int LCDheight,
487 unsigned int VBFlags2) 487 unsigned int VBFlags2)
488{ 488{
489 unsigned short ModeIndex = 0; 489 unsigned short ModeIndex = 0;
@@ -873,7 +873,7 @@ SiS_GetModeID_VGA2(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDispl
873 break; 873 break;
874 } 874 }
875 875
876 return SiS_GetModeID(VGAEngine, 0, HDisplay, VDisplay, Depth, FALSE, 0, 0); 876 return SiS_GetModeID(VGAEngine, 0, HDisplay, VDisplay, Depth, false, 0, 0);
877} 877}
878 878
879 879
@@ -1020,12 +1020,12 @@ SiS_GetSysFlags(struct SiS_Private *SiS_Pr)
1020 1020
1021 /* 661 and newer: NEVER write non-zero to SR11[7:4] */ 1021 /* 661 and newer: NEVER write non-zero to SR11[7:4] */
1022 /* (SR11 is used for DDC and in enable/disablebridge) */ 1022 /* (SR11 is used for DDC and in enable/disablebridge) */
1023 SiS_Pr->SiS_SensibleSR11 = FALSE; 1023 SiS_Pr->SiS_SensibleSR11 = false;
1024 SiS_Pr->SiS_MyCR63 = 0x63; 1024 SiS_Pr->SiS_MyCR63 = 0x63;
1025 if(SiS_Pr->ChipType >= SIS_330) { 1025 if(SiS_Pr->ChipType >= SIS_330) {
1026 SiS_Pr->SiS_MyCR63 = 0x53; 1026 SiS_Pr->SiS_MyCR63 = 0x53;
1027 if(SiS_Pr->ChipType >= SIS_661) { 1027 if(SiS_Pr->ChipType >= SIS_661) {
1028 SiS_Pr->SiS_SensibleSR11 = TRUE; 1028 SiS_Pr->SiS_SensibleSR11 = true;
1029 } 1029 }
1030 } 1030 }
1031 1031
@@ -1253,7 +1253,7 @@ SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
1253/* HELPER: Determine ROM usage */ 1253/* HELPER: Determine ROM usage */
1254/*********************************************/ 1254/*********************************************/
1255 1255
1256BOOLEAN 1256bool
1257SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr) 1257SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr)
1258{ 1258{
1259 unsigned char *ROMAddr = SiS_Pr->VirtualRomBase; 1259 unsigned char *ROMAddr = SiS_Pr->VirtualRomBase;
@@ -1261,16 +1261,16 @@ SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr)
1261 1261
1262 if(SiS_Pr->ChipType >= XGI_20) { 1262 if(SiS_Pr->ChipType >= XGI_20) {
1263 /* XGI ROMs don't qualify */ 1263 /* XGI ROMs don't qualify */
1264 return FALSE; 1264 return false;
1265 } else if(SiS_Pr->ChipType >= SIS_761) { 1265 } else if(SiS_Pr->ChipType >= SIS_761) {
1266 /* I very much assume 761, 340 and newer will use new layout */ 1266 /* I very much assume 761, 340 and newer will use new layout */
1267 return TRUE; 1267 return true;
1268 } else if(SiS_Pr->ChipType >= SIS_661) { 1268 } else if(SiS_Pr->ChipType >= SIS_661) {
1269 if((ROMAddr[0x1a] == 'N') && 1269 if((ROMAddr[0x1a] == 'N') &&
1270 (ROMAddr[0x1b] == 'e') && 1270 (ROMAddr[0x1b] == 'e') &&
1271 (ROMAddr[0x1c] == 'w') && 1271 (ROMAddr[0x1c] == 'w') &&
1272 (ROMAddr[0x1d] == 'V')) { 1272 (ROMAddr[0x1d] == 'V')) {
1273 return TRUE; 1273 return true;
1274 } 1274 }
1275 romversoffs = ROMAddr[0x16] | (ROMAddr[0x17] << 8); 1275 romversoffs = ROMAddr[0x16] | (ROMAddr[0x17] << 8);
1276 if(romversoffs) { 1276 if(romversoffs) {
@@ -1280,17 +1280,17 @@ SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr)
1280 } 1280 }
1281 } 1281 }
1282 if((romvmaj != 0) || (romvmin >= 92)) { 1282 if((romvmaj != 0) || (romvmin >= 92)) {
1283 return TRUE; 1283 return true;
1284 } 1284 }
1285 } else if(IS_SIS650740) { 1285 } else if(IS_SIS650740) {
1286 if((ROMAddr[0x1a] == 'N') && 1286 if((ROMAddr[0x1a] == 'N') &&
1287 (ROMAddr[0x1b] == 'e') && 1287 (ROMAddr[0x1b] == 'e') &&
1288 (ROMAddr[0x1c] == 'w') && 1288 (ROMAddr[0x1c] == 'w') &&
1289 (ROMAddr[0x1d] == 'V')) { 1289 (ROMAddr[0x1d] == 'V')) {
1290 return TRUE; 1290 return true;
1291 } 1291 }
1292 } 1292 }
1293 return FALSE; 1293 return false;
1294} 1294}
1295 1295
1296static void 1296static void
@@ -1299,8 +1299,8 @@ SiSDetermineROMUsage(struct SiS_Private *SiS_Pr)
1299 unsigned char *ROMAddr = SiS_Pr->VirtualRomBase; 1299 unsigned char *ROMAddr = SiS_Pr->VirtualRomBase;
1300 unsigned short romptr = 0; 1300 unsigned short romptr = 0;
1301 1301
1302 SiS_Pr->SiS_UseROM = FALSE; 1302 SiS_Pr->SiS_UseROM = false;
1303 SiS_Pr->SiS_ROMNew = FALSE; 1303 SiS_Pr->SiS_ROMNew = false;
1304 SiS_Pr->SiS_PWDOffset = 0; 1304 SiS_Pr->SiS_PWDOffset = 0;
1305 1305
1306 if(SiS_Pr->ChipType >= XGI_20) return; 1306 if(SiS_Pr->ChipType >= XGI_20) return;
@@ -1312,15 +1312,15 @@ SiSDetermineROMUsage(struct SiS_Private *SiS_Pr)
1312 * of the BIOS image. 1312 * of the BIOS image.
1313 */ 1313 */
1314 if((ROMAddr[3] == 0xe9) && ((ROMAddr[5] << 8) | ROMAddr[4]) > 0x21a) 1314 if((ROMAddr[3] == 0xe9) && ((ROMAddr[5] << 8) | ROMAddr[4]) > 0x21a)
1315 SiS_Pr->SiS_UseROM = TRUE; 1315 SiS_Pr->SiS_UseROM = true;
1316 } else if(SiS_Pr->ChipType < SIS_315H) { 1316 } else if(SiS_Pr->ChipType < SIS_315H) {
1317 /* Sony's VAIO BIOS 1.09 follows the standard, so perhaps 1317 /* Sony's VAIO BIOS 1.09 follows the standard, so perhaps
1318 * the others do as well 1318 * the others do as well
1319 */ 1319 */
1320 SiS_Pr->SiS_UseROM = TRUE; 1320 SiS_Pr->SiS_UseROM = true;
1321 } else { 1321 } else {
1322 /* 315/330 series stick to the standard(s) */ 1322 /* 315/330 series stick to the standard(s) */
1323 SiS_Pr->SiS_UseROM = TRUE; 1323 SiS_Pr->SiS_UseROM = true;
1324 if((SiS_Pr->SiS_ROMNew = SiSDetermineROMLayout661(SiS_Pr))) { 1324 if((SiS_Pr->SiS_ROMNew = SiSDetermineROMLayout661(SiS_Pr))) {
1325 SiS_Pr->SiS_EMIOffset = 14; 1325 SiS_Pr->SiS_EMIOffset = 14;
1326 SiS_Pr->SiS_PWDOffset = 17; 1326 SiS_Pr->SiS_PWDOffset = 17;
@@ -1488,7 +1488,7 @@ SiS_GetVBType(struct SiS_Private *SiS_Pr)
1488/*********************************************/ 1488/*********************************************/
1489 1489
1490#ifdef SIS_LINUX_KERNEL 1490#ifdef SIS_LINUX_KERNEL
1491static BOOLEAN 1491static bool
1492SiS_CheckMemorySize(struct SiS_Private *SiS_Pr, unsigned short ModeNo, 1492SiS_CheckMemorySize(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
1493 unsigned short ModeIdIndex) 1493 unsigned short ModeIdIndex)
1494{ 1494{
@@ -1496,10 +1496,10 @@ SiS_CheckMemorySize(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
1496 unsigned short modeflag = SiS_GetModeFlag(SiS_Pr, ModeNo, ModeIdIndex); 1496 unsigned short modeflag = SiS_GetModeFlag(SiS_Pr, ModeNo, ModeIdIndex);
1497 unsigned short memorysize = ((modeflag & MemoryInfoFlag) >> MemorySizeShift) + 1; 1497 unsigned short memorysize = ((modeflag & MemoryInfoFlag) >> MemorySizeShift) + 1;
1498 1498
1499 if(!AdapterMemSize) return TRUE; 1499 if(!AdapterMemSize) return true;
1500 1500
1501 if(AdapterMemSize < memorysize) return FALSE; 1501 if(AdapterMemSize < memorysize) return false;
1502 return TRUE; 1502 return true;
1503} 1503}
1504#endif 1504#endif
1505 1505
@@ -1605,7 +1605,7 @@ SiS_ClearBuffer(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
1605/* HELPER: SearchModeID */ 1605/* HELPER: SearchModeID */
1606/*********************************************/ 1606/*********************************************/
1607 1607
1608BOOLEAN 1608bool
1609SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo, 1609SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo,
1610 unsigned short *ModeIdIndex) 1610 unsigned short *ModeIdIndex)
1611{ 1611{
@@ -1617,7 +1617,7 @@ SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo,
1617 1617
1618 for((*ModeIdIndex) = 0; ;(*ModeIdIndex)++) { 1618 for((*ModeIdIndex) = 0; ;(*ModeIdIndex)++) {
1619 if(SiS_Pr->SiS_SModeIDTable[(*ModeIdIndex)].St_ModeID == (*ModeNo)) break; 1619 if(SiS_Pr->SiS_SModeIDTable[(*ModeIdIndex)].St_ModeID == (*ModeNo)) break;
1620 if(SiS_Pr->SiS_SModeIDTable[(*ModeIdIndex)].St_ModeID == 0xFF) return FALSE; 1620 if(SiS_Pr->SiS_SModeIDTable[(*ModeIdIndex)].St_ModeID == 0xFF) return false;
1621 } 1621 }
1622 1622
1623 if((*ModeNo) == 0x07) { 1623 if((*ModeNo) == 0x07) {
@@ -1635,11 +1635,11 @@ SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo,
1635 1635
1636 for((*ModeIdIndex) = 0; ;(*ModeIdIndex)++) { 1636 for((*ModeIdIndex) = 0; ;(*ModeIdIndex)++) {
1637 if(SiS_Pr->SiS_EModeIDTable[(*ModeIdIndex)].Ext_ModeID == (*ModeNo)) break; 1637 if(SiS_Pr->SiS_EModeIDTable[(*ModeIdIndex)].Ext_ModeID == (*ModeNo)) break;
1638 if(SiS_Pr->SiS_EModeIDTable[(*ModeIdIndex)].Ext_ModeID == 0xFF) return FALSE; 1638 if(SiS_Pr->SiS_EModeIDTable[(*ModeIdIndex)].Ext_ModeID == 0xFF) return false;
1639 } 1639 }
1640 1640
1641 } 1641 }
1642 return TRUE; 1642 return true;
1643} 1643}
1644 1644
1645/*********************************************/ 1645/*********************************************/
@@ -1696,13 +1696,13 @@ SiS_GetRefCRT1CRTC(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide
1696/* HELPER: LowModeTests */ 1696/* HELPER: LowModeTests */
1697/*********************************************/ 1697/*********************************************/
1698 1698
1699static BOOLEAN 1699static bool
1700SiS_DoLowModeTest(struct SiS_Private *SiS_Pr, unsigned short ModeNo) 1700SiS_DoLowModeTest(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
1701{ 1701{
1702 unsigned short temp, temp1, temp2; 1702 unsigned short temp, temp1, temp2;
1703 1703
1704 if((ModeNo != 0x03) && (ModeNo != 0x10) && (ModeNo != 0x12)) 1704 if((ModeNo != 0x03) && (ModeNo != 0x10) && (ModeNo != 0x12))
1705 return TRUE; 1705 return true;
1706 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x11); 1706 temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x11);
1707 SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x11,0x80); 1707 SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x11,0x80);
1708 temp1 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x00); 1708 temp1 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x00);
@@ -1712,13 +1712,13 @@ SiS_DoLowModeTest(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
1712 SiS_SetReg(SiS_Pr->SiS_P3d4,0x11,temp); 1712 SiS_SetReg(SiS_Pr->SiS_P3d4,0x11,temp);
1713 if((SiS_Pr->ChipType >= SIS_315H) || 1713 if((SiS_Pr->ChipType >= SIS_315H) ||
1714 (SiS_Pr->ChipType == SIS_300)) { 1714 (SiS_Pr->ChipType == SIS_300)) {
1715 if(temp2 == 0x55) return FALSE; 1715 if(temp2 == 0x55) return false;
1716 else return TRUE; 1716 else return true;
1717 } else { 1717 } else {
1718 if(temp2 != 0x55) return TRUE; 1718 if(temp2 != 0x55) return true;
1719 else { 1719 else {
1720 SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x35,0x01); 1720 SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x35,0x01);
1721 return FALSE; 1721 return false;
1722 } 1722 }
1723 } 1723 }
1724} 1724}
@@ -3237,14 +3237,14 @@ static void
3237SiS_SetPitch(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn) 3237SiS_SetPitch(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn)
3238{ 3238{
3239 SISPtr pSiS = SISPTR(pScrn); 3239 SISPtr pSiS = SISPTR(pScrn);
3240 BOOLEAN isslavemode = FALSE; 3240 bool isslavemode = false;
3241 3241
3242 if( (pSiS->VBFlags2 & VB2_VIDEOBRIDGE) && 3242 if( (pSiS->VBFlags2 & VB2_VIDEOBRIDGE) &&
3243 ( ((pSiS->VGAEngine == SIS_300_VGA) && 3243 ( ((pSiS->VGAEngine == SIS_300_VGA) &&
3244 (SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0xa0) == 0x20) || 3244 (SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0xa0) == 0x20) ||
3245 ((pSiS->VGAEngine == SIS_315_VGA) && 3245 ((pSiS->VGAEngine == SIS_315_VGA) &&
3246 (SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x50) == 0x10) ) ) { 3246 (SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x50) == 0x10) ) ) {
3247 isslavemode = TRUE; 3247 isslavemode = true;
3248 } 3248 }
3249 3249
3250 /* We need to set pitch for CRT1 if bridge is in slave mode, too */ 3250 /* We need to set pitch for CRT1 if bridge is in slave mode, too */
@@ -3264,10 +3264,10 @@ SiS_SetPitch(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn)
3264 3264
3265#ifdef SIS_XORG_XF86 3265#ifdef SIS_XORG_XF86
3266/* We need pScrn for setting the pitch correctly */ 3266/* We need pScrn for setting the pitch correctly */
3267BOOLEAN 3267bool
3268SiSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, unsigned short ModeNo, BOOLEAN dosetpitch) 3268SiSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, unsigned short ModeNo, bool dosetpitch)
3269#else 3269#else
3270BOOLEAN 3270bool
3271SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo) 3271SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
3272#endif 3272#endif
3273{ 3273{
@@ -3277,8 +3277,8 @@ SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
3277#ifdef SIS_LINUX_KERNEL 3277#ifdef SIS_LINUX_KERNEL
3278 unsigned short KeepLockReg; 3278 unsigned short KeepLockReg;
3279 3279
3280 SiS_Pr->UseCustomMode = FALSE; 3280 SiS_Pr->UseCustomMode = false;
3281 SiS_Pr->CRT1UsesCustomMode = FALSE; 3281 SiS_Pr->CRT1UsesCustomMode = false;
3282#endif 3282#endif
3283 3283
3284 SiS_Pr->SiS_flag_clearbuffer = 0; 3284 SiS_Pr->SiS_flag_clearbuffer = 0;
@@ -3317,7 +3317,7 @@ SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
3317 SiS_UnLockCRT2(SiS_Pr); 3317 SiS_UnLockCRT2(SiS_Pr);
3318 3318
3319 if(!SiS_Pr->UseCustomMode) { 3319 if(!SiS_Pr->UseCustomMode) {
3320 if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return FALSE; 3320 if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return false;
3321 } else { 3321 } else {
3322 ModeIdIndex = 0; 3322 ModeIdIndex = 0;
3323 } 3323 }
@@ -3347,18 +3347,18 @@ SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
3347#ifdef SIS_LINUX_KERNEL 3347#ifdef SIS_LINUX_KERNEL
3348 /* Check memory size (kernel framebuffer driver only) */ 3348 /* Check memory size (kernel framebuffer driver only) */
3349 if(!SiS_CheckMemorySize(SiS_Pr, ModeNo, ModeIdIndex)) { 3349 if(!SiS_CheckMemorySize(SiS_Pr, ModeNo, ModeIdIndex)) {
3350 return FALSE; 3350 return false;
3351 } 3351 }
3352#endif 3352#endif
3353 3353
3354 SiS_OpenCRTC(SiS_Pr); 3354 SiS_OpenCRTC(SiS_Pr);
3355 3355
3356 if(SiS_Pr->UseCustomMode) { 3356 if(SiS_Pr->UseCustomMode) {
3357 SiS_Pr->CRT1UsesCustomMode = TRUE; 3357 SiS_Pr->CRT1UsesCustomMode = true;
3358 SiS_Pr->CSRClock_CRT1 = SiS_Pr->CSRClock; 3358 SiS_Pr->CSRClock_CRT1 = SiS_Pr->CSRClock;
3359 SiS_Pr->CModeFlag_CRT1 = SiS_Pr->CModeFlag; 3359 SiS_Pr->CModeFlag_CRT1 = SiS_Pr->CModeFlag;
3360 } else { 3360 } else {
3361 SiS_Pr->CRT1UsesCustomMode = FALSE; 3361 SiS_Pr->CRT1UsesCustomMode = false;
3362 } 3362 }
3363 3363
3364 /* Set mode on CRT1 */ 3364 /* Set mode on CRT1 */
@@ -3445,7 +3445,7 @@ SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
3445 if(KeepLockReg != 0xA1) SiS_SetReg(SiS_Pr->SiS_P3c4,0x05,0x00); 3445 if(KeepLockReg != 0xA1) SiS_SetReg(SiS_Pr->SiS_P3c4,0x05,0x00);
3446#endif 3446#endif
3447 3447
3448 return TRUE; 3448 return true;
3449} 3449}
3450 3450
3451/*********************************************/ 3451/*********************************************/
@@ -3454,14 +3454,14 @@ SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
3454/*********************************************/ 3454/*********************************************/
3455 3455
3456#ifdef SIS_XORG_XF86 3456#ifdef SIS_XORG_XF86
3457BOOLEAN 3457bool
3458SiSBIOSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, 3458SiSBIOSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3459 DisplayModePtr mode, BOOLEAN IsCustom) 3459 DisplayModePtr mode, bool IsCustom)
3460{ 3460{
3461 SISPtr pSiS = SISPTR(pScrn); 3461 SISPtr pSiS = SISPTR(pScrn);
3462 unsigned short ModeNo = 0; 3462 unsigned short ModeNo = 0;
3463 3463
3464 SiS_Pr->UseCustomMode = FALSE; 3464 SiS_Pr->UseCustomMode = false;
3465 3465
3466 if((IsCustom) && (SiS_CheckBuildCustomMode(pScrn, mode, pSiS->VBFlags))) { 3466 if((IsCustom) && (SiS_CheckBuildCustomMode(pScrn, mode, pSiS->VBFlags))) {
3467 3467
@@ -3475,13 +3475,13 @@ SiSBIOSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3475 3475
3476 /* Don't need vbflags here; checks done earlier */ 3476 /* Don't need vbflags here; checks done earlier */
3477 ModeNo = SiS_GetModeNumber(pScrn, mode, pSiS->VBFlags); 3477 ModeNo = SiS_GetModeNumber(pScrn, mode, pSiS->VBFlags);
3478 if(!ModeNo) return FALSE; 3478 if(!ModeNo) return false;
3479 3479
3480 xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 3, "Setting standard mode 0x%x\n", ModeNo); 3480 xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 3, "Setting standard mode 0x%x\n", ModeNo);
3481 3481
3482 } 3482 }
3483 3483
3484 return(SiSSetMode(SiS_Pr, pScrn, ModeNo, TRUE)); 3484 return(SiSSetMode(SiS_Pr, pScrn, ModeNo, true));
3485} 3485}
3486 3486
3487/*********************************************/ 3487/*********************************************/
@@ -3489,9 +3489,9 @@ SiSBIOSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3489/* for Dual-Head modes */ 3489/* for Dual-Head modes */
3490/*********************************************/ 3490/*********************************************/
3491 3491
3492BOOLEAN 3492bool
3493SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, 3493SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3494 DisplayModePtr mode, BOOLEAN IsCustom) 3494 DisplayModePtr mode, bool IsCustom)
3495{ 3495{
3496 SISIOADDRESS BaseAddr = SiS_Pr->IOAddress; 3496 SISIOADDRESS BaseAddr = SiS_Pr->IOAddress;
3497 SISPtr pSiS = SISPTR(pScrn); 3497 SISPtr pSiS = SISPTR(pScrn);
@@ -3502,7 +3502,7 @@ SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3502 unsigned short ModeNo = 0; 3502 unsigned short ModeNo = 0;
3503 unsigned char backupreg = 0; 3503 unsigned char backupreg = 0;
3504 3504
3505 SiS_Pr->UseCustomMode = FALSE; 3505 SiS_Pr->UseCustomMode = false;
3506 3506
3507 /* Remember: Custom modes for CRT2 are ONLY supported 3507 /* Remember: Custom modes for CRT2 are ONLY supported
3508 * -) on the 30x/B/C, and 3508 * -) on the 30x/B/C, and
@@ -3516,7 +3516,7 @@ SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3516 } else { 3516 } else {
3517 3517
3518 ModeNo = SiS_GetModeNumber(pScrn, mode, pSiS->VBFlags); 3518 ModeNo = SiS_GetModeNumber(pScrn, mode, pSiS->VBFlags);
3519 if(!ModeNo) return FALSE; 3519 if(!ModeNo) return false;
3520 3520
3521 } 3521 }
3522 3522
@@ -3550,10 +3550,10 @@ SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3550 if(pSiSEnt->CRT1ModeNo == -1) { 3550 if(pSiSEnt->CRT1ModeNo == -1) {
3551 xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 3, 3551 xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 3,
3552 "Setting CRT2 mode delayed until after setting CRT1 mode\n"); 3552 "Setting CRT2 mode delayed until after setting CRT1 mode\n");
3553 return TRUE; 3553 return true;
3554 } 3554 }
3555#endif 3555#endif
3556 pSiSEnt->CRT2ModeSet = TRUE; 3556 pSiSEnt->CRT2ModeSet = true;
3557 } 3557 }
3558#endif 3558#endif
3559 3559
@@ -3578,7 +3578,7 @@ SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3578 SiS_UnLockCRT2(SiS_Pr); 3578 SiS_UnLockCRT2(SiS_Pr);
3579 3579
3580 if(!SiS_Pr->UseCustomMode) { 3580 if(!SiS_Pr->UseCustomMode) {
3581 if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return FALSE; 3581 if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return false;
3582 } else { 3582 } else {
3583 ModeIdIndex = 0; 3583 ModeIdIndex = 0;
3584 } 3584 }
@@ -3658,7 +3658,7 @@ SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3658 3658
3659 SiS_Handle760(SiS_Pr); 3659 SiS_Handle760(SiS_Pr);
3660 3660
3661 return TRUE; 3661 return true;
3662} 3662}
3663 3663
3664/*********************************************/ 3664/*********************************************/
@@ -3666,9 +3666,9 @@ SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3666/* for Dual-Head modes */ 3666/* for Dual-Head modes */
3667/*********************************************/ 3667/*********************************************/
3668 3668
3669BOOLEAN 3669bool
3670SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, 3670SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3671 DisplayModePtr mode, BOOLEAN IsCustom) 3671 DisplayModePtr mode, bool IsCustom)
3672{ 3672{
3673 SISIOADDRESS BaseAddr = SiS_Pr->IOAddress; 3673 SISIOADDRESS BaseAddr = SiS_Pr->IOAddress;
3674 SISPtr pSiS = SISPTR(pScrn); 3674 SISPtr pSiS = SISPTR(pScrn);
@@ -3677,10 +3677,10 @@ SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3677#ifdef SISDUALHEAD 3677#ifdef SISDUALHEAD
3678 SISEntPtr pSiSEnt = pSiS->entityPrivate; 3678 SISEntPtr pSiSEnt = pSiS->entityPrivate;
3679 unsigned char backupcr30, backupcr31, backupcr38, backupcr35, backupp40d=0; 3679 unsigned char backupcr30, backupcr31, backupcr38, backupcr35, backupp40d=0;
3680 BOOLEAN backupcustom; 3680 bool backupcustom;
3681#endif 3681#endif
3682 3682
3683 SiS_Pr->UseCustomMode = FALSE; 3683 SiS_Pr->UseCustomMode = false;
3684 3684
3685 if((IsCustom) && (SiS_CheckBuildCustomMode(pScrn, mode, pSiS->VBFlags))) { 3685 if((IsCustom) && (SiS_CheckBuildCustomMode(pScrn, mode, pSiS->VBFlags))) {
3686 3686
@@ -3697,7 +3697,7 @@ SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3697 } else { 3697 } else {
3698 3698
3699 ModeNo = SiS_GetModeNumber(pScrn, mode, 0); /* don't give VBFlags */ 3699 ModeNo = SiS_GetModeNumber(pScrn, mode, 0); /* don't give VBFlags */
3700 if(!ModeNo) return FALSE; 3700 if(!ModeNo) return false;
3701 3701
3702 xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 3, 3702 xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 3,
3703 "Setting standard mode 0x%x on CRT1\n", ModeNo); 3703 "Setting standard mode 0x%x on CRT1\n", ModeNo);
@@ -3721,7 +3721,7 @@ SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3721 SiS_UnLockCRT2(SiS_Pr); 3721 SiS_UnLockCRT2(SiS_Pr);
3722 3722
3723 if(!SiS_Pr->UseCustomMode) { 3723 if(!SiS_Pr->UseCustomMode) {
3724 if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return FALSE; 3724 if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return false;
3725 } else { 3725 } else {
3726 ModeIdIndex = 0; 3726 ModeIdIndex = 0;
3727 } 3727 }
@@ -3771,11 +3771,11 @@ SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3771#endif 3771#endif
3772 3772
3773 if(SiS_Pr->UseCustomMode) { 3773 if(SiS_Pr->UseCustomMode) {
3774 SiS_Pr->CRT1UsesCustomMode = TRUE; 3774 SiS_Pr->CRT1UsesCustomMode = true;
3775 SiS_Pr->CSRClock_CRT1 = SiS_Pr->CSRClock; 3775 SiS_Pr->CSRClock_CRT1 = SiS_Pr->CSRClock;
3776 SiS_Pr->CModeFlag_CRT1 = SiS_Pr->CModeFlag; 3776 SiS_Pr->CModeFlag_CRT1 = SiS_Pr->CModeFlag;
3777 } else { 3777 } else {
3778 SiS_Pr->CRT1UsesCustomMode = FALSE; 3778 SiS_Pr->CRT1UsesCustomMode = false;
3779 } 3779 }
3780 3780
3781 /* Reset CRT2 if changing mode on CRT1 */ 3781 /* Reset CRT2 if changing mode on CRT1 */
@@ -3838,7 +3838,7 @@ SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
3838 /* Backup/Set ModeNo in BIOS scratch area */ 3838 /* Backup/Set ModeNo in BIOS scratch area */
3839 SiS_GetSetModeID(pScrn,ModeNo); 3839 SiS_GetSetModeID(pScrn,ModeNo);
3840 3840
3841 return TRUE; 3841 return true;
3842} 3842}
3843#endif /* Linux_XF86 */ 3843#endif /* Linux_XF86 */
3844 3844
@@ -4082,7 +4082,7 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata,
4082 DisplayModePtr current 4082 DisplayModePtr current
4083#endif 4083#endif
4084#ifdef SIS_LINUX_KERNEL 4084#ifdef SIS_LINUX_KERNEL
4085 struct fb_var_screeninfo *var, BOOLEAN writeres 4085 struct fb_var_screeninfo *var, bool writeres
4086#endif 4086#endif
4087) 4087)
4088{ 4088{