Index: configure.ac =================================================================== RCS file: /cvs/xorg/xserver/xorg/configure.ac,v retrieving revision 1.149 diff -u -r1.149 configure.ac --- configure.ac 23 Dec 2005 07:40:44 -0000 1.149 +++ configure.ac 26 Dec 2005 14:56:52 -0000 @@ -1447,6 +1447,7 @@ hw/xfree86/xf8_32bpp/Makefile hw/xfree86/xf8_32wid/Makefile hw/xfree86/utils/Makefile +hw/xfree86/utils/cvt/Makefile hw/xfree86/utils/gtf/Makefile hw/xfree86/utils/ioport/Makefile hw/xfree86/utils/kbd_mode/Makefile Index: hw/xfree86/common/xf86Config.c =================================================================== RCS file: /cvs/xorg/xserver/xorg/hw/xfree86/common/xf86Config.c,v retrieving revision 1.21 diff -u -r1.21 xf86Config.c --- hw/xfree86/common/xf86Config.c 20 Dec 2005 21:34:21 -0000 1.21 +++ hw/xfree86/common/xf86Config.c 26 Dec 2005 14:56:53 -0000 @@ -505,7 +505,7 @@ { #ifdef XFree86LOADER char **ret; - char *subdirs[] = { dirname, NULL }; + const char *subdirs[] = { dirname, NULL }; static const char *patlist[] = {"(.*)_drv\\.so", "(.*)_drv\\.o", NULL}; ret = LoaderListDirs(subdirs, patlist); @@ -2139,6 +2139,17 @@ return TRUE; } +typedef enum { + MON_REDUCEDBLANKING +} MonitorValues; + +static OptionInfoRec MonitorOptions[] = { + { MON_REDUCEDBLANKING, "ReducedBlanking", OPTV_BOOLEAN, + {0}, FALSE }, + { -1, NULL, OPTV_NONE, + {0}, FALSE }, +}; + static Bool configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor) { @@ -2160,6 +2171,7 @@ monitorp->gamma = zeros; monitorp->widthmm = conf_monitor->mon_width; monitorp->heightmm = conf_monitor->mon_height; + monitorp->reducedblanking = FALSE; monitorp->options = conf_monitor->mon_option_lst; /* @@ -2279,6 +2291,11 @@ return FALSE; } + /* Check wether this Monitor accepts Reduced Blanking modelines */ + xf86ProcessOptions(-1, monitorp->options, MonitorOptions); + + xf86GetOptValBool(MonitorOptions, MON_REDUCEDBLANKING, + &monitorp->reducedblanking); return TRUE; } @@ -2452,14 +2469,14 @@ } #endif +/* Extension enable/disable in miinitext.c */ +extern Bool EnableDisableExtension(char *name, Bool enable); + static Bool configExtensions(XF86ConfExtensionsPtr conf_ext) { XF86OptionPtr o; - /* Extension enable/disable in miinitext.c */ - extern Bool EnableDisableExtension(char *name, Bool enable); - if (conf_ext && conf_ext->ext_option_lst) { for (o = conf_ext->ext_option_lst; o; o = xf86NextOption(o)) { char *name = xf86OptionName(o); @@ -2673,7 +2690,7 @@ scanptr = xf86ConfigLayout.screens->screen->device->busID; } if (scanptr) { - int bus, device, func, stroffset = 0; + int bus, device, func; if (strncmp(scanptr, "PCI:", 4) != 0) { xf86Msg(X_WARNING, "Bus types other than PCI not yet isolable.\n" "\tIgnoring IsolateDevice option.\n"); Index: hw/xfree86/common/xf86Mode.c =================================================================== RCS file: /cvs/xorg/xserver/xorg/hw/xfree86/common/xf86Mode.c,v retrieving revision 1.7 diff -u -r1.7 xf86Mode.c --- hw/xfree86/common/xf86Mode.c 3 Jul 2005 08:53:42 -0000 1.7 +++ hw/xfree86/common/xf86Mode.c 26 Dec 2005 14:56:53 -0000 @@ -165,6 +165,8 @@ return "all modes must have the same height"; case MODE_ONE_SIZE: return "all modes must have the same resolution"; + case MODE_NO_REDUCED: + return "monitor doesn't support reduced blanking"; case MODE_BAD: return "unknown reason"; case MODE_ERROR: @@ -814,6 +816,17 @@ 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; + + if (!monitor->reducedblanking) + return MODE_NO_REDUCED; + } + return MODE_OK; } Index: hw/xfree86/common/xf86str.h =================================================================== RCS file: /cvs/xorg/xserver/xorg/hw/xfree86/common/xf86str.h,v retrieving revision 1.10 diff -u -r1.10 xf86str.h --- hw/xfree86/common/xf86str.h 30 Oct 2005 17:38:49 -0000 1.10 +++ hw/xfree86/common/xf86str.h 26 Dec 2005 14:56:54 -0000 @@ -115,6 +115,7 @@ MODE_ONE_WIDTH, /* only one width is supported */ MODE_ONE_HEIGHT, /* only one height is supported */ MODE_ONE_SIZE, /* only one resolution is supported */ + MODE_NO_REDUCED, /* monitor doesn't accept reduced blanking */ MODE_BAD = -2, /* unspecified reason */ MODE_ERROR = -1 /* error condition */ } ModeStatus; @@ -206,6 +207,7 @@ int heightmm; pointer options; pointer DDC; + Bool reducedblanking; /* Allow CVT reduced blanking modes? */ } MonRec, *MonPtr; /* the list of clock ranges */ Index: hw/xfree86/utils/Makefile.am =================================================================== RCS file: /cvs/xorg/xserver/xorg/hw/xfree86/utils/Makefile.am,v retrieving revision 1.4 diff -u -r1.4 Makefile.am --- hw/xfree86/utils/Makefile.am 4 Oct 2005 00:43:16 -0000 1.4 +++ hw/xfree86/utils/Makefile.am 26 Dec 2005 14:56:54 -0000 @@ -1,5 +1,6 @@ SUBDIRS = \ gtf \ + cvt \ ioport \ kbd_mode \ pcitweak \