[arch-commits] Commit in xorg-server/repos/extra-i686 (7 files)

Jan de Groot jgc at archlinux.org
Sun Apr 5 13:16:44 UTC 2009


    Date: Sunday, April 5, 2009 @ 09:16:44
  Author: jgc
Revision: 33878

Add patch to fix xsync idletime calculation, which triggered 100% CPU load on one core with gnome-session 2.26.0
Other patches are used to build against libxfont 1.4.0.
All patches backported from the server-1.6 branch.

Added:
  xorg-server/repos/extra-i686/disable-loadable-fontrenderer.patch
  xorg-server/repos/extra-i686/libxfont-1.4.0-buildfix.patch
  xorg-server/repos/extra-i686/remove-NOFONTSERVERACCESS.patch
  xorg-server/repos/extra-i686/remove-xprintism.patch
  xorg-server/repos/extra-i686/xsync-fix-idletime.patch
Modified:
  xorg-server/repos/extra-i686/PKGBUILD
Deleted:
  xorg-server/repos/extra-i686/001_fedora_extramodes.patch

-------------------------------------+
 001_fedora_extramodes.patch         |   85 -----
 PKGBUILD                            |   41 ++
 disable-loadable-fontrenderer.patch |  520 ++++++++++++++++++++++++++++++++++
 libxfont-1.4.0-buildfix.patch       |   24 +
 remove-NOFONTSERVERACCESS.patch     |   49 +++
 remove-xprintism.patch              |   74 ++++
 xsync-fix-idletime.patch            |  107 ++++++
 7 files changed, 805 insertions(+), 95 deletions(-)

Deleted: 001_fedora_extramodes.patch
===================================================================
--- 001_fedora_extramodes.patch	2009-04-05 10:46:06 UTC (rev 33877)
+++ 001_fedora_extramodes.patch	2009-04-05 13:16:44 UTC (rev 33878)
@@ -1,85 +0,0 @@
-From: Adam Jackson <ajax at redhat.com>
-Date: Sun, 28 Oct 2007 09:37:52 +0100
-Subject: [PATCH] Fedora extra modes list
-
----
-Index: xorg-server/hw/xfree86/common/extramodes
-===================================================================
---- xorg-server.orig/hw/xfree86/common/extramodes
-+++ xorg-server/hw/xfree86/common/extramodes
-@@ -3,16 +3,75 @@
- //
- // $XFree86: xc/programs/Xserver/hw/xfree86/etc/extramodes,v 1.5 2002/06/05 19:43:05 dawes Exp $
- //
-+// NOTE:  Please keep all video modes sorted in order of X res, then Y res for
-+//        ease of maintenance and readability.
- 
- # 832x624 @ 75Hz (74.55Hz) (fix if the official/Apple spec is different) hsync: 49.725kHz
- ModeLine "832x624" 57.284 832  864  928 1152  624  625  628  667 -Hsync -Vsync
- 
-+# 1152x864 @ 60.00 Hz (GTF) hsync: 53.70 kHz; pclk: 81.62 MHz
-+Modeline "1152x864"  81.62  1152 1216 1336 1520  864 865 868 895  -HSync +Vsync
-+
-+# 1152x864 @ 70.00 Hz (GTF) hsync: 63.00 kHz; pclk: 96.77 MHz
-+Modeline "1152x864"  96.77  1152 1224 1344 1536  864 865 868 900  -HSync +Vsync
-+
-+# 1152x864 @ 75.00 Hz (GTF) hsync: 67.65 kHz; pclk: 104.99 MHz
-+Modeline "1152x864"  104.99  1152 1224 1352 1552  864 865 868 902  -HSync +Vsync
-+
-+# 1152x864 @ 85.00 Hz (GTF) hsync: 77.10 kHz; pclk: 119.65 MHz
-+Modeline "1152x864"  119.65  1152 1224 1352 1552  864 865 868 907  -HSync +Vsync
-+
-+# 1152x864 @ 85Hz (Red Hat custom modeline)
-+ModeLine "1152x864"  121.5 1152 1216 1344 1568    864  865  868  911 +hsync -vsync
-+
-+# 1152x864 @ 100.00 Hz (GTF) hsync: 91.50 kHz; pclk: 143.47 MHz
-+Modeline "1152x864"  143.47  1152 1232 1360 1568  864 865 868 915  -HSync +Vsync
-+
-+# 1360x768 59.96 Hz (CVT) hsync: 47.37 kHz; pclk: 72.00 MHz
-+Modeline "1360x768"   72.00  1360 1408 1440 1520  768 771 781 790 +hsync -vsync
-+
-+# 1360x768 59.80 Hz (CVT) hsync: 47.72 kHz; pclk: 84.75 MHz
-+Modeline "1360x768"   84.75  1360 1432 1568 1776  768 771 781 798 -hsync +vsync
-+
- # 1400x1050 @ 60Hz (VESA GTF) hsync: 65.5kHz
- ModeLine "1400x1050" 122.0 1400 1488 1640 1880   1050 1052 1064 1082 +hsync +vsync
- 
-+# 1400x1050 @ 70.00 Hz (GTF) hsync: 76.51 kHz; pclk: 145.06 MHz
-+Modeline "1400x1050"  145.06  1400 1496 1648 1896  1050 1051 1054 1093  -HSync +Vsync
-+
- # 1400x1050 @ 75Hz (VESA GTF) hsync: 82.2kHz
- ModeLine "1400x1050" 155.8 1400 1464 1784 1912   1050 1052 1064 1090 +hsync +vsync
- 
-+# 1400x1050 @ 85.00 Hz (GTF) hsync: 93.76 kHz; pclk: 179.26 MHz
-+Modeline "1400x1050"  179.26  1400 1504 1656 1912  1050 1051 1054 1103  -HSync +Vsync
-+
-+# 1440x900 @ 60.00 Hz (CVT) field rate 59.89 Hz; hsync: 55.93 kHz; pclk: 106.50 MHz
-+Modeline "1440x900"  106.50  1440 1520 1672 1904  900 903 909 934  -HSync +Vsync
-+
-+# 1600x1024 for SGI 1600 SW
-+ModeLine "1600x1024" 103.125 1600 1600 1656 1664 1024 1024 1029 1030 +Hsync +Vsync
-+
-+# 1680x1050 59.88 Hz (CVT 1.76MA-R) hsync: 64.67 kHz; pclk: 119.00 MHz
-+Modeline "1680x1050"  119.00  1680 1728 1760 1840  1050 1053 1059 1080 +hsync -vsync
-+
-+# 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz
-+Modeline "1680x1050"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync
-+
-+# 1680x1050 69.88 Hz (CVT) hsync: 76.58 kHz; pclk: 174.00 MHz
-+Modeline "1680x1050"  174.00  1680 1800 1976 2272  1050 1053 1059 1096 -hsync +vsync
-+
-+# 1680x1050 74.89 Hz (CVT 1.76MA) hsync: 82.31 kHz; pclk: 187.00 MHz
-+Modeline "1680x1050"  187.00  1680 1800 1976 2272  1050 1053 1059 1099 -hsync +vsync
-+
-+# 1680x1050 84.94 Hz (CVT 1.76MA) hsync: 93.86 kHz; pclk: 214.75 MHz
-+Modeline "1680x1050"  214.75  1680 1808 1984 2288  1050 1053 1059 1105 -hsync +vsync
-+
-+# 1920x1080 59.93 Hz (CVT 2.07M9-R) hsync: 66.59 kHz; pclk: 138.50 MHz
-+Modeline "1920x1080"  138.50  1920 1968 2000 2080  1080 1083 1088 1111 +hsync -vsync
-+
-+# 1920x1200 59.95 Hz (CVT 2.30MA-R) hsync: 74.04 kHz; pclk: 154.00 MHz
-+Modeline "1920x1200"  154.00  1920 1968 2000 2080  1200 1203 1209 1235 +hsync -vsync
-+
- # 1920x1440 @ 85Hz (VESA GTF) hsync: 128.5kHz
- Modeline "1920x1440" 341.35  1920 2072 2288 2656  1440 1441 1444 1512 -hsync +vsync
- 

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-04-05 10:46:06 UTC (rev 33877)
+++ PKGBUILD	2009-04-05 13:16:44 UTC (rev 33878)
@@ -4,38 +4,43 @@
 
 pkgname=xorg-server
 pkgver=1.5.3
