[arch-commits] Commit in xorg-server/trunk (4 files)

Jan de Groot jgc at archlinux.org
Fri Aug 14 11:25:02 UTC 2009


    Date: Friday, August 14, 2009 @ 07:25:02
  Author: jgc
Revision: 49647

upgpkg: xorg-server 1.6.3-3
    Use more official patch for issues with hal
Fix problem with xext that causes gnome-power-manager to blank the screen too often

Added:
  xorg-server/trunk/hal-init-failed.patch
  xorg-server/trunk/xext-fix-sync-transitions.patch
Modified:
  xorg-server/trunk/PKGBUILD
Deleted:
  xorg-server/trunk/revert-hal-checks.patch

---------------------------------+
 PKGBUILD                        |   17 ++++---
 hal-init-failed.patch           |   65 ++++++++++++++++++++++++++++
 revert-hal-checks.patch         |   87 --------------------------------------
 xext-fix-sync-transitions.patch |   69 ++++++++++++++++++++++++++++++
 4 files changed, 145 insertions(+), 93 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-08-14 08:03:57 UTC (rev 49646)
+++ PKGBUILD	2009-08-14 11:25:02 UTC (rev 49647)
@@ -4,13 +4,13 @@
 
 pkgname=xorg-server
 pkgver=1.6.3
-pkgrel=2
+pkgrel=3
 pkgdesc="X.Org X servers"
 arch=('i686' 'x86_64')
 license=('custom')
 url="http://xorg.freedesktop.org"
 depends=('hal>=0.5.11' 'libgl' 'libxfont>=1.4.0' 'openssl>=0.9.8k' 'libpciaccess>=0.10.6' 'libxv>=1.0.4' 'pixman>=0.14.0' 'xcursor-themes' 'xkeyboard-config>=1.6' 'xorg-server-utils' 'xorg-fonts-misc' 'xbitmaps' 'diffutils' 'xf86-input-evdev>=2.2.3')
-makedepends=('libx11>=1.2.2' 'mesa>=7.5' 'xf86driproto>=2.0.4' 'xtrans>=1.2.4' 'libxkbfile>=1.0.5' 'randrproto>=1.3.0' 'renderproto>=0.9.3' 'xcmiscproto>=1.1.2' 'bigreqsproto>=1.0.2' 'resourceproto>=1.0.2' 'videoproto>=2.2.2' 'compositeproto>=0.4' 'scrnsaverproto>=1.1.0' 'xf86dgaproto>=2.0.3' 'recordproto>=1.13.2' 'libgl>=7.5' 'glproto>=1.4.9' 'xorg-util-macros')
+makedepends=('libx11>=1.2.2' 'mesa>=7.5' 'xf86driproto>=2.0.4' 'xtrans>=1.2.4' 'libxkbfile>=1.0.5' 'randrproto>=1.3.0' 'renderproto>=0.9.3' 'xcmiscproto>=1.1.2' 'bigreqsproto>=1.0.2' 'resourceproto>=1.0.2' 'videoproto>=2.2.2' 'compositeproto>=0.4' 'scrnsaverproto>=1.1.0' 'xf86dgaproto>=2.0.3' 'recordproto>=1.13.2' 'libgl>=7.5' 'glproto>=1.4.9' 'xorg-util-macros' 'xineramaproto')
 conflicts=('catalyst-utils<=9.2')
 options=('!libtool')
 provides=('x-server')
@@ -18,12 +18,14 @@
 install=xorg-server.install
 source=(${url}/releases/individual/xserver/${pkgname}-${pkgver}.tar.bz2
         xorg-redhat-die-ugly-pattern-die-die-die.patch
-        revert-hal-checks.patch
+        hal-init-failed.patch
+        xext-fix-sync-transitions.patch
         xvfb-run
         xvfb-run.1)
 md5sums=('0af168abeefa6579cab20387f75c0c7a'
          '1a336eb22e27cbf443ec5a2ecddfa93c'
-         'ea12d6b313d021b49da4e3428c6d1f77'
+         '0f30199da182c531eabd5bbf1c2707e3'
+         '2171fbbdb0b4c51a60ad0944351cd910'
          '52fd3effd80d7bc6c1660d4ecf23d31c'
          '376c70308715cd2643f7bff936d9934b')
 
@@ -32,9 +34,12 @@
   # Get rid of the ugly pattern
   patch -Np3 -i "${srcdir}/xorg-redhat-die-ugly-pattern-die-die-die.patch" || return  1
 
-  # Revert extra hal checks to fix FS#15762
-  patch -Np1 -R -i "${srcdir}/revert-hal-checks.patch" || return 1
+  # Fix crash/abort on hal initialization failure
+  patch -Np1 -i "${srcdir}/hal-init-failed.patch" || return 1
 
+  # Fix issue with gnome-power-manager random screen blanking
+  patch -Np1 -i "${srcdir}/xext-fix-sync-transitions.patch" || return 1
+
   # Fix dbus config path
   sed -i -e 's/\$(sysconfdir)/\/etc/' config/Makefile.*  || return 1
 

Added: hal-init-failed.patch
===================================================================
--- hal-init-failed.patch	                        (rev 0)
+++ hal-init-failed.patch	2009-08-14 11:25:02 UTC (rev 49647)
@@ -0,0 +1,65 @@
+From 49046088f10cceaea7da97401d742d3fb59371f5 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Thu, 13 Aug 2009 23:48:45 +0000
+Subject: config: don't shutdown the libhal ctx if it failed to initialize (#23213)
+
+Regression introduced by b1c3dc6ae226db178420e3b5f297b94afc87c94c.
+Shutting down the libhal_ctx if the init failed may cause an abort.
+This can happen if hald is not yet running at server startup.
+
+X.Org Bug 23213 <http://bugs.freedesktop.org/show_bug.cgi?id=23213>
+
+Tested-by: Stefan Dirsch
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+---
+diff --git a/config/hal.c b/config/hal.c
+index 59bff66..28f55a0 100644
+--- a/config/hal.c
++++ b/config/hal.c
+@@ -489,13 +489,13 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
+ 
+     if (!libhal_ctx_set_dbus_connection(info->hal_ctx, info->system_bus)) {
+         LogMessage(X_ERROR, "config/hal: couldn't associate HAL context with bus\n");
+-        goto out_ctx;
++        goto out_err;
+     }
+     if (!libhal_ctx_init(info->hal_ctx, &error)) {
+         LogMessage(X_ERROR, "config/hal: couldn't initialise context: %s (%s)\n",
+ 		   error.name ? error.name : "unknown error",
+ 		   error.message ? error.message : "null");
+-        goto out_ctx;
++        goto out_err;
+     }
+     if (!libhal_device_property_watch_all(info->hal_ctx, &error)) {
+         LogMessage(X_ERROR, "config/hal: couldn't watch all properties: %s (%s)\n",
+@@ -526,19 +526,20 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
+ out_ctx:
+     dbus_error_free(&error);
+ 
+-    if (info->hal_ctx) {
+-        if (!libhal_ctx_shutdown(info->hal_ctx, &error)) {
+-            LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n",
+-		       error.name ? error.name : "unknown error",
+-		       error.message ? error.message : "null");
+-            dbus_error_free(&error);
+-        }
+-        libhal_ctx_free(info->hal_ctx);
++    if (!libhal_ctx_shutdown(info->hal_ctx, &error)) {
++        LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n",
++                error.name ? error.name : "unknown error",
++                error.message ? error.message : "null");
++        dbus_error_free(&error);
+     }
+ 
+ out_err:
+     dbus_error_free(&error);
+ 
++    if (info->hal_ctx) {
++        libhal_ctx_free(info->hal_ctx);
++    }
++
+     info->hal_ctx = NULL;
+     info->system_bus = NULL;
+ 
+--
+cgit v0.8.2

Deleted: revert-hal-checks.patch
===================================================================
--- revert-hal-checks.patch	2009-08-14 08:03:57 UTC (rev 49646)
+++ revert-hal-checks.patch	2009-08-14 11:25:02 UTC (rev 49647)
@@ -1,87 +0,0 @@
-From c941479ecc2dead9c3deaee2620c9b9518c3da9a Mon Sep 17 00:00:00 2001
-From: Rémi Cardona <remi at gentoo.org>
-Date: Mon, 27 Jul 2009 10:07:51 +0000
-Subject: config: add HAL error checks
-
-This patch simplifies error handling in the HAL code and fixes a
-segfault if libhal_find_device_by_capability() failed.
-
-Fixes http://bugs.gentoo.org/278760
-
-Based on a patch by Martin von Gagern <Martin.vGagern at gmx.net>
-
-Signed-off-by: Rémi Cardona <remi at gentoo.org>
-Acked-by: Peter Hutterer <peter.hutterer at who-t.net>
-(cherry picked from commit b1c3dc6ae226db178420e3b5f297b94afc87c94c)
----
-diff --git a/config/hal.c b/config/hal.c
-index 731d9b8..59bff66 100644
---- a/config/hal.c
-+++ b/config/hal.c
-@@ -474,13 +474,13 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
-     char **devices;
-     int num_devices, i;
- 
-+    if (info->hal_ctx)
-+        return TRUE; /* already registered, pretend we did something */
-+
-     info->system_bus = connection;
- 
-     dbus_error_init(&error);
- 
--    if (info->hal_ctx)
--        return TRUE; /* already registered, pretend we did something */
--
-     info->hal_ctx = libhal_ctx_new();
-     if (!info->hal_ctx) {
-         LogMessage(X_ERROR, "config/hal: couldn't create HAL context\n");
-@@ -501,7 +501,7 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
-         LogMessage(X_ERROR, "config/hal: couldn't watch all properties: %s (%s)\n",
- 		   error.name ? error.name : "unknown error",
- 		   error.message ? error.message : "null");
--        goto out_ctx2;
-+        goto out_ctx;
-     }
-     libhal_ctx_set_device_added(info->hal_ctx, device_added);
-     libhal_ctx_set_device_removed(info->hal_ctx, device_removed);
-@@ -509,6 +509,12 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
-     devices = libhal_find_device_by_capability(info->hal_ctx, "input",
-                                                &num_devices, &error);
-     /* FIXME: Get default devices if error is set. */
-+    if (dbus_error_is_set(&error)) {
-+        LogMessage(X_ERROR, "config/hal: couldn't find input device: %s (%s)\n",
-+		   error.name ? error.name : "unknown error",
-+		   error.message ? error.message : "null");
-+        goto out_ctx;
-+    }
-     for (i = 0; i < num_devices; i++)
-         device_added(info->hal_ctx, devices[i]);
-     libhal_free_string_array(devices);
-@@ -517,13 +523,19 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
- 
-     return TRUE;
- 
--out_ctx2:
--    if (!libhal_ctx_shutdown(info->hal_ctx, &error))
--        LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n",
--		   error.name ? error.name : "unknown error",
--		   error.message ? error.message : "null");
- out_ctx:
--    libhal_ctx_free(info->hal_ctx);
-+    dbus_error_free(&error);
-+
-+    if (info->hal_ctx) {
-+        if (!libhal_ctx_shutdown(info->hal_ctx, &error)) {
-+            LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n",
-+		       error.name ? error.name : "unknown error",
-+		       error.message ? error.message : "null");
-+            dbus_error_free(&error);
-+        }
-+        libhal_ctx_free(info->hal_ctx);
-+    }
-+
- out_err:
-     dbus_error_free(&error);
- 
---
-cgit v0.8.2

