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

xorg-server: Changes to 'ubuntu'



 debian/changelog                                        |    8 +
 debian/patches/226_fall_back_to_autoconfiguration.patch |  105 ++++++++++++++++
 debian/patches/series                                   |    1 
 3 files changed, 113 insertions(+), 1 deletion(-)

New commits:
commit 403e6572b3a7e121c4fff33a687fcef721d5d8a9
Author: Alberto Milone <alberto.milone@canonical.com>
Date:   Thu Feb 9 16:48:37 2012 +0100

    Fall back to autoconfiguration for graphics drivers in some cases
    
    * Fall back to autoconfiguration for graphics drivers in some cases
      - Add 226_fall_back_to_autoconfiguration.patch

diff --git a/debian/changelog b/debian/changelog
index 52f69ac..a4f2e71 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,15 @@
 xorg-server (2:1.11.3-0ubuntu11) UNRELEASED; urgency=low
 
+  [ Chase Douglas ]
   * Allow for non-root config paths so xorg-gtest can be run without root
     - Add 225_non-root_config_paths.patch backported from upstream
 
- -- Chase Douglas <chase.douglas@ubuntu.com>  Thu, 02 Feb 2012 17:01:49 -0800
+  [ Alberto Milone]
+  * debian/patches/226_fall_back_to_autoconfiguration.patch:
+    - Fall back to autoconfiguration for graphics drivers in some cases
+      instead of letting X fail when configuration files are available.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Thu, 09 Feb 2012 16:57:10 +0100
 
 xorg-server (2:1.11.3-0ubuntu10) precise; urgency=low
 
diff --git a/debian/patches/226_fall_back_to_autoconfiguration.patch b/debian/patches/226_fall_back_to_autoconfiguration.patch
new file mode 100644
index 0000000..4a513fb
--- /dev/null
+++ b/debian/patches/226_fall_back_to_autoconfiguration.patch
@@ -0,0 +1,105 @@
+From 1d22d773f67f8c00ab8881d2cce00ef95abf24f7 Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Fri, 27 Jan 2012 19:31:55 +0100
+Subject: [PATCH 1/1] Try to fall back to autoconfiguration in some cases
+ despite having configuration files
+
+Fall back to autoconfiguration if either the graphics
+driver module specified in configuration files can't be
+found or if there's no device supported by the specified
+driver.
+
+Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
+---
+ hw/xfree86/common/xf86Globals.c |    1 +
+ hw/xfree86/common/xf86Init.c    |   31 ++++++++++++++++++++++++++-----
+ hw/xfree86/common/xf86Priv.h    |    1 +
+ 3 files changed, 28 insertions(+), 5 deletions(-)
+
+diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
+index 16d5557..a1a06ad 100644
+--- a/hw/xfree86/common/xf86Globals.c
++++ b/hw/xfree86/common/xf86Globals.c
+@@ -155,6 +155,7 @@ int xf86NumDrivers = 0;
+ InputDriverPtr *xf86InputDriverList = NULL;
+ int xf86NumInputDrivers = 0;
+ int xf86NumScreens = 0;
++Bool xf86AttemptedFallback = FALSE;
+ 
+ const char *xf86VisualNames[] = {
+ 	"StaticGray",
+diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
+index 0a47140..a0c7f51 100644
+--- a/hw/xfree86/common/xf86Init.c
++++ b/hw/xfree86/common/xf86Init.c
+@@ -411,20 +411,34 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
+       free(optionlist);
+     }
+ 
++Fallback:
+     /* Load all driver modules specified in the config file */
+     /* If there aren't any specified in the config file, autoconfig them */
+     /* FIXME: Does not handle multiple active screen sections, but I'm not
+      * sure if we really want to handle that case*/
+     configured_device = xf86ConfigLayout.screens->screen->device;
+-    if ((!configured_device) || (!configured_device->driver)) {
++    if (xf86AttemptedFallback) {
++        configured_device->driver = NULL;
++        if (!autoConfigDevice(configured_device)) {
++            xf86Msg(X_ERROR, "Auto configuration on fallback failed\n");
++            return;
++        }
++    }
++    else if ((!configured_device) || (!configured_device->driver)) {
+         if (!autoConfigDevice(configured_device)) {
+             xf86Msg(X_ERROR, "Automatic driver configuration failed\n");
+             return ;
+         }
+     }
+     if ((modulelist = xf86DriverlistFromConfig())) {
+-      xf86LoadModules(modulelist, NULL);
+-      free(modulelist);
++      if (!xf86LoadModules(modulelist, NULL) && !xf86AttemptedFallback) {
++          free(modulelist);
++          xf86AttemptedFallback = TRUE;
++          goto Fallback;
++      }
++      else {
++          free(modulelist);
++      }
+     }
+ 
+     /* Load all input driver modules specified in the config file. */
+@@ -483,8 +497,15 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
+     else
+ 	xf86Info.dontVTSwitch = TRUE;
+ 
+-    if (xf86BusConfig() == FALSE)
+-        return;
++    if (xf86BusConfig() == FALSE) {
++        if (!xf86AttemptedFallback) {
++            xf86AttemptedFallback = TRUE;
++            goto Fallback;
++        }
++        else {
++            return;
++        }
++    }
+ 
+     xf86PostProbe();
+ 
+diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
+index 1fe3d7e..c342424 100644
+--- a/hw/xfree86/common/xf86Priv.h
++++ b/hw/xfree86/common/xf86Priv.h
+@@ -86,6 +86,7 @@ extern _X_EXPORT  int xf86NumDrivers;
+ extern _X_EXPORT  Bool xf86Resetting;
+ extern _X_EXPORT  Bool xf86Initialising;
+ extern _X_EXPORT  int xf86NumScreens;
++extern _X_EXPORT  Bool xf86AttemptedFallback;
+ extern _X_EXPORT  const char *xf86VisualNames[];
+ extern _X_EXPORT  int xf86Verbose;                 /* verbosity level */
+ extern _X_EXPORT  int xf86LogVerbose;		/* log file verbosity level */
+-- 
+1.7.5.4
+
diff --git a/debian/patches/series b/debian/patches/series
index ac92701..b5c86f6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -32,6 +32,7 @@
 223_indirect_touch_x_y_valuators.patch
 224_return_BadWindow_not_BadMatch.diff
 225_non-root_config_paths.patch
+226_fall_back_to_autoconfiguration.patch
 
 # Temporary, until it's reviewed & accepted upstream
 500_pointer_barrier_thresholds.diff


Reply to: