Commit 1b149edf authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

staging: xgifb: XGI_GetVBInfo(): delete IF_DEF_LVDS check

Delete IF_DEF_LVDS check, this function is never called when it's true.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7ac54d03
...@@ -1994,40 +1994,28 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -1994,40 +1994,28 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
temp = xgifb_reg_get(pVBInfo->P3d4, 0x38); temp = xgifb_reg_get(pVBInfo->P3d4, 0x38);
if (pVBInfo->IF_DEF_LVDS == 0) { if (pVBInfo->VBType & (VB_SIS302B | VB_SIS301LV | VB_SIS302LV |
if (pVBInfo->VBType & VB_XGI301C)) {
(VB_SIS302B | if (temp & EnableDualEdge) {
VB_SIS301LV | tempbx |= SetCRT2ToDualEdge;
VB_SIS302LV | if (temp & SetToLCDA)
VB_XGI301C)) { tempbx |= XGI_SetCRT2ToLCDA;
if (temp & EnableDualEdge) {
tempbx |= SetCRT2ToDualEdge;
if (temp & SetToLCDA)
tempbx |= XGI_SetCRT2ToLCDA;
}
} }
} }
if (pVBInfo->IF_DEF_YPbPr == 1) { if (pVBInfo->IF_DEF_YPbPr == 1) {
if (((pVBInfo->IF_DEF_LVDS == 0) && if (pVBInfo->VBType & (VB_SIS301LV|VB_SIS302LV|VB_XGI301C)) {
((pVBInfo->VBType & VB_SIS301LV) ||
(pVBInfo->VBType & VB_SIS302LV) ||
(pVBInfo->VBType & VB_XGI301C)))) {
if (temp & SetYPbPr) { if (temp & SetYPbPr) {
if (pVBInfo->IF_DEF_HiVision == 1) { if (pVBInfo->IF_DEF_HiVision == 1) {
/* shampoo add for new /* shampoo add for new scratch */
* scratch */ temp = xgifb_reg_get(pVBInfo->P3d4,
temp = xgifb_reg_get( 0x35);
pVBInfo->P3d4,
0x35);
temp &= YPbPrMode; temp &= YPbPrMode;
tempbx |= SetCRT2ToHiVision; tempbx |= SetCRT2ToHiVision;
if (temp != YPbPrMode1080i) { if (temp != YPbPrMode1080i) {
tempbx &= tempbx &= (~SetCRT2ToHiVision);
(~SetCRT2ToHiVision); tempbx |= SetCRT2ToYPbPr525750;
tempbx |=
SetCRT2ToYPbPr525750;
} }
} }
} }
...@@ -2036,19 +2024,15 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2036,19 +2024,15 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
tempax = push; /* restore CR31 */ tempax = push; /* restore CR31 */
if (pVBInfo->IF_DEF_LVDS == 0) { if (pVBInfo->IF_DEF_YPbPr == 1) {
if (pVBInfo->IF_DEF_YPbPr == 1) { if (pVBInfo->IF_DEF_HiVision == 1)
if (pVBInfo->IF_DEF_HiVision == 1) temp = 0x09FC;
temp = 0x09FC; else
else temp = 0x097C;
temp = 0x097C; } else if (pVBInfo->IF_DEF_HiVision == 1) {
} else if (pVBInfo->IF_DEF_HiVision == 1) { temp = 0x01FC;
temp = 0x01FC; } else {
} else { temp = 0x017C;
temp = 0x017C;
}
} else { /* 3rd party chip */
temp = SetCRT2ToLCD;
} }
if (!(tempbx & temp)) { if (!(tempbx & temp)) {
...@@ -2059,14 +2043,11 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2059,14 +2043,11 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
if (!(pVBInfo->VBType & VB_NoLCD)) { if (!(pVBInfo->VBType & VB_NoLCD)) {
if (tempbx & XGI_SetCRT2ToLCDA) { if (tempbx & XGI_SetCRT2ToLCDA) {
if (tempbx & SetSimuScanMode) if (tempbx & SetSimuScanMode)
tempbx &= (~(SetCRT2ToLCD | tempbx &= (~(SetCRT2ToLCD | SetCRT2ToRAMDAC |
SetCRT2ToRAMDAC |
SwitchCRT2)); SwitchCRT2));
else else
tempbx &= (~(SetCRT2ToLCD | tempbx &= (~(SetCRT2ToLCD | SetCRT2ToRAMDAC |
SetCRT2ToRAMDAC | SetCRT2ToTV | SwitchCRT2));
SetCRT2ToTV |
SwitchCRT2));
} }
} }
...@@ -2075,49 +2056,38 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2075,49 +2056,38 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
if (!(tempbx & (SwitchCRT2 | SetSimuScanMode))) { if (!(tempbx & (SwitchCRT2 | SetSimuScanMode))) {
if (pVBInfo->IF_DEF_CRT2Monitor == 1) { if (pVBInfo->IF_DEF_CRT2Monitor == 1) {
if (tempbx & SetCRT2ToRAMDAC) { if (tempbx & SetCRT2ToRAMDAC) {
tempbx &= (0xFF00 | tempbx &= (0xFF00 | SetCRT2ToRAMDAC |
SetCRT2ToRAMDAC | SwitchCRT2 | SetSimuScanMode);
SwitchCRT2 |
SetSimuScanMode);
tempbx &= (0x00FF | (~SetCRT2ToYPbPr525750)); tempbx &= (0x00FF | (~SetCRT2ToYPbPr525750));
} }
} else { } else {
tempbx &= (~(SetCRT2ToRAMDAC | tempbx &= (~(SetCRT2ToRAMDAC | SetCRT2ToLCD |
SetCRT2ToLCD |
SetCRT2ToTV)); SetCRT2ToTV));
} }
} }
if (!(pVBInfo->VBType & VB_NoLCD)) { if (!(pVBInfo->VBType & VB_NoLCD)) {
if (tempbx & SetCRT2ToLCD) { if (tempbx & SetCRT2ToLCD) {
tempbx &= (0xFF00 | tempbx &= (0xFF00 | SetCRT2ToLCD | SwitchCRT2 |
SetCRT2ToLCD |
SwitchCRT2 |
SetSimuScanMode); SetSimuScanMode);
tempbx &= (0x00FF | (~SetCRT2ToYPbPr525750)); tempbx &= (0x00FF | (~SetCRT2ToYPbPr525750));
} }
} }
if (tempbx & SetCRT2ToSCART) { if (tempbx & SetCRT2ToSCART) {
tempbx &= (0xFF00 | tempbx &= (0xFF00 | SetCRT2ToSCART | SwitchCRT2 |
SetCRT2ToSCART |
SwitchCRT2 |
SetSimuScanMode); SetSimuScanMode);
tempbx &= (0x00FF | (~SetCRT2ToYPbPr525750)); tempbx &= (0x00FF | (~SetCRT2ToYPbPr525750));
} }
if (pVBInfo->IF_DEF_YPbPr == 1) { if (pVBInfo->IF_DEF_YPbPr == 1) {
if (tempbx & SetCRT2ToYPbPr525750) if (tempbx & SetCRT2ToYPbPr525750)
tempbx &= (0xFF00 | tempbx &= (0xFF00 | SwitchCRT2 | SetSimuScanMode);
SwitchCRT2 |
SetSimuScanMode);
} }
if (pVBInfo->IF_DEF_HiVision == 1) { if (pVBInfo->IF_DEF_HiVision == 1) {
if (tempbx & SetCRT2ToHiVision) if (tempbx & SetCRT2ToHiVision)
tempbx &= (0xFF00 | tempbx &= (0xFF00 | SetCRT2ToHiVision | SwitchCRT2 |
SetCRT2ToHiVision |
SwitchCRT2 |
SetSimuScanMode); SetSimuScanMode);
} }
...@@ -2127,19 +2097,15 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2127,19 +2097,15 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
} }
if (!(tempbx & DisableCRT2Display)) { if (!(tempbx & DisableCRT2Display)) {
if ((!(tempbx & DriverMode)) || if ((!(tempbx & DriverMode)) || (!(modeflag & CRT2Mode))) {
(!(modeflag & CRT2Mode))) {
if (!(tempbx & XGI_SetCRT2ToLCDA)) if (!(tempbx & XGI_SetCRT2ToLCDA))
tempbx |= (SetInSlaveMode | tempbx |= (SetInSlaveMode | SetSimuScanMode);
SetSimuScanMode);
} }
/* LCD+TV can't support in slave mode /* LCD+TV can't support in slave mode
* (Force LCDA+TV->LCDB) */ * (Force LCDA+TV->LCDB) */
if ((tempbx & SetInSlaveMode) && if ((tempbx & SetInSlaveMode) && (tempbx & XGI_SetCRT2ToLCDA)) {
(tempbx & XGI_SetCRT2ToLCDA)) { tempbx ^= (SetCRT2ToLCD | XGI_SetCRT2ToLCDA |
tempbx ^= (SetCRT2ToLCD |
XGI_SetCRT2ToLCDA |
SetCRT2ToDualEdge); SetCRT2ToDualEdge);
pVBInfo->SetFlag |= ReserveTVOption; pVBInfo->SetFlag |= ReserveTVOption;
} }
......
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