Allow hsync and vsync ranges to be overridden independently again.
This commit is contained in:
parent
ced46e1777
commit
334f7db9f6
|
@ -297,6 +297,7 @@ xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC)
|
||||||
{
|
{
|
||||||
DisplayModePtr Modes = NULL, Mode;
|
DisplayModePtr Modes = NULL, Mode;
|
||||||
int i, clock;
|
int i, clock;
|
||||||
|
Bool have_hsync = FALSE, have_vrefresh = FALSE;
|
||||||
|
|
||||||
if (!Monitor || !DDC)
|
if (!Monitor || !DDC)
|
||||||
return;
|
return;
|
||||||
|
@ -319,25 +320,41 @@ xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC)
|
||||||
Mode = DDCModesFromStandardTiming(scrnIndex, DDC->timings2);
|
Mode = DDCModesFromStandardTiming(scrnIndex, DDC->timings2);
|
||||||
Modes = xf86ModesAdd(Modes, Mode);
|
Modes = xf86ModesAdd(Modes, Mode);
|
||||||
|
|
||||||
|
/* Skip EDID ranges if they were specified in the config file */
|
||||||
|
have_hsync = (Monitor->nHsync != 0);
|
||||||
|
have_vrefresh = (Monitor->nVrefresh != 0);
|
||||||
|
|
||||||
/* Go through the detailed monitor sections */
|
/* Go through the detailed monitor sections */
|
||||||
for (i = 0; i < DET_TIMINGS; i++)
|
for (i = 0; i < DET_TIMINGS; i++)
|
||||||
switch (DDC->det_mon[i].type) {
|
switch (DDC->det_mon[i].type) {
|
||||||
case DS_RANGES:
|
case DS_RANGES:
|
||||||
if (Monitor->nHsync && Monitor->nVrefresh) {
|
if (!have_hsync) {
|
||||||
xf86DrvMsg(scrnIndex, X_INFO, "Ignoring EDID Ranges. Using"
|
if (!Monitor->nHsync)
|
||||||
" configured ranges.\n");
|
xf86DrvMsg(scrnIndex, X_INFO,
|
||||||
break;
|
"Using EDID range info for horizontal sync\n");
|
||||||
|
Monitor->hsync[Monitor->nHsync].lo =
|
||||||
|
DDC->det_mon[i].section.ranges.min_h;
|
||||||
|
Monitor->hsync[Monitor->nHsync].hi =
|
||||||
|
DDC->det_mon[i].section.ranges.max_h;
|
||||||
|
Monitor->nHsync++;
|
||||||
|
} else {
|
||||||
|
xf86DrvMsg(scrnIndex, X_INFO,
|
||||||
|
"Using hsync ranges from config file\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
xf86DrvMsg(scrnIndex, X_INFO, "Using EDID ranges info for Monitor"
|
if (!have_vrefresh) {
|
||||||
" timing.\n");
|
if (!Monitor->nVrefresh)
|
||||||
Monitor->nHsync = 1;
|
xf86DrvMsg(scrnIndex, X_INFO,
|
||||||
Monitor->hsync[0].lo = DDC->det_mon[i].section.ranges.min_h;
|
"Using EDID range info for vertical refresh\n");
|
||||||
Monitor->hsync[0].hi = DDC->det_mon[i].section.ranges.max_h;
|
Monitor->vrefresh[Monitor->nVrefresh].lo =
|
||||||
|
DDC->det_mon[i].section.ranges.min_v;
|
||||||
Monitor->nVrefresh = 1;
|
Monitor->vrefresh[Monitor->nVrefresh].hi =
|
||||||
Monitor->vrefresh[0].lo = DDC->det_mon[i].section.ranges.min_v;
|
DDC->det_mon[i].section.ranges.max_v;
|
||||||
Monitor->vrefresh[0].hi = DDC->det_mon[i].section.ranges.max_v;
|
Monitor->nVrefresh++;
|
||||||
|
} else {
|
||||||
|
xf86DrvMsg(scrnIndex, X_INFO,
|
||||||
|
"Using vrefresh ranges from config file\n");
|
||||||
|
}
|
||||||
|
|
||||||
clock = DDC->det_mon[i].section.ranges.max_clock * 1000;
|
clock = DDC->det_mon[i].section.ranges.max_clock * 1000;
|
||||||
if (clock > Monitor->maxPixClock)
|
if (clock > Monitor->maxPixClock)
|
||||||
|
|
Loading…
Reference in New Issue