diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2007-05-30 13:06:45 +0100 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2007-05-30 13:06:45 +0100 |
commit | fa877d7ff25c4ec45288e1fea70d4f5e1baf3ef3 (patch) | |
tree | 41eb09c944ef456268f94783b6506c8c8516251d | |
parent | 99eae8bea6724a24477375ad5b2d31cc4883cf6b (diff) |
Fix mode validation against the maximum X/Y values configured
at server startup, and not against the virtual X/Y parameters
as they can change.
This fixes an issue when canGrow is TRUE and modes get dropped
when using the virtual X/Y parameters.
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 88c31af58..d20a3a338 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1217,8 +1217,15 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int o; - if (maxX == 0 || maxY == 0) - xf86RandR12GetOriginalVirtualSize (scrn, &maxX, &maxY); + /* When canGrow was TRUE in the initial configuration we have to + * compare against the maximum values so that we don't drop modes. + * When canGrow was FALSE, the maximum values would have been clamped + * anyway. + */ + if (maxX == 0 || maxY == 0) { + maxX = config->maxWidth; + maxY = config->maxHeight; + } /* Elide duplicate modes before defaulting code uses them */ xf86PruneDuplicateMonitorModes (scrn->monitor); |