-pkgrel=4
+pkgrel=5
 pkgdesc="X.Org X servers"
 arch=('i686' 'x86_64')
 license=('custom')
 url="http://xorg.freedesktop.org"
-depends=('libx11>=1.1.5' 'libxkbui>=1.0.2' 'libgl' 'libxfont>=1.3.3' 'openssl>=0.9.8h' 'libxxf86misc>=1.0.1' 'libpciaccess>=0.10.5' 'libxv>=1.0.4' 'libxaw>=1.0.4' 'pixman>=0.11.10' 'hal>=0.5.11' 'xcursor-themes' 'xkeyboard-config>=1.3' 'xorg-server-utils' 'xorg-utils' 'xorg-fonts-misc' 'xbitmaps' 'libdrm>=2.3.1' 'diffutils' 'xf86-input-evdev')
-makedepends=('glproto>=1.4.9' 'xf86driproto>=2.0.4' 'mesa>=7.2' 'randrproto>=1.2.2' 'renderproto>=0.9.3' 'scrnsaverproto>=1.1.0' 'fontsproto>=2.0.2' 'videoproto>=2.2.2' 'compositeproto>=0.4' 'trapproto>=3.4.3' 'resourceproto>=1.0.2' 'xineramaproto>=1.1.2' 'evieext>=1.0.2' 'libxkbfile>=1.0.5' 'libxmu>=1.0.4' 'libxpm>=3.5.7' 'libxxf86dga>=1.0.2' 'inputproto>=1.4.4' 'xcmiscproto>=1.1.2' 'bigreqsproto' 'libdrm=2.3.1' 'xtrans')
+depends=('libx11>=1.2' 'libxkbui>=1.0.2' 'libgl' 'libxfont>=1.4.0' 'openssl>=0.9.8k' 'libxxf86misc>=1.0.1' 'libpciaccess>=0.10.5' 'libxv>=1.0.4' 'libxaw>=1.0.5' 'pixman>=0.14.0' 'hal>=0.5.11' 'xcursor-themes' 'xkeyboard-config>=1.5' 'xorg-server-utils' 'xorg-utils' 'xorg-fonts-misc' 'xbitmaps' 'libdrm>=2.3.1' 'diffutils' 'xf86-input-evdev')
+makedepends=('glproto>=1.4.9' 'xf86driproto>=2.0.4' 'mesa>=7.2' 'randrproto>=1.2.2' 'renderproto>=0.9.3' 'scrnsaverproto>=1.1.0' 'fontsproto>=2.0.2' 'videoproto>=2.2.2' 'compositeproto>=0.4' 'trapproto>=3.4.3' 'resourceproto>=1.0.2' 'xineramaproto>=1.1.2' 'evieext>=1.0.2' 'libxkbfile>=1.0.5' 'libxmu>=1.0.4' 'libxpm>=3.5.7' 'libxxf86dga>=1.0.2' 'inputproto>=1.5.0' 'xcmiscproto>=1.1.2' 'bigreqsproto' 'libdrm=2.3.1' 'xtrans')
 options=('!libtool')
 provides=('x-server')
 groups=('xorg')
 install=xorg-server.install
 source=(${url}/releases/individual/xserver/${pkgname}-${pkgver}.tar.bz2
 	xserver-1.5-branch-4970d.patch
-	001_fedora_extramodes.patch
 	xorg-redhat-die-ugly-pattern-die-die-die.patch
 	xserver-1.5.0-force-SwitchCoreKeyboard-for-evdev.patch
-	xserver-1.5.3-AEI-on-by-default.patch)
+	xserver-1.5.3-AEI-on-by-default.patch
+	xsync-fix-idletime.patch
+	libxfont-1.4.0-buildfix.patch
+	disable-loadable-fontrenderer.patch
+	remove-NOFONTSERVERACCESS.patch
+	remove-xprintism.patch)
 md5sums=('308971036e25250e7fe3cccfd5a120f8'
          '61f9bb524501247dce647b218ad14347'
-         '033427f2b406cba8dd6103ff374e7156'
          '1a336eb22e27cbf443ec5a2ecddfa93c'
          '7b03ba9b75d795e4f7fdfaa550d97159'
-         '63d1d61d217005db7c23c4a98fc3e7eb')
+         '63d1d61d217005db7c23c4a98fc3e7eb'
+         '620a3f8554328edf2b0760d5a45ddff3'
+         '9e201c4e408c9eab6c0bf2e4c25c6992'
+         '1c62e0f713f5df16db86c9db77d13b7c'
+         '51136fda7acc0c891752257d4236434c'
+         '8fde54747a1f2f81dd3535437a25e789')
 
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
   # Upstream commits from server-1.5 branch
   patch -Np1 -i "${srcdir}/xserver-1.5-branch-4970d.patch" || return 1
 
