diff options
author | Adam Jackson <ajax@redhat.com> | 2009-07-16 10:44:24 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2009-07-17 15:03:56 -0400 |
commit | 8868bb4131be25340bf65ec61b998d353965bab6 (patch) | |
tree | ea1725b15d4553d2e8ef7639ef1cd793c15f14f3 | |
parent | 453ee39bc6a6b46e6cda11512cfcd431ba32a4b7 (diff) |
randr: Un-duplicate the reduced blanking check.
-rw-r--r-- | hw/xfree86/modes/xf86Modes.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c index 0ea6c818b..d105b48ab 100644 --- a/hw/xfree86/modes/xf86Modes.c +++ b/hw/xfree86/modes/xf86Modes.c @@ -530,17 +530,9 @@ xf86ModeIsReduced(const DisplayModeRec *mode) void xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList) { - DisplayModePtr mode; - - for (mode = modeList; mode != NULL; mode = mode->next) { - /* gratuitous duplication from pre-randr validation code */ - if ((((mode->HDisplay * 5 / 4) & ~0x07) > mode->HTotal) && - ((mode->HTotal - mode->HDisplay) == 160) && - ((mode->HSyncEnd - mode->HDisplay) == 80) && - ((mode->HSyncEnd - mode->HSyncStart) == 32) && - ((mode->VSyncStart - mode->VDisplay) == 3)) - mode->status = MODE_NO_REDUCED; - } + for (; modeList != NULL; modeList = modeList->next) + if (xf86ModeIsReduced(modeList)) + modeList->status = MODE_NO_REDUCED; } /** |