[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xorg-server: Changes to 'debian-experimental'



 ChangeLog                            |  152 +++++++++++++++++++++++++++++++++++
 configure.ac                         |    4 
 debian/changelog                     |   10 ++
 debian/control                       |   23 +++--
 debian/rules                         |   11 +-
 debian/xserver-common.install        |    2 
 debian/xserver-xorg-core.install     |    1 
 debian/xserver-xorg-core.postinst.in |   22 +++++
 debian/xserver-xorg-core.postrm.in   |   13 ++
 debian/xserver-xorg-core.preinst.in  |   21 ++++
 dix/getevents.c                      |    6 -
 glx/Makefile.am                      |    6 +
 hw/xfree86/ddc/interpret_edid.c      |   41 +++++++++
 hw/xfree86/dixmods/extmod/xf86dga.c  |    7 +
 hw/xfree86/int10/helper_exec.c       |   15 ---
 hw/xfree86/modes/xf86Crtc.c          |    3 
 mfb/mfbscrinit.c                     |    1 
 xkb/XKBMisc.c                        |   13 ++
 xkb/xkb.c                            |   17 +--
 xkb/xkbUtils.c                       |   39 +++++++-
 20 files changed, 349 insertions(+), 58 deletions(-)

New commits:
commit 67dcdfd59390d8f4c49eed0224c5a5c8684bec05
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat Oct 11 03:49:19 2008 +0200

    Also remove /etc/X11/xserver if it's empty

diff --git a/debian/xserver-xorg-core.postinst.in b/debian/xserver-xorg-core.postinst.in
index fca5608..d047bb1 100644
--- a/debian/xserver-xorg-core.postinst.in
+++ b/debian/xserver-xorg-core.postinst.in
@@ -11,6 +11,7 @@ case "$1" in
   configure)
   if dpkg --compare-versions "$2" lt-nl 2:1.5.2-1; then
     remove_conffile_commit /etc/X11/xserver/SecurityPolicy
+    rmdir /etc/X11/xserver || true
   fi
 esac
 

commit 6e9638e4566b041975f6a2a209c0bd8bd9064add
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat Oct 11 03:30:51 2008 +0200

    Remove obsolete conffile /etc/X11/xserver/SecurityPolicy on upgrades.

diff --git a/debian/changelog b/debian/changelog
index 868a763..8f99cb6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ xorg-server (2:1.5.2-1) UNRELEASED; urgency=low
     /usr/lib/xorg/protocol.txt and the Xserver(1) manpage for now.
   * debian/rules: Use filter instead of findstring for noopt in
     DEB_BUILD_OPTIONS.
+  * Remove obsolete conffile /etc/X11/xserver/SecurityPolicy on upgrades.
 
  -- Julien Cristau <jcristau@debian.org>  Thu, 25 Sep 2008 18:50:19 +0200
 
diff --git a/debian/xserver-xorg-core.postinst.in b/debian/xserver-xorg-core.postinst.in
new file mode 100644
index 0000000..fca5608
--- /dev/null
+++ b/debian/xserver-xorg-core.postinst.in
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+THIS_PACKAGE=xserver-xorg-core
+THIS_SCRIPT=postinst
+
+#INCLUDE_SHELL_LIB#
+
+case "$1" in
+  configure)
+  if dpkg --compare-versions "$2" lt-nl 2:1.5.2-1; then
+    remove_conffile_commit /etc/X11/xserver/SecurityPolicy
+  fi
+esac
+
+#DEBHELPER#
+
+exit 0
+
+# vim:set ai et sw=2 ts=2 tw=80:
diff --git a/debian/xserver-xorg-core.postrm.in b/debian/xserver-xorg-core.postrm.in
index 7d4be1b..19bec1e 100644
--- a/debian/xserver-xorg-core.postrm.in
+++ b/debian/xserver-xorg-core.postrm.in
@@ -7,9 +7,18 @@ THIS_SCRIPT=postrm
 
 #INCLUDE_SHELL_LIB#
 
-if [ "$1" = "purge" ]; then
+case "$1" in
+abort-install|abort-upgrade)
+  if dpkg --compare-versions "$2" lt-nl "2:1.5.2-1"; then
+    remove_conffile_rollback /etc/X11/xserver/SecurityPolicy
+  fi
+  ;;
+purge)
   rm /var/log/Xorg.*.log || true
   rm /var/log/Xorg.*.log.old || true
-fi
+  ;;
+esac
 
 #DEBHELPER#
+
+# vim:set ai et sts=2 sw=2 tw=0:
diff --git a/debian/xserver-xorg-core.preinst.in b/debian/xserver-xorg-core.preinst.in
new file mode 100644
index 0000000..c1b84a2
--- /dev/null
+++ b/debian/xserver-xorg-core.preinst.in
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+THIS_PACKAGE=xserver-xorg-core
+THIS_SCRIPT=preinst
+
+#INCLUDE_SHELL_LIB#
+
+case "$1" in
+upgrade|install)
+  if dpkg --compare-versions "$2" lt-nl 2:1.5.2-1; then
+    remove_conffile_lookup xserver-xorg-core /etc/X11/xserver/SecurityPolicy
+  fi
+esac
+
+#DEBHELPER#
+
+exit 0
+
+# vim:set ai et sw=2 ts=2 tw=80:

commit 2ac3a730aa1ab59e0ef74d2393722268862a0a0c
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat Oct 11 02:55:51 2008 +0200

    debian/rules: Use filter instead of findstring for noopt in DEB_BUILD_OPTIONS.

diff --git a/debian/changelog b/debian/changelog
index be877d1..868a763 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ xorg-server (2:1.5.2-1) UNRELEASED; urgency=low
     it for Xprint.
   * Re-introduce the xserver-common package, containing
     /usr/lib/xorg/protocol.txt and the Xserver(1) manpage for now.
+  * debian/rules: Use filter instead of findstring for noopt in
+    DEB_BUILD_OPTIONS.
 
  -- Julien Cristau <jcristau@debian.org>  Thu, 25 Sep 2008 18:50:19 +0200
 
diff --git a/debian/rules b/debian/rules
index ee13076..0c808dc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,7 +10,7 @@
 include debian/xsfbs/xsfbs.mk
 
 CFLAGS = -Wall -g
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -O0
 else
 	CFLAGS += -O2

commit 735a92cebaf157b0fd31d7892c259d2d5075eef0
Author: Julien Cristau <jcristau@debian.org>
Date:   Fri Oct 10 23:51:14 2008 +0200

    update changelogs

