diff options
author | marha <marha@users.sourceforge.net> | 2009-11-16 13:46:01 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-11-16 13:46:01 +0000 |
commit | 578938f1cdd5a06dd6fa28167d575ec980322a5d (patch) | |
tree | e31cf77fab7cc6e005b0e726e7951d7eef79550f /xorg-server/hw/xfree86/common/xf86Mode.c | |
parent | 0032f9b66d63a4b1c5222edb8603fb60da379fb0 (diff) | |
download | vcxsrv-578938f1cdd5a06dd6fa28167d575ec980322a5d.tar.gz vcxsrv-578938f1cdd5a06dd6fa28167d575ec980322a5d.tar.bz2 vcxsrv-578938f1cdd5a06dd6fa28167d575ec980322a5d.zip |
Update to git master branch of xserver.
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Mode.c')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Mode.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Mode.c b/xorg-server/hw/xfree86/common/xf86Mode.c index 0e43946c5..4a948d752 100644 --- a/xorg-server/hw/xfree86/common/xf86Mode.c +++ b/xorg-server/hw/xfree86/common/xf86Mode.c @@ -249,6 +249,15 @@ xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges) } } +static Bool +modeInClockRange(ClockRangePtr cp, DisplayModePtr p) +{ + return ((p->Clock >= cp->minClock) && + (p->Clock <= cp->maxClock) && + (cp->interlaceAllowed || !(p->Flags & V_INTERLACE)) && + (cp->doubleScanAllowed || + ((p->VScan <= 1) && !(p->Flags & V_DBLSCAN)))); +} /* * xf86FindClockRangeForMode() [... like the name says ...] @@ -259,12 +268,7 @@ xf86FindClockRangeForMode(ClockRangePtr clockRanges, DisplayModePtr p) ClockRangePtr cp; for (cp = clockRanges; ; cp = cp->next) - if (!cp || - ((p->Clock >= cp->minClock) && - (p->Clock <= cp->maxClock) && - (cp->interlaceAllowed || !(p->Flags & V_INTERLACE)) && - (cp->doubleScanAllowed || - ((p->VScan <= 1) && !(p->Flags & V_DBLSCAN))))) + if (!cp || modeInClockRange(cp, p)) return cp; } @@ -979,11 +983,7 @@ xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags) if (scrp->progClock) { /* Check clock is in range */ for (cp = scrp->clockRanges; cp != NULL; cp = cp->next) { - if ((cp->minClock <= mode->Clock) && - (cp->maxClock >= mode->Clock) && - (cp->interlaceAllowed || !(mode->Flags & V_INTERLACE)) && - (cp->doubleScanAllowed || - ((!(mode->Flags & V_DBLSCAN)) && (mode->VScan <= 1)))) + if (modeInClockRange(cp, mode)) break; } if (cp == NULL) { @@ -999,12 +999,7 @@ xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags) status = MODE_CLOCK_RANGE; /* Check clock is in range */ for (cp = scrp->clockRanges; cp != NULL; cp = cp->next) { - if ((cp->minClock <= mode->Clock) && - (cp->maxClock >= mode->Clock) && - (cp->interlaceAllowed || !(mode->Flags & V_INTERLACE)) && - (cp->doubleScanAllowed || - ((!(mode->Flags & V_DBLSCAN)) && (mode->VScan <= 1)))) { - + if (modeInClockRange(cp, mode)) { /* * Clock is in range, so if it is not a programmable clock, * find a matching clock. |