-  # extramodes
-  patch -Np1 -i "${srcdir}/001_fedora_extramodes.patch" || return 1
-
   # Get rid of the ugly pattern
   patch -Np3 -i "${srcdir}/xorg-redhat-die-ugly-pattern-die-die-die.patch" || return 1
 
@@ -45,9 +50,23 @@
   # Upstream patch to fix evdev issues with >=2.1.0
   patch -Np1 -i "${srcdir}/xserver-1.5.3-AEI-on-by-default.patch" || return 1
 
+  # Fix idle time calculation, backport from server-1.6 branch
+  patch -Np1 -i "${srcdir}/xsync-fix-idletime.patch" || return 1
+
+  # Buildfixes for new libxfont
+  patch -Np1 -i "${srcdir}/remove-NOFONTSERVERACCESS.patch" || return 1
+  patch -Np1 -i "${srcdir}/remove-xprintism.patch" || return 1
+  patch -Np1 -i "${srcdir}/disable-loadable-fontrenderer.patch" || return 1
+  patch -Np1 -i "${srcdir}/libxfont-1.4.0-buildfix.patch" || return 1
+
   # Fix dbus config path
   sed -i -e 's/\$(sysconfdir)/\/etc/' config/Makefile.*  || return 1
 
+  libtoolize --force || return 1
+  aclocal || return 1
+  autoconf || return 1
+  automake || return 1
+
   ./configure --prefix=/usr \
               --enable-ipv6 \
               --enable-dri \
@@ -56,6 +75,7 @@
               --enable-xnest \
               --enable-composite \
               --enable-xcsecurity \
+	      --disable-appgroup \
               --enable-xorg \
               --enable-xtrap \
               --enable-xevie \
@@ -66,6 +86,7 @@
               --enable-install-setuid \
               --enable-config-hal \
 	      --enable-config-dbus \
+	      --enable-record \
 	      --disable-xfbdev \
 	      --disable-xfake \
 	      --disable-xsdl \

