mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 23:24:50 +00:00
Staging: xgifb: Refactor XGI_GetCRT2ResInfo().
Use a goto to remove one level of indentation, fixing style warnings. Signed-off-by: Miguel Gómez <magomez@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f93173515f
commit
3339db8a0c
1 changed files with 35 additions and 34 deletions
|
@ -3263,46 +3263,47 @@ static void XGI_GetCRT2ResInfo(unsigned short ModeNo,
|
|||
if (modeflag & DoubleScanMode)
|
||||
yres *= 2;
|
||||
|
||||
if (pVBInfo->VBInfo & SetCRT2ToLCD) {
|
||||
if (pVBInfo->IF_DEF_LVDS == 0) {
|
||||
if (pVBInfo->LCDResInfo == Panel_1600x1200) {
|
||||
if (!(pVBInfo->LCDInfo & XGI_LCDVESATiming)) {
|
||||
if (yres == 1024)
|
||||
yres = 1056;
|
||||
}
|
||||
}
|
||||
if (!(pVBInfo->VBInfo & SetCRT2ToLCD))
|
||||
goto exit;
|
||||
|
||||
if (pVBInfo->LCDResInfo == Panel_1280x1024) {
|
||||
if (yres == 400)
|
||||
yres = 405;
|
||||
else if (yres == 350)
|
||||
yres = 360;
|
||||
|
||||
if (pVBInfo->LCDInfo & XGI_LCDVESATiming) {
|
||||
if (yres == 360)
|
||||
yres = 375;
|
||||
}
|
||||
}
|
||||
|
||||
if (pVBInfo->LCDResInfo == Panel_1024x768) {
|
||||
if (!(pVBInfo->LCDInfo & XGI_LCDVESATiming)) {
|
||||
if (!(pVBInfo->LCDInfo
|
||||
& LCDNonExpanding)) {
|
||||
if (yres == 350)
|
||||
yres = 357;
|
||||
else if (yres == 400)
|
||||
yres = 420;
|
||||
else if (yres == 480)
|
||||
yres = 525;
|
||||
}
|
||||
}
|
||||
if (pVBInfo->IF_DEF_LVDS == 0) {
|
||||
if (pVBInfo->LCDResInfo == Panel_1600x1200) {
|
||||
if (!(pVBInfo->LCDInfo & XGI_LCDVESATiming)) {
|
||||
if (yres == 1024)
|
||||
yres = 1056;
|
||||
}
|
||||
}
|
||||
|
||||
if (xres == 720)
|
||||
xres = 640;
|
||||
if (pVBInfo->LCDResInfo == Panel_1280x1024) {
|
||||
if (yres == 400)
|
||||
yres = 405;
|
||||
else if (yres == 350)
|
||||
yres = 360;
|
||||
|
||||
if (pVBInfo->LCDInfo & XGI_LCDVESATiming) {
|
||||
if (yres == 360)
|
||||
yres = 375;
|
||||
}
|
||||
}
|
||||
|
||||
if (pVBInfo->LCDResInfo == Panel_1024x768) {
|
||||
if (!(pVBInfo->LCDInfo & XGI_LCDVESATiming)) {
|
||||
if (!(pVBInfo->LCDInfo & LCDNonExpanding)) {
|
||||
if (yres == 350)
|
||||
yres = 357;
|
||||
else if (yres == 400)
|
||||
yres = 420;
|
||||
else if (yres == 480)
|
||||
yres = 525;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (xres == 720)
|
||||
xres = 640;
|
||||
|
||||
exit:
|
||||
pVBInfo->VGAHDE = xres;
|
||||
pVBInfo->HDE = xres;
|
||||
pVBInfo->VGAVDE = yres;
|
||||
|
|
Loading…
Reference in a new issue