if (enable)
tempbx = pVBInfo->SetFlag & (EnableChA | EnableChB);
else
- tempbx = pVBInfo->SetFlag & (DisableChA | DisableChB);
+ tempbx = pVBInfo->SetFlag & DisableChA;
tempah = ~((unsigned short) xgifb_reg_get(pVBInfo->Part1Port, 0x2E));
return 0;
}
- if (!(tempbx & (EnableChB | DisableChB)))
+ if (!(tempbx & EnableChB))
return 0;
if (tempah & 0x01) /* Chk LCDB Mode */
/* Disable Channel B */
tempah = 0xBF;
- if (pVBInfo->SetFlag & DisableChB)
- /* force to disable Cahnnel */
- tempah &= 0xBF;
-
if (pVBInfo->SetFlag & DisableChA)
/* Force to disable Channel B */
tempah &= 0x7F;
if ((pVBInfo->VBInfo & (SetSimuScanMode | SetCRT2ToDualEdge)))
xgifb_reg_and(pVBInfo->Part2Port, 0x00, 0xdf);
- if ((pVBInfo->SetFlag & DisableChB) ||
- (pVBInfo->VBInfo &
+ if ((pVBInfo->VBInfo &
(DisableCRT2Display | SetSimuScanMode)) ||
((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) &&
(pVBInfo->VBInfo &
(SetCRT2ToRAMDAC | SetCRT2ToLCD | SetCRT2ToTV))))
xgifb_reg_or(pVBInfo->Part1Port, 0x00, 0x80);
- if ((pVBInfo->SetFlag & DisableChB) ||
- (pVBInfo->VBInfo &
+ if ((pVBInfo->VBInfo &
(DisableCRT2Display | SetSimuScanMode)) ||
(!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) ||
(pVBInfo->VBInfo &
}
}
- if (!(pVBInfo->SetFlag & DisableChB)) {
- if ((pVBInfo->SetFlag & EnableChB) || (pVBInfo->VBInfo
- & (SetCRT2ToLCD | SetCRT2ToTV
- | SetCRT2ToRAMDAC))) {
- tempah = xgifb_reg_get(pVBInfo->P3c4, 0x32);
- tempah &= 0xDF;
- if (pVBInfo->VBInfo & SetInSlaveMode) {
- if (!(pVBInfo->VBInfo &
- SetCRT2ToRAMDAC))
- tempah |= 0x20;
- }
- xgifb_reg_set(pVBInfo->P3c4, 0x32, tempah);
- xgifb_reg_or(pVBInfo->P3c4, 0x1E, 0x20);
+ if ((pVBInfo->SetFlag & EnableChB) ||
+ (pVBInfo->VBInfo & (SetCRT2ToLCD | SetCRT2ToTV |
+ SetCRT2ToRAMDAC))) {
+ tempah = xgifb_reg_get(pVBInfo->P3c4, 0x32);
+ tempah &= 0xDF;
+ if (pVBInfo->VBInfo & SetInSlaveMode) {
+ if (!(pVBInfo->VBInfo & SetCRT2ToRAMDAC))
+ tempah |= 0x20;
+ }
+ xgifb_reg_set(pVBInfo->P3c4, 0x32, tempah);
+ xgifb_reg_or(pVBInfo->P3c4, 0x1E, 0x20);
- tempah = xgifb_reg_get(pVBInfo->Part1Port,
- 0x2E);
+ tempah = xgifb_reg_get(pVBInfo->Part1Port, 0x2E);
- if (!(tempah & 0x80))
- xgifb_reg_or(pVBInfo->Part1Port,
- 0x2E, 0x80);
- xgifb_reg_and(pVBInfo->Part1Port, 0x00, 0x7F);
- }
+ if (!(tempah & 0x80))
+ xgifb_reg_or(pVBInfo->Part1Port, 0x2E, 0x80);
+ xgifb_reg_and(pVBInfo->Part1Port, 0x00, 0x7F);
}
if ((pVBInfo->SetFlag & (EnableChA | EnableChB))
if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)
tempah = tempah ^ 0xC0;
- if (pVBInfo->SetFlag & DisableChB)
- tempah &= 0xBF;
-
if (pVBInfo->SetFlag & DisableChA)
tempah &= 0x7F;