From 8f3c69dcf17691f71bca7b0a2cd34f7788a97b8c Mon Sep 17 00:00:00 2001 From: Luc Verhaegen Date: Tue, 31 Jan 2006 13:04:02 +0000 Subject: [PATCH] Accept modes with less than 25% horizontal blanking again (you can push old gtf timing to below 25%), only stop cvt reduced blanking. Users should be free to blow up their monitors if they so choose. --- ChangeLog | 8 ++++++++ hw/xfree86/common/xf86Mode.c | 22 +++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index d9119d828..8d143597e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-01-31 Luc Verhaegen + + * hw/xfree86/common/xf86Mode.c: (xf86CheckModeForMonitor): + + Accept modes with less than 25% horizontal blanking again (you can + push old gtf timing to below 25%), only stop cvt reduced blanking. + Users should be free to blow up their monitors if they so choose. + 2006-01-30 Donnie Berkholz * GL/mesa/shader/slang/Makefile.am: diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c index 618f3f33e..bb8f4b1d1 100644 --- a/hw/xfree86/common/xf86Mode.c +++ b/hw/xfree86/common/xf86Mode.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xserver/xorg/hw/xfree86/common/xf86Mode.c,v 1.7 2005/07/03 08:53:42 daniels Exp $ */ +/* $XdotOrg: xserver/xorg/hw/xfree86/common/xf86Mode.c,v 1.8 2005/12/28 15:22:21 libv Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Mode.c,v 1.69 2003/10/08 14:58:28 dawes Exp $ */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. @@ -816,16 +816,20 @@ xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor) if (mode->Flags & V_INTERLACE) mode->CrtcVTotal = mode->VTotal |= 1; - /* Check wether this mode has acceptable blanking */ - if (((mode->HDisplay * 5 / 4) & ~0x07) > mode->HTotal) { - - /* Is this a CVT Reduced blanking mode? */ - if ((mode->HTotal - mode->HDisplay) != 160) - return MODE_HBLANK_NARROW; - + /* + * Usually, CVT normal blanking is never more than one character below 25%, + * but for low frequencies and weird ratios, you can get below that. + * When you go into the low frequencies with the gtf generator, of which + * normal CVT is a simplification, you almost always go below 25%. + * + * So if we see awkward blanking, then it's either directly CVT or GTF + * generated, or the user supposedly knows what he's doing. So we only stop + * reduced blanking here, as that might accidentally hit us. -- libv + */ + if (((mode->HTotal - mode->HDisplay) == 160) && + (((mode->HDisplay * 5 / 4) & ~0x07) > mode->HTotal)) if (!monitor->reducedblanking) return MODE_NO_REDUCED; - } return MODE_OK; }