summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2009-10-03 14:46:52 -0300
committerMartin-Éric Racine <q-funk@iki.fi>2010-01-26 02:57:01 +0200
commit755b08bd59a5ff968040d657401c0779ba7828d0 (patch)
treea5a416d88271eed7849f4b35a0413abb0fe1555b
parent7f044dc2569ddf4328649d857023b7c418f9b1df (diff)
GX: refactory mode validation code to be easier to ready
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r--src/gx_driver.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/gx_driver.c b/src/gx_driver.c
index 7ff5418..1c25e1a 100644
--- a/src/gx_driver.c
+++ b/src/gx_driver.c
@@ -1412,7 +1412,7 @@ GXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags)
{
ScrnInfoPtr pScrni = xf86Screens[scrnIndex];
GeodeRec *pGeode = GEODEPTR(pScrni);
- int p, ret;
+ int p;
int custom = 0;
if (pGeode->Panel)
@@ -1422,23 +1422,24 @@ GXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags)
/* Use the durango lookup for !custom modes */
- if (!custom) {
- if (pGeode->Panel) {
- if (pMode->CrtcHDisplay > pGeode->PanelX ||
- pMode->CrtcVDisplay > pGeode->PanelY ||
- gfx_is_panel_mode_supported(pGeode->PanelX, pGeode->PanelY,
- pMode->CrtcHDisplay, pMode->CrtcVDisplay,
- pScrni->bitsPerPixel) < 0) {
-
- return MODE_BAD;
- }
- }
+ if (!custom && pGeode->Panel) {
+ if (pMode->CrtcHDisplay > pGeode->PanelX ||
+ pMode->CrtcVDisplay > pGeode->PanelY ||
+ gfx_is_panel_mode_supported(pGeode->PanelX,
+ pGeode->PanelY,
+ pMode->CrtcHDisplay,
+ pMode->CrtcVDisplay,
+ pScrni->bitsPerPixel) < 0) {
+
+ return MODE_BAD;
+ }
+ }
- ret = gfx_is_display_mode_supported(pMode->CrtcHDisplay,
- pMode->CrtcVDisplay,
- pScrni->bitsPerPixel, GeodeGetRefreshRate(pMode));
- if (ret < 0)
- return MODE_BAD;
+ if (gfx_is_display_mode_supported(pMode->CrtcHDisplay,
+ pMode->CrtcVDisplay,
+ pScrni->bitsPerPixel,
+ GeodeGetRefreshRate(pMode)) < 0) {
+ return MODE_BAD;
}
if (pMode->Flags & V_INTERLACE)