In studying how the xserver handles undefined h/v sync rates
(e.g. ancient monitors that don't provide EDID or DDC), I noticed this
bit of code that doesn't appear to ever be executable.

Am I missing something, or can this code be safely dropped?  Or, what
is/was it supposed to do?

Bryce

diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c
index 522d3c2..33e61a0 100644
--- a/hw/xfree86/common/xf86Mode.c
+++ b/hw/xfree86/common/xf86Mode.c
@@ -1205,7 +1205,6 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
     ClockRangePtr cp;
     ClockRangesPtr storeClockRanges;
     double targetRefresh = 0.0;
-    int numTimings = 0;
     range hsync[MAX_HSYNC];
     range vrefresh[MAX_VREFRESH];
     Bool inferred_virtual = FALSE;
@@ -1248,17 +1247,9 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
 	const char *type = "";
 
 	if (scrp->monitor->nHsync <= 0) {
-	    if (numTimings > 0) {
-		scrp->monitor->nHsync = numTimings;
-		for (i = 0; i < numTimings; i++) {
-		    scrp->monitor->hsync[i].lo = hsync[i].lo;
-		    scrp->monitor->hsync[i].hi = hsync[i].hi;
-		}
-	    } else {
-		scrp->monitor->hsync[0].lo = 31.5;
-		scrp->monitor->hsync[0].hi = 37.9;
-		scrp->monitor->nHsync = 1;
-	    }
+            scrp->monitor->hsync[0].lo = 31.5;
+            scrp->monitor->hsync[0].hi = 37.9;
+            scrp->monitor->nHsync = 1;
 	    type = "default ";
 	}
 	for (i = 0; i < scrp->monitor->nHsync; i++) {
@@ -1277,17 +1268,9 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
 
 	type = "";
 	if (scrp->monitor->nVrefresh <= 0) {
-	    if (numTimings > 0) {
-		scrp->monitor->nVrefresh = numTimings;
-		for (i = 0; i < numTimings; i++) {
-		    scrp->monitor->vrefresh[i].lo = vrefresh[i].lo;
-		    scrp->monitor->vrefresh[i].hi = vrefresh[i].hi;
-		}
-	    } else {
-		scrp->monitor->vrefresh[0].lo = 50;
-		scrp->monitor->vrefresh[0].hi = 70;
-		scrp->monitor->nVrefresh = 1;
-	    }
+            scrp->monitor->vrefresh[0].lo = 50;
+            scrp->monitor->vrefresh[0].hi = 70;
+            scrp->monitor->nVrefresh = 1;
 	    type = "default ";
 	}
 	for (i = 0; i < scrp->monitor->nVrefresh; i++) {
_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to