Commit 31fb40fd authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

staging: xgifb: delete IF_DEF_LCDA

IF_DEF_LCDA is always true.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e90d057
...@@ -258,23 +258,13 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeNo, ...@@ -258,23 +258,13 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeNo,
} }
if (pVBInfo->VBInfo & SetCRT2ToHiVision) { /* for HiTV */ if (pVBInfo->VBInfo & SetCRT2ToHiVision) { /* for HiTV */
if ((pVBInfo->VBType & VB_SIS301LV) && tempax |= SupportHiVision;
(pVBInfo->VBExtInfo == VB_YPbPr1080i)) { if ((pVBInfo->VBInfo & SetInSlaveMode) &&
tempax |= SupportYPbPr750p; ((resinfo == 4) ||
if ((pVBInfo->VBInfo & SetInSlaveMode) && (resinfo == 3 &&
((resinfo == 3) || (pVBInfo->SetFlag & TVSimuMode)) ||
(resinfo == 4) || (resinfo > 7)))
(resinfo > 7)))
return 0; return 0;
} else {
tempax |= SupportHiVision;
if ((pVBInfo->VBInfo & SetInSlaveMode) &&
((resinfo == 4) ||
(resinfo == 3 &&
(pVBInfo->SetFlag & TVSimuMode)) ||
(resinfo > 7)))
return 0;
}
} else { } else {
if (pVBInfo->VBInfo & (SetCRT2ToAVIDEO | if (pVBInfo->VBInfo & (SetCRT2ToAVIDEO |
SetCRT2ToSVIDEO | SetCRT2ToSVIDEO |
...@@ -969,13 +959,8 @@ static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeNo, ...@@ -969,13 +959,8 @@ static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeNo,
} }
/* 301lv */ /* 301lv */
if ((pVBInfo->VBType & VB_SIS301LV) && if (pVBInfo->VBType & VB_SIS301LV) {
!(pVBInfo->VBExtInfo == VB_YPbPr1080i)) { if (pVBInfo->SetFlag & RPLLDIV2XO)
if (pVBInfo->VBExtInfo == YPbPr750p)
VCLKIndex = XGI_YPbPr750pVCLK;
else if (pVBInfo->VBExtInfo == YPbPr525p)
VCLKIndex = YPbPr525pVCLK;
else if (pVBInfo->SetFlag & RPLLDIV2XO)
VCLKIndex = YPbPr525iVCLK_2; VCLKIndex = YPbPr525iVCLK_2;
else else
VCLKIndex = YPbPr525iVCLK; VCLKIndex = YPbPr525iVCLK;
...@@ -2634,21 +2619,18 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2634,21 +2619,18 @@ 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_LCDA == 1) { if (((HwDeviceExtension->jChipType >= XG20) ||
(HwDeviceExtension->jChipType >= XG40)) &&
if (((HwDeviceExtension->jChipType >= XG20) || (pVBInfo->IF_DEF_LVDS == 0)) {
(HwDeviceExtension->jChipType >= XG40)) && if (pVBInfo->VBType &
(pVBInfo->IF_DEF_LVDS == 0)) { (VB_SIS302B |
if (pVBInfo->VBType & VB_SIS301LV |
(VB_SIS302B | VB_SIS302LV |
VB_SIS301LV | VB_XGI301C)) {
VB_SIS302LV | if (temp & EnableDualEdge) {
VB_XGI301C)) { tempbx |= SetCRT2ToDualEdge;
if (temp & EnableDualEdge) { if (temp & SetToLCDA)
tempbx |= SetCRT2ToDualEdge; tempbx |= XGI_SetCRT2ToLCDA;
if (temp & SetToLCDA)
tempbx |= XGI_SetCRT2ToLCDA;
}
} }
} }
} }
...@@ -2702,19 +2684,17 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2702,19 +2684,17 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
tempbx = 0; tempbx = 0;
} }
if (pVBInfo->IF_DEF_LCDA == 1) { /* Select Display Device */ 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 |
SetCRT2ToTV | SwitchCRT2));
SwitchCRT2));
}
} }
} }
...@@ -2777,11 +2757,9 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2777,11 +2757,9 @@ 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 (pVBInfo->IF_DEF_LCDA == 1) { 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
...@@ -3841,16 +3819,9 @@ static void XGI_SetLockRegs(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -3841,16 +3819,9 @@ static void XGI_SetLockRegs(unsigned short ModeNo, unsigned short ModeIdIndex,
| VB_SIS302LV | VB_XGI301C))) | VB_SIS302LV | VB_XGI301C)))
temp += 2; temp += 2;
if (pVBInfo->VBInfo & SetCRT2ToHiVision) { if ((pVBInfo->VBInfo & SetCRT2ToHiVision) &&
if (pVBInfo->VBType & VB_SIS301LV) { !(pVBInfo->VBType & VB_SIS301LV) && (resinfo == 7))
if (pVBInfo->VBExtInfo == VB_YPbPr1080i) {
if (resinfo == 7)
temp -= 2;
}
} else if (resinfo == 7) {
temp -= 2; temp -= 2;
}
}
} }
/* 0x05 Horizontal Display Start */ /* 0x05 Horizontal Display Start */
...@@ -6566,7 +6537,6 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, ...@@ -6566,7 +6537,6 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
struct vb_device_info *pVBInfo = &VBINF; struct vb_device_info *pVBInfo = &VBINF;
pVBInfo->BaseAddr = xgifb_info->vga_base; pVBInfo->BaseAddr = xgifb_info->vga_base;
pVBInfo->IF_DEF_LVDS = 0; pVBInfo->IF_DEF_LVDS = 0;
pVBInfo->IF_DEF_LCDA = 1;
if (HwDeviceExtension->jChipType >= XG20) { if (HwDeviceExtension->jChipType >= XG20) {
pVBInfo->IF_DEF_YPbPr = 0; pVBInfo->IF_DEF_YPbPr = 0;
......
...@@ -168,11 +168,10 @@ struct vb_device_info { ...@@ -168,11 +168,10 @@ struct vb_device_info {
unsigned short ModeType; unsigned short ModeType;
unsigned short IF_DEF_LVDS, IF_DEF_TRUMPION, IF_DEF_DSTN; unsigned short IF_DEF_LVDS, IF_DEF_TRUMPION, IF_DEF_DSTN;
unsigned short IF_DEF_CRT2Monitor; unsigned short IF_DEF_CRT2Monitor;
unsigned short IF_DEF_LCDA, IF_DEF_YPbPr; unsigned short IF_DEF_YPbPr;
unsigned short IF_DEF_HiVision; unsigned short IF_DEF_HiVision;
unsigned short LCDResInfo, LCDTypeInfo, VBType;/*301b*/ unsigned short LCDResInfo, LCDTypeInfo, VBType;/*301b*/
unsigned short VBInfo, TVInfo, LCDInfo; unsigned short VBInfo, TVInfo, LCDInfo;
unsigned short VBExtInfo;/*301lv*/
unsigned short SetFlag; unsigned short SetFlag;
unsigned short NewFlickerMode; unsigned short NewFlickerMode;
unsigned short SelectCRT2Rate; unsigned short SelectCRT2Rate;
......
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