Record the maximum dot clock of the monitor, and filter by it.
This commit is contained in:
parent
fa8ef71668
commit
d89fee68d0
|
@ -2201,6 +2201,7 @@ configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor)
|
|||
monitorp->widthmm = conf_monitor->mon_width;
|
||||
monitorp->heightmm = conf_monitor->mon_height;
|
||||
monitorp->reducedblanking = FALSE;
|
||||
monitorp->maxPixClock = 0;
|
||||
monitorp->options = conf_monitor->mon_option_lst;
|
||||
|
||||
/*
|
||||
|
|
|
@ -824,6 +824,9 @@ xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor)
|
|||
}
|
||||
}
|
||||
|
||||
if ((monitor->maxPixClock) && (mode->Clock > monitor->maxPixClock))
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
||||
return MODE_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -213,6 +213,7 @@ typedef struct {
|
|||
pointer options;
|
||||
pointer DDC;
|
||||
Bool reducedblanking; /* Allow CVT reduced blanking modes? */
|
||||
int maxPixClock; /* in kHz, like mode->Clock */
|
||||
} MonRec, *MonPtr;
|
||||
|
||||
/* the list of clock ranges */
|
||||
|
|
|
@ -296,7 +296,7 @@ void
|
|||
xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC)
|
||||
{
|
||||
DisplayModePtr Modes = NULL, Mode;
|
||||
int i;
|
||||
int i, clock;
|
||||
|
||||
if (!Monitor || !DDC)
|
||||
return;
|
||||
|
@ -339,6 +339,10 @@ xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC)
|
|||
Monitor->vrefresh[0].lo = DDC->det_mon[i].section.ranges.min_v;
|
||||
Monitor->vrefresh[0].hi = DDC->det_mon[i].section.ranges.max_v;
|
||||
|
||||
clock = DDC->det_mon[i].section.ranges.max_clock * 1000;
|
||||
if (clock > Monitor->maxPixClock)
|
||||
Monitor->maxPixClock = clock;
|
||||
|
||||
break;
|
||||
case DT:
|
||||
Mode = DDCModeFromDetailedTiming(scrnIndex,
|
||||
|
|
Loading…
Reference in New Issue