diff --git a/ChangeLog b/ChangeLog
index fef4b74..5b7377f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,155 @@
+commit 6dcfa994b0777bf0cabeb71672f13e650b340817
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Oct 10 15:26:32 2008 -0400
+
+    xserver 1.5.2
+
+commit 75504517a30f1bdd593c2a32af81084b59b398a5
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Oct 10 13:41:50 2008 -0400
+
+    EDID: Catch monitors that encode aspect ratio for physical size.
+    
+    This is not legal in either EDID 1.3 or 1.4, but hey, when did a little
+    thing like legality stop anyone.
+    (cherry picked from commit 0660dd9d7009147c395b9ea904539f76f55b9a7f)
+
+commit b595b65e54b1e15fbce872fe3719da14cfae5b92
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Oct 9 14:53:29 2008 -0400
+
+    Revert "Array-index based devPrivates implementation."
+    
+    This reverts commit 8ef37c194fa08d3911095299413a42a01162b078.
+
+commit ca659813a81074cae55ffec51f923c658480b618
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Wed Oct 8 19:46:50 2008 +0200
+
+    Fix GKVE with key_code > 255
+    
+    Move the keycode validation checks before use.
+
+commit 8337c9aa3d2009eea801a84b3a65272e03e65e1a
+Author: Luc Verhaegen <libv@skynet.be>
+Date:   Wed Oct 8 14:55:29 2008 +0200
+
+    DGA: Fix ProcXF86DGASetViewPort for missing support in driver.
+    
+    Fixes a segfault when trying to activate a DGA mode without checking
+    whether DGA modesetting is at all possible.
+    (cherry picked from commit 1feb69eb63e6739ff5db255ad529e84adf941a10)
+
+commit 4e6cbd323854709ae00c44108c93ab6596151de2
+Author: Zhenyu Wang <zhenyu.z.wang@intel.com>
+Date:   Wed Oct 8 13:33:55 2008 +0800
+
+    Check nextEnabledOutput()'s return in bestModeForAspect()
+    
+    In case no enabled outputs, we will reference wrong index of
+    output array.
+    (cherry picked from commit 56c615368c5a8e7acb0398434c2c68578626aa38)
+
+commit 43e3af9cac2e9fd613a61a870bfe00f4782a368d
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 7 13:41:25 2008 -0400
+
+    int10: Fix a nasty memory leak.
+    (cherry picked from commit 94919480d8bb66e1807b4fe87b8f326ef6e012c6)
+
+commit 00ac80a0c408106158bf258b6da8350611fbfe84
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 7 13:39:10 2008 -0400
+
+    int10: Don't warn when scanning for devices we don't have.
+    
+    Some BIOSes (hi XGI!) will attempt to enumerate the PCI bus by asking
+    for the config space of every possible device number.  This despite
+    perfectly functional BIOS methods to enumerate the bus exactly.
+    (cherry picked from commit a57b2f172c1291f22f7ba2780c1b2f55e353c3e9)
+
+commit c6ce2f6b3fe12e65b0e8a75cc1bc0a21875e14e3
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 7 13:38:12 2008 -0400
+
+    int10: Remove useless check.
+    
+    If you have more than one PCI device with the same d/b/d/f, you're
+    already in trouble.
+    (cherry picked from commit a65e36a873cd1ba9896cd0f9a3e94dd933666005)
+
+commit 8ef37c194fa08d3911095299413a42a01162b078
+Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
+Date:   Fri Sep 12 19:11:53 2008 -0400
+
+    Array-index based devPrivates implementation.
+    
+    Note: DevPrivateKey is now pointer-to-int, which means
+    each key now needs to point to some global storage of
+    size at least sizeof(int).
+    
+    (cherry picked from commit b6ab114212c0e4c3346ceb5b207f14c526ab81e7)
+
+commit e88df87851232d6b6c8da5fff802b33f5275b050
+Author: Peter Hutterer <peter.hutterer@redhat.com>
+Date:   Mon Sep 22 11:10:46 2008 +0930
+
+    xkb: squash canonical types into explicit ones on core reconstruction.
+    
+    If we update key types from core, and groups 2 - n have a canonical type but
+    the same symbols as the explicit type of group 1, assume that it was a core
+    sym duplication according to Section 12.4 of the XKB Protocol Spec.
+    Ignore the canonical types and pretend there's only one group for the key -
+    with the explicit key type.
+    
+    The protocol spec does not cover this case, so we have to guess here.
+    (cherry picked from commit 30c3c13f1030268aaa6a3598d538fafd0592d77a)
+
+commit be3b3cb970d040f0db4bead018c338012547334f
+Author: Peter Hutterer <peter.hutterer@redhat.com>
+Date:   Fri Sep 19 18:27:24 2008 +0930
+
+    xkb: fix core keyboard map generation. #14373
+    
+    According to Section 12.4 of the XKB Protocol Spec, if a key only has a single
+    group but the keyboard has multiple groups defined, the core description of
+    the key is a duplication of the single group across all symbols. i.e.
+    G1L1 G1L2 G1L1 G1L2 G1L3 G1L4 G1L3 G1L4
+    
+    The previous code generated G1L1 G1L2 G1L3 G1L4 G1L3 G1L4, leading to
+    "invented" groups when the process is reversed.
+    
+    Note that this creates wrong key types on reconstruction from core to xkb,
+    i.e. any single-group key with a key type that is not one of the canonical
+    four (Sec 12.2.3), will get the assigned type on group 1, and a canonical type
+    for the other gruops.
+    
+    X.Org Bug 14373 <http://bugs.freedesktop.org/show_bug.cgi?id=14373>
+    (cherry picked from commit ae986d1c73d2f720bd0309d8c33328d14e8eed25)
+
+commit 3bf826f59013ec14fbcf19b85a03e2967a821661
+Author: Kim Woelders <kim@woelders.dk>
+Date:   Mon Sep 22 08:37:29 2008 +0930
+
+    xkb: fix use of uninitialized variable.
+    
+    And some cosmetic changes to use stuff->change consistently.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
+    (cherry picked from commit 8c46505d7d91e0644b19cccc4b342fceb6f86cab)
+
+commit 88ebde608daaca4793e1b637302899ba65d165ec
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Oct 6 20:10:25 2008 -0700
+
+    Remove usage of mfbChangeWindowAttributes missed in e4d11e58c...
+
+commit af8cef461c4d107f7a03645568a635d0458da9b8
+Author: Alan Hourihane <alanh@tungstengraphics.com>
+Date:   Wed Sep 24 14:24:36 2008 +0100
+
+    only build dri2 when DRI2 is enabled
+
 commit 97f688f2b4b8ebfba77be00db68c4e6a555a5d62
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Tue Sep 23 14:51:33 2008 -0400
diff --git a/debian/changelog b/debian/changelog
index 7f27aa0..be877d1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
-xorg-server (2:1.5.1-2) UNRELEASED; urgency=low
+xorg-server (2:1.5.2-1) UNRELEASED; urgency=low
 
