Make mode checking more tolerant like in pre-RandR times.
This commit is contained in:
parent
8825d36a38
commit
45cc03726b
|
@ -389,8 +389,8 @@ xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList,
|
||||||
|
|
||||||
bad = TRUE;
|
bad = TRUE;
|
||||||
for (i = 0; i < mon->nHsync; i++) {
|
for (i = 0; i < mon->nHsync; i++) {
|
||||||
if (xf86ModeHSync(mode) >= mon->hsync[i].lo &&
|
if (xf86ModeHSync(mode) >= mon->hsync[i].lo * (1-SYNC_TOLERANCE) &&
|
||||||
xf86ModeHSync(mode) <= mon->hsync[i].hi)
|
xf86ModeHSync(mode) <= mon->hsync[i].hi * (1+SYNC_TOLERANCE))
|
||||||
{
|
{
|
||||||
bad = FALSE;
|
bad = FALSE;
|
||||||
}
|
}
|
||||||
|
@ -400,8 +400,8 @@ xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList,
|
||||||
|
|
||||||
bad = TRUE;
|
bad = TRUE;
|
||||||
for (i = 0; i < mon->nVrefresh; i++) {
|
for (i = 0; i < mon->nVrefresh; i++) {
|
||||||
if (xf86ModeVRefresh(mode) >= mon->vrefresh[i].lo &&
|
if (xf86ModeVRefresh(mode) >= mon->vrefresh[i].lo * (1-SYNC_TOLERANCE) &&
|
||||||
xf86ModeVRefresh(mode) <= mon->vrefresh[i].hi)
|
xf86ModeVRefresh(mode) <= mon->vrefresh[i].hi * (1+SYNC_TOLERANCE))
|
||||||
{
|
{
|
||||||
bad = FALSE;
|
bad = FALSE;
|
||||||
}
|
}
|
||||||
|
@ -434,7 +434,8 @@ xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList,
|
||||||
for (mode = modeList; mode != NULL; mode = mode->next) {
|
for (mode = modeList; mode != NULL; mode = mode->next) {
|
||||||
Bool good = FALSE;
|
Bool good = FALSE;
|
||||||
for (i = 0; i < n_ranges; i++) {
|
for (i = 0; i < n_ranges; i++) {
|
||||||
if (mode->Clock >= min[i] && mode->Clock <= max[i]) {
|
if (mode->Clock >= min[i] * (1-SYNC_TOLERANCE) &&
|
||||||
|
mode->Clock <= max[i] * (1+SYNC_TOLERANCE)) {
|
||||||
good = TRUE;
|
good = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue