Blob Blame Raw
--- xorg-server-1.2.0/hw/xfree86/ddc/ddcProperty.c.maxpixclock	2007-01-22 22:13:15.000000000 -0500
+++ xorg-server-1.2.0/hw/xfree86/ddc/ddcProperty.c	2007-01-23 12:35:00.000000000 -0500
@@ -303,7 +303,7 @@
 {
     DisplayModePtr Modes = NULL, Mode;
     int i, clock;
-    Bool have_hsync = FALSE, have_vrefresh = FALSE;
+    Bool have_hsync = FALSE, have_vrefresh = FALSE, have_maxpixclock = FALSE;
     int preferred;
     
     if (!Monitor || !DDC)
@@ -332,6 +332,7 @@
     /* Skip EDID ranges if they were specified in the config file */
     have_hsync = (Monitor->nHsync != 0);
     have_vrefresh = (Monitor->nVrefresh != 0);
+    have_maxpixclock = (Monitor->maxPixClock != 0);
 
     /* Go through the detailed monitor sections */
     for (i = 0; i < DET_TIMINGS; i++)
@@ -366,7 +367,7 @@
 	    }
 
 	    clock = DDC->det_mon[i].section.ranges.max_clock * 1000;
-	    if (clock > Monitor->maxPixClock)
+	    if (!have_maxpixclock && clock > Monitor->maxPixClock)
 		Monitor->maxPixClock = clock;
 
             break;
--- xorg-server-1.2.0/hw/xfree86/common/xf86Mode.c.maxpixclock	2007-01-22 22:13:15.000000000 -0500
+++ xorg-server-1.2.0/hw/xfree86/common/xf86Mode.c	2007-01-23 12:33:41.000000000 -0500
@@ -1408,6 +1408,12 @@
 			 scrp->monitor->vrefresh[i].lo,
 			 scrp->monitor->vrefresh[i].hi);
 	}
+	if (scrp->monitor->maxPixClock) {
+	    xf86DrvMsg(scrp->scrnIndex, X_INFO,
+		       "%s: Using maximum pixel clock of %.2f MHz\n",
+		       scrp->monitor->id,
+		       (float)scrp->monitor->maxPixClock / 1000.0);
+	}
     }
 
     /*
--- xorg-server-1.2.0/hw/xfree86/common/xf86Config.c.maxpixclock	2007-01-22 22:13:15.000000000 -0500
+++ xorg-server-1.2.0/hw/xfree86/common/xf86Config.c	2007-01-23 12:33:41.000000000 -0500
@@ -2211,12 +2211,15 @@
 }
 
 typedef enum {
-    MON_REDUCEDBLANKING
+    MON_REDUCEDBLANKING,
+    MON_MAX_PIX_CLOCK,
 } MonitorValues;
 
 static OptionInfoRec MonitorOptions[] = {
   { MON_REDUCEDBLANKING,      "ReducedBlanking",        OPTV_BOOLEAN,
        {0}, FALSE },
+  { MON_MAX_PIX_CLOCK,	      "MaxPixClock",		OPTV_FREQ,
+       {0}, FALSE },
   { -1,                                NULL,                   OPTV_NONE,
        {0}, FALSE },
 };
@@ -2363,11 +2366,11 @@
 	    return FALSE;
     }
 
-    /* Check wether this Monitor accepts Reduced Blanking modelines */
     xf86ProcessOptions(-1, monitorp->options, MonitorOptions);
-
     xf86GetOptValBool(MonitorOptions, MON_REDUCEDBLANKING,
                       &monitorp->reducedblanking);
+    xf86GetOptValFreq(MonitorOptions, MON_MAX_PIX_CLOCK, OPTUNITS_KHZ,
+		       &monitorp->maxPixClock);
     return TRUE;
 }