xserver: Branch 'master'

Matthias Hopf mhopf at kemper.freedesktop.org
Thu Oct 11 10:00:11 PDT 2007


 hw/xfree86/modes/xf86Modes.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
diff-tree 45cc03726b49f6ad4afe6c3fb4ad65d1051928b4 (from 8825d36a38c76ff8faf409c853061be2bd33430d)
Author: Matthias Hopf <mhopf at suse.de>
Date:   Thu Oct 11 18:23:25 2007 +0200

    Make mode checking more tolerant like in pre-RandR times.

diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
index f49c292..9981789 100644
--- a/hw/xfree86/modes/xf86Modes.c
+++ b/hw/xfree86/modes/xf86Modes.c
@@ -389,8 +389,8 @@ xf86ValidateModesSync(ScrnInfoPtr pScrn,
 
 	bad = TRUE;
 	for (i = 0; i < mon->nHsync; i++) {
-	    if (xf86ModeHSync(mode) >= mon->hsync[i].lo &&
-		xf86ModeHSync(mode) <= mon->hsync[i].hi)
+	    if (xf86ModeHSync(mode) >= mon->hsync[i].lo * (1-SYNC_TOLERANCE) &&
+		xf86ModeHSync(mode) <= mon->hsync[i].hi * (1+SYNC_TOLERANCE))
 	    {
 		bad = FALSE;
 	    }
@@ -400,8 +400,8 @@ xf86ValidateModesSync(ScrnInfoPtr pScrn,
 
 	bad = TRUE;
 	for (i = 0; i < mon->nVrefresh; i++) {
-	    if (xf86ModeVRefresh(mode) >= mon->vrefresh[i].lo &&
-		xf86ModeVRefresh(mode) <= mon->vrefresh[i].hi)
+	    if (xf86ModeVRefresh(mode) >= mon->vrefresh[i].lo * (1-SYNC_TOLERANCE) &&
+		xf86ModeVRefresh(mode) <= mon->vrefresh[i].hi * (1+SYNC_TOLERANCE))
 	    {
 		bad = FALSE;
 	    }
@@ -434,7 +434,8 @@ xf86ValidateModesClocks(ScrnInfoPtr pScr
     for (mode = modeList; mode != NULL; mode = mode->next) {
 	Bool good = FALSE;
 	for (i = 0; i < n_ranges; i++) {
-	    if (mode->Clock >= min[i] && mode->Clock <= max[i]) {
+	    if (mode->Clock >= min[i] * (1-SYNC_TOLERANCE) &&
+		mode->Clock <= max[i] * (1+SYNC_TOLERANCE)) {
 		good = TRUE;
 		break;
 	    }


More information about the xorg-commit mailing list