+  * New upstream bugfix release.
   * debian/rules: define PCI_TXT_IDS_DIR to unbreak the pci id matching using
     plain text files provided by drivers.
   * Don't pass --with-serverconfig-path to configure, we only used to override

commit 99941cae92a49b113e40309c9787aa926dccac3d
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat Oct 11 02:50:12 2008 +0200

    Re-introduce the xserver-common package
    
    It contains /usr/lib/xorg/protocol.txt and the Xserver(1) manpage for now.

diff --git a/debian/changelog b/debian/changelog
index e8a1f7e..7f27aa0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ xorg-server (2:1.5.1-2) UNRELEASED; urgency=low
     plain text files provided by drivers.
   * Don't pass --with-serverconfig-path to configure, we only used to override
     it for Xprint.
+  * Re-introduce the xserver-common package, containing
+    /usr/lib/xorg/protocol.txt and the Xserver(1) manpage for now.
 
  -- Julien Cristau <jcristau@debian.org>  Thu, 25 Sep 2008 18:50:19 +0200
 
diff --git a/debian/control b/debian/control
index 7320cda..533ec77 100644
--- a/debian/control
+++ b/debian/control
@@ -40,15 +40,15 @@ Vcs-Browser: http://git.debian.org/?p=pkg-xorg/xserver/xorg-server.git
 
 Package: xserver-xorg-core
 Architecture: any
-Depends: x11-common (>= 1:7.0.0), ${shlibs:Depends}, ${misc:Depends}, xserver-xorg
+Depends: xserver-common (>> 7), ${shlibs:Depends}, ${misc:Depends}, xserver-xorg
 Recommends: xkb-data, xfonts-base, libgl1-mesa-dri (>= 7.1~rc1)
 Suggests: xfonts-100dpi | xfonts-75dpi, xfonts-scalable
 Conflicts: xserver-xorg (<< 6.8.2-38), xserver-xfree86 (<< 1:7.0.0),
- xserver-xorg-video, xserver-common, xserver-xorg-video-1.0, xserver-xorg-input,
+ xserver-xorg-video, xserver-common (<< 7), xserver-xorg-video-1.0, xserver-xorg-input,
  xserver-xorg-video-1.9, xserver-xorg-input-wacom (<< 0.7.8),
  xserver-xorg-video-2, xserver-xorg-input-2
 Replaces: xserver-xorg (<< 6.8.2-38), xserver-xfree86 (<< 1:7.0.0),
- xserver-common
+ xserver-common (<< 7)
 Provides: xserver
 Description: Xorg X server - core server
  The Xorg X server is an X server for several architectures and operating
@@ -93,7 +93,7 @@ Description: Xorg X server - development files
 
 Package: xdmx
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, xserver-common
 Description: distributed multihead X server
  Xdmx is a proxy X server that uses one or more other X servers as its
  display device(s). It provides multi-head X functionality for displays that
@@ -128,7 +128,7 @@ Description: Distributed Multihead X tools
 
 Package: xnest
 Architecture: any
-Depends: x11-common, ${shlibs:Depends}, ${misc:Depends}
+Depends: xserver-common, ${shlibs:Depends}, ${misc:Depends}
 Recommends: libgl1-mesa-dri (>= 7.1~rc1)
 Description: Nested X server
  Xnest is a nested X server that simply relays all its requests to another
@@ -147,7 +147,7 @@ Description: Nested X server
 
 Package: xvfb
 Architecture: any
-Depends: x11-common, ${shlibs:Depends}, ${misc:Depends}
+Depends: xserver-common, ${shlibs:Depends}, ${misc:Depends}
 Recommends: xauth, xfonts-base
 Description: Virtual Framebuffer 'fake' X server
  Xvfb provides an X server that can run on machines with no display hardware
@@ -174,7 +174,7 @@ Description: Virtual Framebuffer 'fake' X server
 
 Package: xserver-xephyr
 Architecture: any
-Depends: x11-common, ${shlibs:Depends}, ${misc:Depends}
+Depends: xserver-common, ${shlibs:Depends}, ${misc:Depends}
 Recommends: xbase-clients, xfonts-base, libgl1-mesa-dri (>= 7.1~rc1)
 Description: nested X server
  Xephyr is an X server that can be run inside another X server,
@@ -191,7 +191,7 @@ Description: nested X server
 
 Package: xserver-xfbdev
 Architecture: alpha amd64 arm armeb armel hppa i386 ia64 lpia m32r m68k mips mipsel powerpc ppc64 sh3 sh3eb sh4 sh4eb sparc
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: xserver-common, ${shlibs:Depends}, ${misc:Depends}
 Recommends: xbase-clients, xfonts-base
 Description: Linux framebuffer device tiny X server
  xserver-xfbdev is a Linux framebuffer device tiny X server based on the
