xserver: Branch 'master'
Adam Jackson
ajax at kemper.freedesktop.org
Tue Jul 10 11:41:56 PDT 2007
hw/xfree86/common/xf86Config.c | 11 ++++++-----
hw/xfree86/common/xf86Mode.c | 6 ++++++
hw/xfree86/modes/xf86EdidModes.c | 5 +++--
3 files changed, 15 insertions(+), 7 deletions(-)
New commits:
diff-tree e316fa59fea8b7b18cdf3a227890351a9567ec65 (from 161624a5a45808fd56141dc2c64be729944f03ed)
Author: Adam Jackson <ajax at benzedrine.nwnk.net>
Date: Tue Jul 10 14:20:55 2007 -0400
Add per-monitor config file option for maximum pixel clock.
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 4bd93b8..b5b4927 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1,5 +1,3 @@
-
-
/*
* Loosely based on code bearing the following copyright:
*
@@ -1947,12 +1945,15 @@ configScreen(confScreenPtr screenp, XF86
}
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 },
};
@@ -2099,11 +2100,11 @@ configMonitor(MonPtr monitorp, XF86ConfM
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;
}
diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c
index 0c25c96..7fcce10 100644
--- a/hw/xfree86/common/xf86Mode.c
+++ b/hw/xfree86/common/xf86Mode.c
@@ -1472,6 +1472,12 @@ xf86ValidateModes(ScrnInfoPtr scrp, Disp
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);
+ }
}
/*
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 2232992..3f67ef3 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -427,7 +427,7 @@ xf86DDCMonitorSet(int scrnIndex, MonPtr
{
DisplayModePtr Modes = NULL, Mode;
int i, clock;
- Bool have_hsync = FALSE, have_vrefresh = FALSE;
+ Bool have_hsync = FALSE, have_vrefresh = FALSE, have_maxpixclock = FALSE;
if (!Monitor || !DDC)
return;
@@ -447,6 +447,7 @@ xf86DDCMonitorSet(int scrnIndex, MonPtr
/* 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++) {
@@ -481,7 +482,7 @@ xf86DDCMonitorSet(int scrnIndex, MonPtr
}
clock = DDC->det_mon[i].section.ranges.max_clock * 1000;
- if (clock > Monitor->maxPixClock)
+ if (!have_maxpixclock && clock > Monitor->maxPixClock)
Monitor->maxPixClock = clock;
break;
More information about the xorg-commit
mailing list