Added: xext-fix-sync-transitions.patch
===================================================================
--- xext-fix-sync-transitions.patch	                        (rev 0)
+++ xext-fix-sync-transitions.patch	2009-08-14 11:25:02 UTC (rev 49647)
@@ -0,0 +1,69 @@
+From db568f9eabf3450d8a023597ff007df355b13ea8 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Thu, 13 Aug 2009 06:37:00 +0000
+Subject: Xext: fix up wrong conditions for negative sync transitions.
+
+If the counter had a value higher than the trigger value for a negative
+transition, the trigger value did not get set.
+
+The correct sequence of checks is:
+if (positive transition)
+   if (counter value < trigger value)
+      set up trigger
+if (negative transition)
+   if (counter value > trigger value)
+      set up trigger
+
+Red Hat Bug 501601 <https://bugzilla.redhat.com/show_bug.cgi?id=501601>
+
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+---
+diff --git a/Xext/sync.c b/Xext/sync.c
+index 5f4ce56..667f8ab 100644
+--- a/Xext/sync.c
++++ b/Xext/sync.c
+@@ -962,28 +962,24 @@ SyncComputeBracketValues(SyncCounter *pCounter, Bool startOver)
+ 		pnewltval = &psci->bracket_less;
+ 	    }
+ 	}
+-	else if ( (pTrigger->test_type == XSyncPositiveTransition &&
++	else if (pTrigger->test_type == XSyncNegativeTransition &&
+ 		   ct != XSyncCounterNeverIncreases)
+-		 ||
+-		 (pTrigger->test_type == XSyncNegativeTransition &&
++	{
++	    if (XSyncValueGreaterThan(pCounter->value, pTrigger->test_value) &&
++		XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less))
++	    {
++		psci->bracket_less = pTrigger->test_value;
++		pnewltval = &psci->bracket_less;
++	    }
++	}
++        else if (pTrigger->test_type == XSyncPositiveTransition &&
+ 		  ct != XSyncCounterNeverDecreases)
+-		 )
+ 	{
+-	    if (XSyncValueLessThan(pCounter->value, pTrigger->test_value))
++	    if (XSyncValueLessThan(pCounter->value, pTrigger->test_value) &&
++		XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater))
+ 	    {
+-		if (XSyncValueLessThan(pTrigger->test_value,
+-				       psci->bracket_greater))
+-		{
+-		    psci->bracket_greater = pTrigger->test_value;
+-		    pnewgtval = &psci->bracket_greater;
+-		}
+-		else
+-		if (XSyncValueGreaterThan(pTrigger->test_value,
+-					  psci->bracket_less))
+-		{
+-		    psci->bracket_less = pTrigger->test_value;
+-		    pnewltval = &psci->bracket_less;
+-		}
++		psci->bracket_greater = pTrigger->test_value;
++		pnewgtval = &psci->bracket_greater;
+ 	    }
+ 	}
+     } /* end for each trigger */
+--
+cgit v0.8.2




More information about the arch-commits mailing list