@@ -217,3 +217,10 @@ Description: Xorg - the X.Org X server (debugging symbols)
  .
  This package provides debugging symbols for the Xorg X server and associated
  modules.
+
+Package: xserver-common
+Architecture: all
+Depends: x11-common
+Replaces: xserver-xorg-core (<< 2:1.5.2)
+Description: common files used by various X servers
+ This package provides files necessary for all X.Org based X servers.
diff --git a/debian/rules b/debian/rules
index 69da3cd..ee13076 100755
--- a/debian/rules
+++ b/debian/rules
@@ -174,7 +174,13 @@ binary-arch: build install
 
 
 # Build architecture-independent files here
-binary-indep:
+binary-indep: build install
+	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-initial
+	dh_install -i --sourcedir=debian/tmp
+	dh_installdocs -i
+	dh_installchangelogs -i
+
+	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-deb
 
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install
diff --git a/debian/xserver-common.install b/debian/xserver-common.install
new file mode 100644
index 0000000..46a7630
--- /dev/null
+++ b/debian/xserver-common.install
@@ -0,0 +1,2 @@
+usr/lib/xorg/protocol.txt
+usr/share/man/man1/Xserver.1
diff --git a/debian/xserver-xorg-core.install b/debian/xserver-xorg-core.install
index 2fe61f9..c88d80f 100644
--- a/debian/xserver-xorg-core.install
+++ b/debian/xserver-xorg-core.install
@@ -5,7 +5,6 @@ usr/lib/xorg/modules/linux/*.so
 usr/lib/xorg/modules/freebsd/*.so
 usr/lib/xorg/modules/multimedia/*.so
 usr/bin/Xorg
-usr/share/man/man1/Xserver.1
 usr/share/man/man1/Xorg.1
 usr/share/man/man4/exa.4
 usr/share/man/man4/fbdevhw.4

commit c422dc76386eee5743f74c34978f9e9d7466925b
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat Oct 11 02:49:35 2008 +0200

    Don't pass --with-serverconfig-path to configure
    
    We only used to override it for Xprint.

diff --git a/debian/changelog b/debian/changelog
index 72a4dc2..e8a1f7e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ xorg-server (2:1.5.1-2) UNRELEASED; urgency=low
 
   * debian/rules: define PCI_TXT_IDS_DIR to unbreak the pci id matching using
     plain text files provided by drivers.
+  * Don't pass --with-serverconfig-path to configure, we only used to override
+    it for Xprint.
 
  -- Julien Cristau <jcristau@debian.org>  Thu, 25 Sep 2008 18:50:19 +0200
 
diff --git a/debian/rules b/debian/rules
index c04a817..69da3cd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -47,7 +47,6 @@ VENDOR = $(shell lsb_release -i -s)
 confflags += --disable-static \
 	     --enable-xorg \
 	     --with-default-font-path="/usr/share/fonts/X11/misc,/usr/share/fonts/X11/cyrillic,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" \
-	     --with-serverconfig-path=/etc/X11/xserver \
 	     --enable-xtrap \
 	     --enable-glx-tls \
 	     --enable-dmx \

commit 6dcfa994b0777bf0cabeb71672f13e650b340817
Author: Adam Jackson <ajax@redhat.com>
Date:   Fri Oct 10 15:26:32 2008 -0400

    xserver 1.5.2

diff --git a/configure.ac b/configure.ac
index ef276cc..88749a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.5.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="23 September 2008"
+AC_INIT([xorg-server], 1.5.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="10 October 2008"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE

commit 75504517a30f1bdd593c2a32af81084b59b398a5
Author: Adam Jackson <ajax@redhat.com>
Date:   Fri Oct 10 13:41:50 2008 -0400

    EDID: Catch monitors that encode aspect ratio for physical size.
    
    This is not legal in either EDID 1.3 or 1.4, but hey, when did a little
    thing like legality stop anyone.
    (cherry picked from commit 0660dd9d7009147c395b9ea904539f76f55b9a7f)

diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c
index 21391dd..958247c 100644
--- a/hw/xfree86/ddc/interpret_edid.c
+++ b/hw/xfree86/ddc/interpret_edid.c
@@ -85,6 +85,47 @@ handle_edid_quirks(xf86MonPtr m)
 	    }
 	}
     }
+
+    /*
+     * some monitors encode the aspect ratio instead of the physical size.
+     * try to find the largest detailed timing that matches that aspect
+     * ratio and use that to fill in the feature section.
+     */
+    if ((m->features.hsize == 16 && m->features.vsize == 9) ||
+	(m->features.hsize == 16 && m->features.vsize == 10) ||
+	(m->features.hsize == 4 && m->features.vsize == 3) ||
+	(m->features.hsize == 5 && m->features.vsize == 4)) {
+	int real_hsize = 0, real_vsize = 0;
+	float target_aspect, timing_aspect;
+	
+	target_aspect = (float)m->features.hsize / (float)m->features.vsize;
+	for (i = 0; i < 4; i++) {
+	    if (m->det_mon[i].type == DT) {
+		struct detailed_timings *timing;
+		timing = &m->det_mon[i].section.d_timings;
+
+		if (!timing->v_size)
+		    continue;
+
+		timing_aspect = (float)timing->h_size / (float)timing->v_size;
+		if (fabs(1 - (timing_aspect / target_aspect)) < 0.05) {
+		    real_hsize = max(real_hsize, timing->h_size);
+		    real_vsize = max(real_vsize, timing->v_size);
+		}
+	    }
+	}
+
+	if (real_hsize && real_vsize) {
+	    /* convert mm to cm */
+	    m->features.hsize = (real_hsize + 5) / 10;
+	    m->features.vsize = (real_vsize + 5) / 10;
+	} else {
+	    m->features.hsize = m->features.vsize = 0;
+	}
+	
+	xf86Msg(X_INFO, "Quirked EDID physical size to %dx%d cm\n",
+		m->features.hsize, m->features.vsize);
+    }
 }
 
 xf86MonPtr

