aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2013-02-08 17:03:45 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-02-08 18:39:58 -0500
commita8b35290373c2505c530a06887b1de92b3f43738 (patch)
treea2f006dbef8d5fb2f2566c9c176e1cb8b93d60c7
parent1b149edfa3496914d6b73a949dc03777ba172c88 (diff)
staging: xgifb: XGI_GetTVInfo(): delete IF_DEF_LVDS checks
This function is never called when pVBInfo->IF_DEF_LVDS is true, so we can remove checks and reduce complexity. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/xgifb/vb_setmode.c47
1 files changed, 19 insertions, 28 deletions
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index 9d7ec1832944..faa25b9218c2 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -2137,10 +2137,8 @@ static void XGI_GetTVInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
2137 TVSetNTSCJ | 2137 TVSetNTSCJ |
2138 TVSetPAL); 2138 TVSetPAL);
2139 2139
2140 if (pVBInfo->IF_DEF_LVDS == 0) { 2140 if (pVBInfo->VBInfo & SetCRT2ToSCART)
2141 if (pVBInfo->VBInfo & SetCRT2ToSCART) 2141 tempbx |= TVSetPAL;
2142 tempbx |= TVSetPAL;
2143 }
2144 2142
2145 if (pVBInfo->IF_DEF_YPbPr == 1) { 2143 if (pVBInfo->IF_DEF_YPbPr == 1) {
2146 if (pVBInfo->VBInfo & SetCRT2ToYPbPr525750) { 2144 if (pVBInfo->VBInfo & SetCRT2ToYPbPr525750) {
@@ -2162,33 +2160,26 @@ static void XGI_GetTVInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
2162 tempbx = tempbx | TVSetHiVision | TVSetPAL; 2160 tempbx = tempbx | TVSetHiVision | TVSetPAL;
2163 } 2161 }
2164 2162
2165 if (pVBInfo->IF_DEF_LVDS == 0) { /* shampoo */ 2163 if ((pVBInfo->VBInfo & SetInSlaveMode) &&
2166 if ((pVBInfo->VBInfo & SetInSlaveMode) && 2164 (!(pVBInfo->VBInfo & SetNotSimuMode)))
2167 (!(pVBInfo->VBInfo & SetNotSimuMode))) 2165 tempbx |= TVSimuMode;
2168 tempbx |= TVSimuMode;
2169 2166
2170 if (!(tempbx & TVSetPAL) && 2167 if (!(tempbx & TVSetPAL) && (modeflag > 13) && (resinfo == 8))
2171 (modeflag > 13) && 2168 /* NTSC 1024x768, */
2172 (resinfo == 8)) /* NTSC 1024x768, */ 2169 tempbx |= NTSC1024x768;
2173 tempbx |= NTSC1024x768;
2174 2170
2175 tempbx |= RPLLDIV2XO; 2171 tempbx |= RPLLDIV2XO;
2176 2172
2177 if (pVBInfo->VBInfo & SetCRT2ToHiVision) { 2173 if (pVBInfo->VBInfo & SetCRT2ToHiVision) {
2178 if (pVBInfo->VBInfo & SetInSlaveMode) 2174 if (pVBInfo->VBInfo & SetInSlaveMode)
2179 tempbx &= (~RPLLDIV2XO); 2175 tempbx &= (~RPLLDIV2XO);
2180 } else if (tempbx & 2176 } else if (tempbx & (TVSetYPbPr525p | TVSetYPbPr750p)) {
2181 (TVSetYPbPr525p | TVSetYPbPr750p)) { 2177 tempbx &= (~RPLLDIV2XO);
2182 tempbx &= (~RPLLDIV2XO); 2178 } else if (!(pVBInfo->VBType & (VB_SIS301B | VB_SIS302B |
2183 } else if (!(pVBInfo->VBType & 2179 VB_SIS301LV | VB_SIS302LV |
2184 (VB_SIS301B | 2180 VB_XGI301C))) {
2185 VB_SIS302B | 2181 if (tempbx & TVSimuMode)
2186 VB_SIS301LV | 2182 tempbx &= (~RPLLDIV2XO);
2187 VB_SIS302LV |
2188 VB_XGI301C))) {
2189 if (tempbx & TVSimuMode)
2190 tempbx &= (~RPLLDIV2XO);
2191 }
2192 } 2183 }
2193 } 2184 }
2194 pVBInfo->TVInfo = tempbx; 2185 pVBInfo->TVInfo = tempbx;