Added: disable-loadable-fontrenderer.patch
===================================================================
--- disable-loadable-fontrenderer.patch	                        (rev 0)
+++ disable-loadable-fontrenderer.patch	2009-04-05 13:16:44 UTC (rev 33878)
@@ -0,0 +1,520 @@
+From affec10635343668839994ea2bac16c1d4524200 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax at redhat.com>
+Date: Wed, 16 Jul 2008 18:44:33 +0000
+Subject: Remove loadable font renderer support.
+
+---
+diff --git a/dix/dixfonts.c b/dix/dixfonts.c
+index 1c6d37f..7b79bac 100644
+--- a/dix/dixfonts.c
++++ b/dix/dixfonts.c
+@@ -87,7 +87,7 @@ extern FontPtr defaultFont;
+ 
+ static FontPathElementPtr *font_path_elements = (FontPathElementPtr *) 0;
+ static int  num_fpes = 0;
+-_X_EXPORT FPEFunctions *fpe_functions = (FPEFunctions *) 0;
++static FPEFunctions *fpe_functions = (FPEFunctions *) 0;
+ static int  num_fpe_types = 0;
+ 
+ static unsigned char *font_path_string;
+@@ -97,7 +97,7 @@ static int  size_slept_fpes = 0;
+ static FontPathElementPtr *slept_fpes = (FontPathElementPtr *) 0;
+ static FontPatternCachePtr patternCache;
+ 
+-_X_EXPORT int
++static int
+ FontToXError(err)
+     int         err;
+ {
+@@ -117,6 +117,16 @@ FontToXError(err)
+     }
+ }
+ 
++static int
++LoadGlyphs(ClientPtr client, FontPtr pfont, unsigned nchars, int item_size,
++	   unsigned char *data)
++{
++    if (fpe_functions[pfont->fpe->type].load_glyphs)
++	return (*fpe_functions[pfont->fpe->type].load_glyphs)
++	    (client, pfont, 0, nchars, item_size, data);
++    else
++	return Successful;
++}
+ 
+ /*
+  * adding RT_FONT prevents conflict with default cursor font
+@@ -470,7 +480,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna
+  *
+  *  \param value must conform to DeleteType
+  */
+-_X_EXPORT int
++int
+ CloseFont(pointer value, XID fid)
+ {
+     int         nscr;
+@@ -1879,16 +1889,6 @@ GetFontPath(ClientPtr client, int *count, int *length, unsigned char **result)
+     return Success;
+ }
+ 
+-_X_EXPORT int
+-LoadGlyphs(ClientPtr client, FontPtr pfont, unsigned nchars, int item_size, unsigned char *data)
+-{
+-    if (fpe_functions[pfont->fpe->type].load_glyphs)
+-	return (*fpe_functions[pfont->fpe->type].load_glyphs)
+-	    (client, pfont, 0, nchars, item_size, data);
+-    else
+-	return Successful;
+-}
+-
+ void
+ DeleteClientFontStuff(ClientPtr client)
+ {
+@@ -1911,6 +1911,7 @@ InitFonts (void)
+ #ifdef BUILTIN_FONTS
+     BuiltinRegisterFpeFunctions();
+ #else
++    FreeTypeRegisterFontFileFunctions();
+     FontFileRegisterFpeFunctions();
+     fs_register_fpe_functions();
+ #endif
+diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
+index c8bf1ce..3c75df0 100644
+--- a/hw/xfree86/common/xf86Module.h
++++ b/hw/xfree86/common/xf86Module.h
+@@ -194,7 +194,6 @@ pointer LoadSubModuleLocal(pointer, const char *, const char **,
+ 			   const char **, pointer, const XF86ModReqInfo *,
+ 			   int *, int *);
+ void UnloadSubModule(pointer);
+-void LoadFont(pointer);
+ void UnloadModule (pointer);
+ #endif
+ pointer LoaderSymbol(const char *);
+diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
+index f19a852..365f006 100644
+--- a/hw/xfree86/dixmods/Makefile.am
++++ b/hw/xfree86/dixmods/Makefile.am
+@@ -23,9 +23,6 @@ extsmodule_LTLIBRARIES = $(RECORDMOD) \
+ 			 $(DBEMOD) \
+                          $(GLXMODS)
+ 
+-fontsmoduledir = $(moduledir)/fonts
+-fontsmodule_LTLIBRARIES = libfreetype.la
+-
+ AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
+ INCLUDES = @XORG_INCS@ \
+            -I$(top_srcdir)/dbe \
+@@ -64,9 +61,6 @@ libshadow_la_LDFLAGS = -avoid-version
+ libshadow_la_LIBADD = $(top_builddir)/miext/shadow/libshadow.la
+ libshadow_la_SOURCES = shmodule.c
+ 
+-libfreetype_la_LDFLAGS = -avoid-version
+-libfreetype_la_SOURCES = ftmodule.c
+-
+ libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
+ libdixmods_la_CFLAGS = -DXFree86LOADER $(AM_CFLAGS)
+ 
+diff --git a/hw/xfree86/dixmods/ftmodule.c b/hw/xfree86/dixmods/ftmodule.c
+deleted file mode 100644
+index 382c0b3..0000000
+--- a/hw/xfree86/dixmods/ftmodule.c
++++ b/dev/null
+@@ -1,75 +0,0 @@
+-/*
+- * Copyright (C) 1998-2002 The XFree86 Project, Inc.  All Rights Reserved.
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a copy
+- * of this software and associated documentation files (the "Software"), to
+- * deal in the Software without restriction, including without limitation the
+- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+- * sell copies of the Software, and to permit persons to whom the Software is
+- * furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included in
+- * all copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+- * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+- *
+- * Except as contained in this notice, the name of the XFree86 Project shall
+- * not be used in advertising or otherwise to promote the sale, use or other
+- * dealings in this Software without prior written authorization from the
+- * XFree86 Project.
+- */
+-
+-#ifdef HAVE_XORG_CONFIG_H
+-#include <xorg-config.h>
+-#endif
+-
+-#include "misc.h"
+-
+-#include <X11/fonts/fontmod.h>
+-#include "xf86Module.h"
+-
+-static MODULESETUPPROTO(freetypeSetup);
+-
+-    /*
+-     * This is the module data function that is accessed when loading
+-     * libfreetype as a module.
+-     */
+-
+-static XF86ModuleVersionInfo VersRec =
+-{
+-	"freetype",
+-	MODULEVENDORSTRING " & the After X-TT Project",
+-	MODINFOSTRING1,
+-	MODINFOSTRING2,
+-	XORG_VERSION_CURRENT,
+-        2, 1, 0,
+-	ABI_CLASS_FONT,			/* Font module */
+-	ABI_FONT_VERSION,
+-	MOD_CLASS_FONT,
+-	{0,0,0,0}       /* signature, to be patched into the file by a tool */
+-};
+-
+-_X_EXPORT XF86ModuleData freetypeModuleData = { &VersRec, freetypeSetup, NULL };
+-
+-extern void FreeTypeRegisterFontFileFunctions(void);
+-
+-static FontModule freetypeModule = {
+-    FreeTypeRegisterFontFileFunctions,
+-    "FreeType",
+-    NULL
+-};
+-
+-static pointer
+-freetypeSetup(pointer module, pointer opts, int *errmaj, int *errmin)
+-{
+-    freetypeModule.module = module;
+-    LoadFont(&freetypeModule);
+-
+-    /* Need a non-NULL return */
+-    return (pointer)1;
+-}
+diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
+index eba52ec..1505e8e 100644
+--- a/hw/xfree86/loader/dixsym.c
++++ b/hw/xfree86/loader/dixsym.c
+@@ -57,7 +57,6 @@
+ #include "cursorstr.h"
+ #include "dix.h"
+ #include "dixevents.h"
+-#include "dixfont.h"
+ #include "dixstruct.h"
+ #include "misc.h"
+ #include "globals.h"
+@@ -99,6 +98,7 @@ _X_HIDDEN void *dixLookupTab[] = {
+     /* dix */
+     /* atom.c */
+     SYMFUNC(MakeAtom)
++    SYMFUNC(NameForAtom)
+     SYMFUNC(ValidAtom)
+     /* colormap.c */
+     SYMFUNC(AllocColor)
+@@ -147,11 +147,6 @@ _X_HIDDEN void *dixLookupTab[] = {
+     SYMVAR(isItTimeToYield)
+     SYMVAR(ClientStateCallback)
+     SYMVAR(ServerGrabCallback)
+-    /* dixfonts.c */
+-    SYMFUNC(CloseFont)
+-    SYMFUNC(FontToXError)
+-    SYMFUNC(LoadGlyphs)
+-    SYMVAR(fpe_functions)
+     /* dixutils.c */
+     SYMFUNC(AddCallback)
+     SYMFUNC(ClientSleep)
+diff --git a/hw/xfree86/loader/fontsym.c b/hw/xfree86/loader/fontsym.c
+deleted file mode 100644
+index 82d4b1c..0000000
+--- a/hw/xfree86/loader/fontsym.c
++++ b/dev/null
+@@ -1,109 +0,0 @@
+-/*
+- * Copyright (c) 1998-2002 by The XFree86 Project, Inc.
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a
+- * copy of this software and associated documentation files (the "Software"),
+- * to deal in the Software without restriction, including without limitation
+- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+- * and/or sell copies of the Software, and to permit persons to whom the
+- * Software is furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included in
+- * all copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+- * OTHER DEALINGS IN THE SOFTWARE.
+- *
+- * Except as contained in this notice, the name of the copyright holder(s)
+- * and author(s) shall not be used in advertising or otherwise to promote
+- * the sale, use or other dealings in this Software without prior written
+- * authorization from the copyright holder(s) and author(s).
+- */
+-
+-#ifdef HAVE_XORG_CONFIG_H
+-#include <xorg-config.h>
+-#endif
+-
+-#include <X11/fonts/font.h>
+-#include "sym.h"
+-#include <X11/fonts/fntfilst.h>
+-#include <X11/fonts/fontenc.h>
+-#ifdef FONTENC_COMPATIBILITY
+-#include <X11/fonts/fontencc.h>
+-#endif
+-#include <X11/fonts/fntfilio.h>
+-#include <X11/fonts/fntfil.h>
+-#include <X11/fonts/fontutil.h>
+-#include <X11/fonts/fontxlfd.h>
+-#ifdef FONTCACHE
+-#define _FONTCACHE_SERVER_
+-#include "fontcache.h"
+-#endif
+-
+-_X_HIDDEN void *fontLookupTab[] = {
+-
+-    SYMFUNC(TwoByteSwap)
+-    SYMFUNC(FourByteSwap)
+-    SYMFUNC(FontCouldBeTerminal)
+-    SYMFUNC(BufFileRead)
+-    SYMFUNC(BufFileWrite)
+-    SYMFUNC(CheckFSFormat)
+-    SYMFUNC(FontFileOpen)
+-    SYMFUNC(FontFilePriorityRegisterRenderer)
+-    SYMFUNC(FontFileRegisterRenderer)
+-    SYMFUNC(FontParseXLFDName)
+-    SYMFUNC(FontFileCloseFont)
+-    SYMFUNC(FontFileOpenBitmap)
+-    SYMFUNC(FontFileCompleteXLFD)
+-    SYMFUNC(FontFileCountDashes)
+-    SYMFUNC(FontFileFindNameInDir)
+-    SYMFUNC(FontFileClose)
+-    SYMFUNC(FontComputeInfoAccelerators)
+-    SYMFUNC(FontDefaultFormat)
+-    SYMFUNC(NameForAtom)
+-    SYMFUNC(BitOrderInvert)
+-    SYMFUNC(FontFileMatchRenderer)
+-    SYMFUNC(RepadBitmap)
+-    SYMFUNC(FontEncName)
+-    SYMFUNC(FontEncRecode)
+-    SYMFUNC(FontEncFind)
+-    SYMFUNC(FontMapFind)
+-    SYMFUNC(FontEncMapFind)
+-    SYMFUNC(FontEncFromXLFD)
+-    SYMFUNC(FontEncDirectory)
+-    SYMFUNC(FontMapReverse)
+-    SYMFUNC(FontMapReverseFree)
+-    SYMFUNC(CreateFontRec)
+-    SYMFUNC(DestroyFontRec)
+-    SYMFUNC(GetGlyphs)
+-    SYMFUNC(QueryGlyphExtents)
+-
+-    SYMVAR(FontFileBitmapSources)
+-
+-#ifdef FONTENC_COMPATIBILITY
+-    /* Obsolete backwards compatibility symbols -- fontencc.c */
+-    SYMFUNC(font_encoding_from_xlfd)
+-    SYMFUNC(font_encoding_find)
+-    SYMFUNC(font_encoding_recode)
+-    SYMFUNC(font_encoding_name)
+-    SYMFUNC(identifyEncodingFile)
+-#endif
+-
+-#ifdef FONTCACHE
+-    /* fontcache.c */
+-    SYMFUNC(FontCacheGetSettings)
+-    SYMFUNC(FontCacheGetStatistics)
+-    SYMFUNC(FontCacheChangeSettings)
+-    SYMFUNC(FontCacheOpenCache)
+-    SYMFUNC(FontCacheCloseCache)
+-    SYMFUNC(FontCacheSearchEntry)
+-    SYMFUNC(FontCacheGetEntry)
+-    SYMFUNC(FontCacheInsertEntry)
+-    SYMFUNC(FontCacheGetBitmap)
+-#endif
+-};
+diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
+index b05c48e..c1df446 100644
+--- a/hw/xfree86/loader/loader.c
++++ b/hw/xfree86/loader/loader.c
+@@ -113,8 +113,7 @@ LoaderInit(void)
+ 
+     xf86MsgVerb(X_INFO, 2, "Loader magic: %p\n", (void *)
+ 		((long)dixLookupTab ^ (long)extLookupTab
+-	        ^ (long)fontLookupTab ^ (long)miLookupTab
+-		^ (long)xfree86LookupTab));
++	        ^ (long)miLookupTab ^ (long)xfree86LookupTab));
+     xf86MsgVerb(X_INFO, 2, "Module ABI versions:\n");
+     xf86ErrorFVerb(2, "\t%s: %d.%d\n", ABI_CLASS_ANSIC,
+ 		   GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion),
+@@ -128,9 +127,6 @@ LoaderInit(void)
+     xf86ErrorFVerb(2, "\t%s : %d.%d\n", ABI_CLASS_EXTENSION,
+ 		   GET_ABI_MAJOR(LoaderVersionInfo.extensionVersion),
+ 		   GET_ABI_MINOR(LoaderVersionInfo.extensionVersion));
+-    xf86ErrorFVerb(2, "\t%s : %d.%d\n", ABI_CLASS_FONT,
+-		   GET_ABI_MAJOR(LoaderVersionInfo.fontVersion),
+-		   GET_ABI_MINOR(LoaderVersionInfo.fontVersion));
+ 
+     LoaderGetOS(&osname, NULL, NULL, NULL);
+     if (osname)
+diff --git a/hw/xfree86/loader/loaderProcs.h b/hw/xfree86/loader/loaderProcs.h
+index 9c73db3..827f3a9 100644
+--- a/hw/xfree86/loader/loaderProcs.h
++++ b/hw/xfree86/loader/loaderProcs.h
+@@ -87,7 +87,6 @@ ModuleDescPtr LoadSubModuleLocal(ModuleDescPtr, const char *,
+ 				 pointer, const XF86ModReqInfo *,
+ 				 int *, int *);
+ ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent);
+-void LoadFont(FontModule *);
+ void UnloadModule(ModuleDescPtr);
+ void UnloadSubModule(ModuleDescPtr);
+ void UnloadDriver(ModuleDescPtr);
+diff --git a/hw/xfree86/loader/loadfont.c b/hw/xfree86/loader/loadfont.c
+deleted file mode 100644
+index 94d31d6..0000000
+--- a/hw/xfree86/loader/loadfont.c
++++ b/dev/null
+@@ -1,81 +0,0 @@
+-/*
+- * Copyright (c) 1998 by The XFree86 Project, Inc.
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a
+- * copy of this software and associated documentation files (the "Software"),
+- * to deal in the Software without restriction, including without limitation
+- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+- * and/or sell copies of the Software, and to permit persons to whom the
+- * Software is furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included in
+- * all copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+- * OTHER DEALINGS IN THE SOFTWARE.
+- *
+- * Except as contained in this notice, the name of the copyright holder(s)
+- * and author(s) shall not be used in advertising or otherwise to promote
+- * the sale, use or other dealings in this Software without prior written
+- * authorization from the copyright holder(s) and author(s).
+- */
+-
+-/* Maybe this file belongs in lib/font/fontfile/module/ ? */
+-
+-#define LOADERDECLARATIONS
+-#ifdef HAVE_XORG_CONFIG_H
+-#include <xorg-config.h>
+-#endif
+-
+-#include "loaderProcs.h"
+-#include "misc.h"
+-#include "xf86.h"
+-
+-/* XXX this should be static, but xorgcfg needs it, nngh */
+-FontModule *FontModuleList = NULL;
+-static int numFontModules = 0;
+-
+-static FontModule *
+-NewFontModule(void)
+-{
+-    FontModule *save = FontModuleList;
+-    int n;
+-
+-    /* Sanity check */
+-    if (!FontModuleList)
+-	numFontModules = 0;
+-
+-    n = numFontModules + 1;
+-    FontModuleList = xrealloc(FontModuleList, (n + 1) * sizeof(FontModule));
+-    if (FontModuleList == NULL) {
+-	FontModuleList = save;
+-	return NULL;
+-    } else {
+-	numFontModules++;
+-	FontModuleList[numFontModules].name = NULL;
+-	return FontModuleList + (numFontModules - 1);
+-    }
+-}
+-
+-_X_EXPORT void
+-LoadFont(FontModule * f)
+-{
+-    FontModule *newfont;
+-
+-    if (f == NULL)
+-	return;
+-
+-    if (!(newfont = NewFontModule()))
+-	return;
+-
+-    xf86MsgVerb(X_INFO, 2, "Loading font %s\n", f->name);
+-
+-    newfont->name = f->name;
+-    newfont->initFunc = f->initFunc;
+-    newfont->module = f->module;
+-}
+diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
+index 04719a6..6031db7 100644
+--- a/hw/xfree86/loader/loadmod.c
++++ b/hw/xfree86/loader/loadmod.c
+@@ -198,7 +198,6 @@ LoaderSetPath(const char *path)
+ /* Standard set of module subdirectories to search, in order of preference */
+ static const char *stdSubdirs[] = {
+     "",
+-    "fonts/",
+     "input/",
+     "drivers/",
+     "multimedia/",
+diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
+index 5f0a683..8a45fe7 100644
+--- a/hw/xfree86/loader/xf86sym.c
++++ b/hw/xfree86/loader/xf86sym.c
+@@ -671,7 +671,6 @@ _X_HIDDEN void *xfree86LookupTab[] = {
+     SYMFUNC(LoaderErrorMsg)
+     SYMFUNC(LoaderCheckUnresolved)
+     SYMFUNC(LoadExtension)
+-    SYMFUNC(LoadFont)
+     SYMFUNC(LoaderReqSymbols)
+     SYMFUNC(LoaderReqSymLists)
+     SYMFUNC(LoaderRefSymbols)
+diff --git a/include/dixfont.h b/include/dixfont.h
+index 516d91b..d61dd7e 100644
+--- a/include/dixfont.h
++++ b/include/dixfont.h
+@@ -33,10 +33,6 @@ SOFTWARE.
+ 
+ typedef struct _DIXFontProp *DIXFontPropPtr;
+ 
+-extern FPEFunctions *fpe_functions;
+-
+-extern int FontToXError(int /*err*/);
+-
+ extern Bool SetDefaultFont(char * /*defaultfontname*/);
+ 
+ extern void QueueFontWakeup(FontPathElementPtr /*fpe*/);
+@@ -110,12 +106,6 @@ extern int GetFontPath(ClientPtr client,
+ 		       int *length,
+ 		       unsigned char **result);
+ 
+-extern int LoadGlyphs(ClientPtr /*client*/,
+-		      FontPtr /*pfont*/,
+-		      unsigned /*nchars*/,
+-		      int /*item_size*/,
+-		      unsigned char * /*data*/);
+-
+ extern void DeleteClientFontStuff(ClientPtr /*client*/);
+ 
+ /* Quartz support on Mac OS X pulls in the QuickDraw
+--
+cgit v0.8.2

Added: libxfont-1.4.0-buildfix.patch
===================================================================
--- libxfont-1.4.0-buildfix.patch	                        (rev 0)
+++ libxfont-1.4.0-buildfix.patch	2009-04-05 13:16:44 UTC (rev 33878)
@@ -0,0 +1,24 @@
+From 4557b3f6c4273cd83b701beaf7a150c806fed298 Mon Sep 17 00:00:00 2001
+From: Keith Packard <keithp at keithp.com>
+Date: Thu, 19 Feb 2009 00:43:23 +0000
+Subject: X11/fonts/fontmod.h doesn't exist anymore.
+
+libXfont 1.4.0 no longer includes this file, nor do we need it, so just stop
+attempting to reference it.
+
+Signed-off-by: Keith Packard <keithp at keithp.com>
+---
+diff --git a/hw/xfree86/loader/loaderProcs.h b/hw/xfree86/loader/loaderProcs.h
+index 827f3a9..a10f0b3 100644
+--- a/hw/xfree86/loader/loaderProcs.h
++++ b/hw/xfree86/loader/loaderProcs.h
+@@ -56,7 +56,6 @@
+ #undef IN_LOADER
+ #define IN_LOADER
+ #include "xf86Module.h"
+-#include <X11/fonts/fontmod.h>
+ 
+ typedef struct module_desc {
+     struct module_desc *child;
+--
+cgit v0.8.2

Added: remove-NOFONTSERVERACCESS.patch
===================================================================
--- remove-NOFONTSERVERACCESS.patch	                        (rev 0)
+++ remove-NOFONTSERVERACCESS.patch	2009-04-05 13:16:44 UTC (rev 33878)
@@ -0,0 +1,49 @@
+From f3b29efc4d7bb346cdd3fd79e780f1022c8f46e8 Mon Sep 17 00:00:00 2001
+From: Tiago Vignatti <vignatti at c3sl.ufpr.br>
+Date: Wed, 25 Jun 2008 02:07:49 +0000
+Subject: Remove NOFONTSERVERACCESS macro
+
+dix: this is semantically different but it goes through the same path in
+the code.
+---
+diff --git a/configure.ac b/configure.ac
+index 201bfe4..ab6cb10 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -962,7 +962,6 @@ fi
+ 
+ if test "x$BUILTIN_FONTS" = xyes; then
+        AC_DEFINE(BUILTIN_FONTS, 1, [Use only built-in fonts])
+-       AC_DEFINE(NOFONTSERVERACCESS, 1, [Avoid using a font server])
+        FONTPATH="built-ins"
+ fi
+ 
+diff --git a/dix/dixfonts.c b/dix/dixfonts.c
+index 83b264a..89f1528 100644
+--- a/dix/dixfonts.c
++++ b/dix/dixfonts.c
+@@ -1920,8 +1920,6 @@ InitFonts (void)
+         BuiltinRegisterFpeFunctions();
+ #else
+ 	FontFileRegisterFpeFunctions();
+-#endif
+-#ifndef NOFONTSERVERACCESS
+ 	fs_register_fpe_functions();
+ #endif
+     }
+diff --git a/include/dix-config.h.in b/include/dix-config.h.in
+index 0c515c5..ad74f77 100644
+--- a/include/dix-config.h.in
++++ b/include/dix-config.h.in
+@@ -480,9 +480,6 @@
+ /* Use only built-in fonts */
+ #undef BUILTIN_FONTS
+ 
+-/* Avoid using font servers */
+-#undef NOFONTSERVERACCESS
+-
+ /* Use an empty root cursor */
+ #undef NULL_ROOT_CURSOR
+ 
+--
+cgit v0.8.2

Added: remove-xprintism.patch
===================================================================
--- remove-xprintism.patch	                        (rev 0)
+++ remove-xprintism.patch	2009-04-05 13:16:44 UTC (rev 33878)
@@ -0,0 +1,74 @@
+From a82e6efb7b9b2ab9a1597b002f375c5ee105e7f5 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax at redhat.com>
+Date: Wed, 16 Jul 2008 18:19:04 +0000
+Subject: Remove the numVideoScreens xprintism.
+
+This was to account for cases where you had video and print screens in
+the same server.  Lunacy.  Leave the slot in ScreenInfo, but rename it,
+and stop looking at it.
+---
+diff --git a/dix/dixfonts.c b/dix/dixfonts.c
+index 89f1528..1c6d37f 100644
+--- a/dix/dixfonts.c
++++ b/dix/dixfonts.c
+@@ -1908,21 +1908,12 @@ InitFonts (void)
+ {
+     patternCache = MakeFontPatternCache();
+ 
+-#ifndef BUILTIN_FONTS
+-    if (screenInfo.numScreens > screenInfo.numVideoScreens) {
+-	PrinterFontRegisterFpeFunctions();
+-	FontFileCheckRegisterFpeFunctions();
+-	check_fs_register_fpe_functions();
+-    } else 
+-#endif
+-    {
+ #ifdef BUILTIN_FONTS
+-        BuiltinRegisterFpeFunctions();
++    BuiltinRegisterFpeFunctions();
+ #else
+-	FontFileRegisterFpeFunctions();
+-	fs_register_fpe_functions();
++    FontFileRegisterFpeFunctions();
++    fs_register_fpe_functions();
+ #endif
+-    }
+ }
+ 
+ int
+diff --git a/dix/main.c b/dix/main.c
+index 3bc45fb..d8e3bac 100644
+--- a/dix/main.c
++++ b/dix/main.c
+@@ -309,7 +309,6 @@ int main(int argc, char *argv[], char *envp[])
+ 	SetInputCheck(&alwaysCheckForInput[0], &alwaysCheckForInput[1]);
+ 	screenInfo.arraySize = MAXSCREENS;
+ 	screenInfo.numScreens = 0;
+-	screenInfo.numVideoScreens = -1;
+ 	WindowTable = (WindowPtr *)xalloc(MAXSCREENS * sizeof(WindowPtr));
+ 	if (!WindowTable)
+ 	    FatalError("couldn't create root window table");
+@@ -339,8 +338,6 @@ int main(int argc, char *argv[], char *envp[])
+ 
+ 	if (screenInfo.numScreens < 1)
+ 	    FatalError("no screens found");
+-	if (screenInfo.numVideoScreens < 0)
+-	    screenInfo.numVideoScreens = screenInfo.numScreens;
+ 	InitExtensions(argc, argv);
+ 	for (i = 0; i < screenInfo.numScreens; i++)
+ 	{
+diff --git a/include/scrnintstr.h b/include/scrnintstr.h
+index 6cf9333..5d4ddbb 100644
+--- a/include/scrnintstr.h
++++ b/include/scrnintstr.h
+@@ -612,7 +612,7 @@ typedef struct _ScreenInfo {
+     int		arraySize;
+     int		numScreens;
+     ScreenPtr	screens[MAXSCREENS];
+-    int		numVideoScreens;
++    int		unused;
+ } ScreenInfo;
+ 
+ extern ScreenInfo screenInfo;
+--
+cgit v0.8.2

Added: xsync-fix-idletime.patch
===================================================================
--- xsync-fix-idletime.patch	                        (rev 0)
+++ xsync-fix-idletime.patch	2009-04-05 13:16:44 UTC (rev 33878)
@@ -0,0 +1,107 @@
+From ca56d764d2be28c64fe15c9e37d534ef00117ad2 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax at redhat.com>
+Date: Wed, 10 Dec 2008 21:13:20 +0000
+Subject: xsync: Fix wakeup storm in idletime counter.
+
+Wakeup scheduling only considered the threshold values, and not whether
+the trigger was edge or level.
+
+See also:
+https://bugzilla.redhat.com/show_bug.cgi?id=474586
+http://svn.gnome.org/viewvc/gnome-screensaver/trunk/src/test-idle-ext.c?view=markup
+(cherry picked from commit 1f4fb0225b278d1cf4145aebeb0bdd23dc8f62d5)
+---
+diff --git a/Xext/sync.c b/Xext/sync.c
+index 63f6fa2..1b37366 100644
+--- a/Xext/sync.c
++++ b/Xext/sync.c
+@@ -2533,7 +2533,7 @@ SyncInitServerTime(void)
+  * IDLETIME implementation
+  */
+ 
+-static pointer IdleTimeCounter;
++static SyncCounter *IdleTimeCounter;
+ static XSyncValue *pIdleTimeValueLess;
+ static XSyncValue *pIdleTimeValueGreater;
+ 
+@@ -2545,38 +2545,69 @@ IdleTimeQueryValue (pointer pCounter, CARD64 *pValue_return)
+ }
+ 
+ static void
+-IdleTimeBlockHandler (pointer env,
+-                      struct timeval **wt,
+-                      pointer LastSelectMask)
++IdleTimeBlockHandler(pointer env, struct timeval **wt, pointer LastSelectMask)
+ {
+-    XSyncValue idle;
++    XSyncValue idle, old_idle;
++    SyncTriggerList *list = IdleTimeCounter->pTriglist;
++    SyncTrigger *trig;
+ 
+     if (!pIdleTimeValueLess && !pIdleTimeValueGreater)
+ 	return;
+ 
++    old_idle = IdleTimeCounter->value;
+     IdleTimeQueryValue (NULL, &idle);
++    IdleTimeCounter->value = idle; /* push, so CheckTrigger works */
+ 
+     if (pIdleTimeValueLess &&
+         XSyncValueLessOrEqual (idle, *pIdleTimeValueLess))
+     {
+-	AdjustWaitForDelay (wt, 0);
++	/*
++	 * We've been idle for less than the threshold value, and someone
++	 * wants to know about that, but now we need to know whether they
++	 * want level or edge trigger.  Check the trigger list against the
++	 * current idle time, and if any succeed, bomb out of select()
++	 * immediately so we can reschedule.
++	 */
++
++	for (list = IdleTimeCounter->pTriglist; list; list = list->next) {
++	    trig = list->pTrigger;
++	    if (trig->CheckTrigger(trig, old_idle)) {
++		AdjustWaitForDelay(wt, 0);
++		break;
++	    }
++	}
+     }
+     else if (pIdleTimeValueGreater)
+     {
+-	unsigned long timeout = 0;
++	/*
++	 * There's a threshold in the positive direction.  If we've been
++	 * idle less than it, schedule a wakeup for sometime in the future.
++	 * If we've been idle more than it, and someone wants to know about
++	 * that level-triggered, schedule an immediate wakeup.
++	 */
++	unsigned long timeout = -1;
+ 
+-	if (XSyncValueLessThan (idle, *pIdleTimeValueGreater))
+-	{
++	if (XSyncValueLessThan (idle, *pIdleTimeValueGreater)) {
+ 	    XSyncValue value;
+ 	    Bool overflow;
+ 
+ 	    XSyncValueSubtract (&value, *pIdleTimeValueGreater,
+ 	                        idle, &overflow);
+-	    timeout = XSyncValueLow32 (value);
++	    timeout = min(timeout, XSyncValueLow32 (value));
++	} else {
++	    for (list = IdleTimeCounter->pTriglist; list; list = list->next) {
++		trig = list->pTrigger;
++		if (trig->CheckTrigger(trig, old_idle)) {
++		    timeout = min(timeout, 0);
++		    break;
++		}
++	    }
+ 	}
+ 
+ 	AdjustWaitForDelay (wt, timeout);
+     }
++
++    IdleTimeCounter->value = old_idle; /* pop */
+ }
+ 
+ static void
+--
+cgit v0.8.2




More information about the arch-commits mailing list