commit b595b65e54b1e15fbce872fe3719da14cfae5b92
Author: Adam Jackson <ajax@redhat.com>
Date:   Thu Oct 9 14:53:29 2008 -0400

    Revert "Array-index based devPrivates implementation."
    
    This reverts commit 8ef37c194fa08d3911095299413a42a01162b078.

diff --git a/dix/privates.c b/dix/privates.c
index ca03317..efb3204 100644
--- a/dix/privates.c
+++ b/dix/privates.c
@@ -40,8 +40,9 @@ from The Open Group.
 #include "inputstr.h"
 
 struct _Private {
-    int state;
-    pointer value;
+    DevPrivateKey      key;
+    pointer            value;
+    struct _Private    *next;
 };
 
 typedef struct _PrivateDesc {
@@ -49,36 +50,22 @@ typedef struct _PrivateDesc {
     unsigned size;
     CallbackListPtr initfuncs;
     CallbackListPtr deletefuncs;
+    struct _PrivateDesc *next;
 } PrivateDescRec;
 
-#define PRIV_MAX 256
-#define PRIV_STEP 16
-
 /* list of all allocated privates */
-static PrivateDescRec items[PRIV_MAX];
-static int nextPriv;
+static PrivateDescRec *items = NULL;
 
-static PrivateDescRec *
+static _X_INLINE PrivateDescRec *
 findItem(const DevPrivateKey key)
 {
-    if (!*key) {
-	if (nextPriv >= PRIV_MAX)
-	    return NULL;
-
-	items[nextPriv].key = key;
-	*key = nextPriv;
-	nextPriv++;
+    PrivateDescRec *item = items;
+    while (item) {
+	if (item->key == key)
+	    return item;
+	item = item->next;
     }
-
-    return items + *key;
-}
-
-static _X_INLINE int
-privateExists(PrivateRec **privates, const DevPrivateKey key)
-{
-    return *key && *privates &&
-	(*privates)[0].state > *key &&
-	(*privates)[*key].state;
+    return NULL;
 }
 
 /*
@@ -88,10 +75,21 @@ _X_EXPORT int
 dixRequestPrivate(const DevPrivateKey key, unsigned size)
 {
     PrivateDescRec *item = findItem(key);
-    if (!item)
-	return FALSE;
-    if (size > item->size)
+    if (item) {
+	if (size > item->size)
+	    item->size = size;
+    } else {
+	item = (PrivateDescRec *)xalloc(sizeof(PrivateDescRec));
+	if (!item)
+	    return FALSE;
+	memset(item, 0, sizeof(PrivateDescRec));
+
+	/* add privates descriptor */
+	item->key = key;
 	item->size = size;
+	item->next = items;
+	items = item;
+    }
     return TRUE;
 }
 
