Skip to content

Commit

Permalink
staging: xgifb: XGI_GetVCLK2Ptr(): delete IF_DEF_LVDS check
Browse files Browse the repository at this point in the history
Delete IF_DEF_LVDS check, this function is never called when it's true.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Aaro Koskinen authored and Greg Kroah-Hartman committed Feb 8, 2013
1 parent 1e92771 commit 7ac54d0
Showing 1 changed file with 30 additions and 41 deletions.
71 changes: 30 additions & 41 deletions drivers/staging/xgifb/vb_setmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,53 +865,42 @@ static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeNo,
/* si+Ext_ResInfo */
modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;

if (pVBInfo->IF_DEF_LVDS == 0) {
if (pVBInfo->VBInfo &
(SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) { /*301b*/
if (pVBInfo->LCDResInfo != Panel_1024x768)
/* LCDXlat2VCLK */
VCLKIndex = VCLK108_2_315 + 5;
else
VCLKIndex = VCLK65_315 + 2; /* LCDXlat1VCLK */
} else if (pVBInfo->VBInfo & SetCRT2ToHiVision) {
if (pVBInfo->SetFlag & RPLLDIV2XO)
VCLKIndex = TVCLKBASE_315_25 + HiTVVCLKDIV2;
else
VCLKIndex = TVCLKBASE_315_25 + HiTVVCLK;
if (pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) { /*301b*/
if (pVBInfo->LCDResInfo != Panel_1024x768)
/* LCDXlat2VCLK */
VCLKIndex = VCLK108_2_315 + 5;
else
VCLKIndex = VCLK65_315 + 2; /* LCDXlat1VCLK */
} else if (pVBInfo->VBInfo & SetCRT2ToHiVision) {
if (pVBInfo->SetFlag & RPLLDIV2XO)
VCLKIndex = TVCLKBASE_315_25 + HiTVVCLKDIV2;
else
VCLKIndex = TVCLKBASE_315_25 + HiTVVCLK;

if (pVBInfo->SetFlag & TVSimuMode) {
if (modeflag & Charx8Dot) {
VCLKIndex = TVCLKBASE_315_25 +
HiTVSimuVCLK;
} else {
VCLKIndex = TVCLKBASE_315_25 +
HiTVTextVCLK;
}
if (pVBInfo->SetFlag & TVSimuMode) {
if (modeflag & Charx8Dot) {
VCLKIndex = TVCLKBASE_315_25 + HiTVSimuVCLK;
} else {
VCLKIndex = TVCLKBASE_315_25 + HiTVTextVCLK;
}
}

/* 301lv */
if (pVBInfo->VBType & VB_SIS301LV) {
if (pVBInfo->SetFlag & RPLLDIV2XO)
VCLKIndex = YPbPr525iVCLK_2;
else
VCLKIndex = YPbPr525iVCLK;
}
} else if (pVBInfo->VBInfo & SetCRT2ToTV) {
/* 301lv */
if (pVBInfo->VBType & VB_SIS301LV) {
if (pVBInfo->SetFlag & RPLLDIV2XO)
VCLKIndex = TVCLKBASE_315_25 + TVVCLKDIV2;
VCLKIndex = YPbPr525iVCLK_2;
else
VCLKIndex = TVCLKBASE_315_25 + TVVCLK;
} else { /* for CRT2 */
/* di+Ext_CRTVCLK */
VCLKIndex = XGI330_RefIndex[RefreshRateTableIndex].
Ext_CRTVCLK;
VCLKIndex &= IndexMask;
VCLKIndex = YPbPr525iVCLK;
}
} else if ((pVBInfo->LCDResInfo == Panel_800x600) ||
(pVBInfo->LCDResInfo == Panel_320x480)) { /* LVDS */
VCLKIndex = VCLK40; /* LVDSXlat1VCLK */
} else {
VCLKIndex = VCLK65_315 + 2; /* LVDSXlat2VCLK, LVDSXlat3VCLK */
} else if (pVBInfo->VBInfo & SetCRT2ToTV) {
if (pVBInfo->SetFlag & RPLLDIV2XO)
VCLKIndex = TVCLKBASE_315_25 + TVVCLKDIV2;
else
VCLKIndex = TVCLKBASE_315_25 + TVVCLK;
} else { /* for CRT2 */
/* di+Ext_CRTVCLK */
VCLKIndex = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
VCLKIndex &= IndexMask;
}

return VCLKIndex;
Expand Down

0 comments on commit 7ac54d0

Please sign in to comment.