@@ -102,52 +100,25 @@ _X_EXPORT pointer *
 dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key)
 {
     PrivateDescRec *item = findItem(key);
-    PrivateCallbackRec calldata;
     PrivateRec *ptr;
-    pointer value;
-    int oldsize, newsize;
-
-    newsize = (*key / PRIV_STEP + 1) * PRIV_STEP;
+    unsigned size = sizeof(PrivateRec);
+    
+    if (item)
+	size += item->size;
 
-    /* resize or init privates array */
-    if (!item)
+    ptr = (PrivateRec *)xcalloc(size, 1);
+    if (!ptr)
 	return NULL;
-
-    /* initialize privates array if necessary */
-    if (!*privates) {
-	ptr = xcalloc(newsize, sizeof(*ptr));
-	if (!ptr)
-	    return NULL;
-	*privates = ptr;
-	(*privates)[0].state = newsize;
-    }
-
-    oldsize = (*privates)[0].state;
-
-    /* resize privates array if necessary */
-    if (*key >= oldsize) {
-	ptr = xrealloc(*privates, newsize * sizeof(*ptr));
-	if (!ptr)
-	    return NULL;
-	memset(ptr + oldsize, 0, (newsize - oldsize) * sizeof(*ptr));
-	*privates = ptr;
-	(*privates)[0].state = newsize;
-    }
-
-    /* initialize slot */
-    ptr = *privates + *key;
-    ptr->state = 1;
-    if (item->size) {
-	value = xcalloc(item->size, 1);
-	if (!value)
-	    return NULL;
-	ptr->value = value;
+    ptr->key = key;
+    ptr->value = (size > sizeof(PrivateRec)) ? (ptr + 1) : NULL;
+    ptr->next = *privates;
+    *privates = ptr;
+
+    /* call any init funcs and return */
+    if (item) {
+	PrivateCallbackRec calldata = { key, &ptr->value };
+	CallCallbacks(&item->initfuncs, &calldata);
     }
-
-    calldata.key = key;
-    calldata.value = &ptr->value;
-    CallCallbacks(&item->initfuncs, &calldata);
-
     return &ptr->value;
 }
 
@@ -157,10 +128,14 @@ dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key)
 _X_EXPORT pointer
 dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key)
 {
+    PrivateRec *rec = *privates;
     pointer *ptr;
 
-    if (privateExists(privates, key))
-	return (*privates)[*key].value;
+    while (rec) {
+	if (rec->key == key)
+	    return rec->value;
+	rec = rec->next;
+    }
 
     ptr = dixAllocatePrivate(privates, key);
     return ptr ? *ptr : NULL;
@@ -172,8 +147,13 @@ dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key)
 _X_EXPORT pointer *
 dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key)
 {
-    if (privateExists(privates, key))
-	return &(*privates)[*key].value;
+    PrivateRec *rec = *privates;
+
+    while (rec) {
+	if (rec->key == key)
+	    return &rec->value;
+	rec = rec->next;
+    }
 
     return dixAllocatePrivate(privates, key);
 }
@@ -184,10 +164,16 @@ dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key)
 _X_EXPORT int
 dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val)
 {
+    PrivateRec *rec;
+
  top:
-    if (privateExists(privates, key)) {
-	(*privates)[*key].value = val;
-	return TRUE;
+    rec = *privates;
+    while (rec) {
+	if (rec->key == key) {
+	    rec->value = val;
+	    return TRUE;
+	}
+	rec = rec->next;
     }
 
     if (!dixAllocatePrivate(privates, key))
@@ -201,23 +187,27 @@ dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val)
 _X_EXPORT void
 dixFreePrivates(PrivateRec *privates)
 {
-    int i;
+    PrivateRec *ptr, *next;
+    PrivateDescRec *item;
     PrivateCallbackRec calldata;
 
-    if (privates)
-	for (i = 1; i < privates->state; i++)
-	    if (privates[i].state) {
-		/* call the delete callbacks */
-		calldata.key = items[i].key;
-		calldata.value = &privates[i].value;
-		CallCallbacks(&items[i].deletefuncs, &calldata);
-
-		/* free pre-allocated memory */
-		if (items[i].size)
-		    xfree(privates[i].value);
-	    }
-
-    xfree(privates);
+    /* first pass calls the delete callbacks */
+    for (ptr = privates; ptr; ptr = ptr->next) {
+	item = findItem(ptr->key);
+	if (item) {
+	    calldata.key = ptr->key;
+	    calldata.value = &ptr->value;
+	    CallCallbacks(&item->deletefuncs, &calldata);
+	}
+    }
+	
+    /* second pass frees the memory */
+    ptr = privates;
+    while (ptr) {
+	next = ptr->next;
+	xfree(ptr);
+	ptr = next;
+    }
 }
 
 /*
@@ -228,9 +218,11 @@ dixRegisterPrivateInitFunc(const DevPrivateKey key,
 			   CallbackProcPtr callback, pointer data)
 {
     PrivateDescRec *item = findItem(key);
-    if (!item)
-	return FALSE;
-
+    if (!item) {
+	if (!dixRequestPrivate(key, 0))
+	    return FALSE;
+	item = findItem(key);
+    }
     return AddCallback(&item->initfuncs, callback, data);
 }
 
@@ -239,9 +231,11 @@ dixRegisterPrivateDeleteFunc(const DevPrivateKey key,
 			     CallbackProcPtr callback, pointer data)
 {
     PrivateDescRec *item = findItem(key);
-    if (!item)
-	return FALSE;
-
+    if (!item) {
+	if (!dixRequestPrivate(key, 0))
+	    return FALSE;
+	item = findItem(key);
+    }
     return AddCallback(&item->deletefuncs, callback, data);
 }
 
@@ -298,17 +292,16 @@ dixLookupPrivateOffset(RESTYPE type)
 int
 dixResetPrivates(void)
 {
-    int i;
-
-    /* reset private descriptors */
-    for (i = 1; i < nextPriv; i++) {
-	*items[i].key = 0;
-	DeleteCallbackList(&items[i].initfuncs);
-	DeleteCallbackList(&items[i].deletefuncs);
+    PrivateDescRec *next;
+
+    /* reset internal structures */
+    while (items) {
+	next = items->next;
+	DeleteCallbackList(&items->initfuncs);
+	DeleteCallbackList(&items->deletefuncs);
+	xfree(items);
+	items = next;
     }
-    nextPriv = 1;
-
-    /* reset offsets */
     if (offsets)
 	xfree(offsets);
     offsetsSize = sizeof(offsetDefaults);
diff --git a/include/privates.h b/include/privates.h
index e3fa83c..98d893c 100644
--- a/include/privates.h
+++ b/include/privates.h
@@ -19,7 +19,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  * STUFF FOR PRIVATES
  *****************************************************************/
 
-typedef int *DevPrivateKey;
+typedef void *DevPrivateKey;
 struct _Private;
 typedef struct _Private PrivateRec;
 

commit ca659813a81074cae55ffec51f923c658480b618
Author: Julien Cristau <jcristau@debian.org>
Date:   Wed Oct 8 19:46:50 2008 +0200

    Fix GKVE with key_code > 255
    
    Move the keycode validation checks before use.

diff --git a/dix/getevents.c b/dix/getevents.c
index fbead11..1e0edbf 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -411,9 +411,6 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
     KeySym sym;
     deviceKeyButtonPointer *kbp = NULL;
 
-    sym = map[(key_code - pDev->key->curKeySyms.minKeyCode)
-              * pDev->key->curKeySyms.mapWidth];
-
     if (!events)
         return 0;
 
@@ -428,6 +425,9 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
     if (key_code < 8 || key_code > 255)
         return 0;
 
+    sym = map[(key_code - pDev->key->curKeySyms.minKeyCode)
+              * pDev->key->curKeySyms.mapWidth];
+
     if (pDev->coreEvents)
         numEvents = 2;
     else

commit 8337c9aa3d2009eea801a84b3a65272e03e65e1a
Author: Luc Verhaegen <libv@skynet.be>
Date:   Wed Oct 8 14:55:29 2008 +0200

    DGA: Fix ProcXF86DGASetViewPort for missing support in driver.
    
    Fixes a segfault when trying to activate a DGA mode without checking
    whether DGA modesetting is at all possible.
    (cherry picked from commit 1feb69eb63e6739ff5db255ad529e84adf941a10)

diff --git a/hw/xfree86/dixmods/extmod/xf86dga.c b/hw/xfree86/dixmods/extmod/xf86dga.c
index 0736167..c66bca2 100644
--- a/hw/xfree86/dixmods/extmod/xf86dga.c
+++ b/hw/xfree86/dixmods/extmod/xf86dga.c
@@ -93,7 +93,7 @@ ProcXF86DGADirectVideo(ClientPtr client)
 
     REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq);
 
-    if (!DGAAvailable(stuff->screen)) 
+    if (!DGAAvailable(stuff->screen))
 	return DGAErrorBase + XF86DGANoDirectVideoMode;
 
     if (stuff->enable & XF86DGADirectGraphics) {
@@ -128,7 +128,7 @@ ProcXF86DGAGetViewPortSize(ClientPtr client)
     rep.length = 0;
     rep.sequenceNumber = client->sequence;


Reply to: