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

xorg-server: Changes to 'debian-experimental'



 debian/changelog                                |    9 ++
 debian/patches/03_auto_load_driver.diff         |  104 +++++++++++++-----------
 debian/patches/04_auto_load_driver_no_conf.diff |   28 ++++++
 debian/patches/21_glx_align_fixes.patch         |   18 ++--
 debian/patches/series                           |    1 
 5 files changed, 105 insertions(+), 55 deletions(-)

New commits:
commit 75a06c406fc35700240027b9de5fbeb2c9db65c3
Author: David Nusinow <dnusinow@debian.org>
Date:   Thu Aug 23 22:38:55 2007 -0400

    Add 04_auto_load_driver_no_config.diff
    
    This patch uses my auto_load_driver method when there's no xorg.conf present

diff --git a/debian/changelog b/debian/changelog
index 9237277..2b18add 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,10 @@ xorg-server (2:1.3.99.0-3) unreleased; urgency=low
 
   * Refactor auto_load_driver patch to allow the same method to be used when
     there is no xorg.conf present
+  * Add 04_auto_load_driver_no_config.diff to use my auto_load_driver method
+    when there's no xorg.conf present 
 
- -- David Nusinow <dnusinow@debian.org>  Thu, 23 Aug 2007 21:06:32 -0400
+ -- David Nusinow <dnusinow@debian.org>  Thu, 23 Aug 2007 22:37:41 -0400
 
 xorg-server (2:1.3.99.0-2) experimental; urgency=low
 
diff --git a/debian/patches/04_auto_load_driver_no_conf.diff b/debian/patches/04_auto_load_driver_no_conf.diff
new file mode 100644
index 0000000..445fcf4
--- /dev/null
+++ b/debian/patches/04_auto_load_driver_no_conf.diff
@@ -0,0 +1,28 @@
+Index: xorg-server/hw/xfree86/common/xf86AutoConfig.c
+===================================================================
+--- xorg-server.orig/hw/xfree86/common/xf86AutoConfig.c	2007-08-23 22:28:33.000000000 -0400
++++ xorg-server/hw/xfree86/common/xf86AutoConfig.c	2007-08-23 22:30:10.000000000 -0400
+@@ -220,22 +220,7 @@
+     char *driver = NULL;
+     ConfigStatus ret;
+ 
+-    /* Find the primary device, and get some information about it. */
+-    if (xf86PciVideoInfo) {
+-	for (pciptr = xf86PciVideoInfo; (info = *pciptr); pciptr++) {
+-	    if (xf86IsPrimaryPci(info)) {
+-		break;
+-	    }
+-	}
+-	if (!info) {
+-	    ErrorF("Primary device is not PCI\n");
+-	}
+-    } else {
+-	ErrorF("xf86PciVideoInfo is not set\n");
+-    }
+-
+-    if (info)
+-	driver = videoPtrToDriverName(info);
++    driver = chooseVideoDriver();
+ 
+     AppendToConfig(BUILTIN_MODULE_SECTION);
+     AppendToConfig(BUILTIN_MONITOR_SECTION);
diff --git a/debian/patches/21_glx_align_fixes.patch b/debian/patches/21_glx_align_fixes.patch
index 6c3331c..f39938c 100644
--- a/debian/patches/21_glx_align_fixes.patch
+++ b/debian/patches/21_glx_align_fixes.patch
@@ -1,7 +1,7 @@
 Index: xorg-server/GL/glx/Makefile.am
 ===================================================================
---- xorg-server.orig/GL/glx/Makefile.am	2007-08-16 22:36:59.000000000 -0400
-+++ xorg-server/GL/glx/Makefile.am	2007-08-16 22:47:32.000000000 -0400
+--- xorg-server.orig/GL/glx/Makefile.am	2007-08-23 21:57:04.000000000 -0400
++++ xorg-server/GL/glx/Makefile.am	2007-08-23 21:57:10.000000000 -0400
 @@ -14,7 +14,8 @@
  	-I@MESA_SOURCE@/src/mesa/glapi \
  	-I@MESA_SOURCE@/src/mesa/main \
@@ -14,9 +14,9 @@ Index: xorg-server/GL/glx/Makefile.am
  #sdk_HEADERS =
 Index: xorg-server/configure.ac
 ===================================================================
---- xorg-server.orig/configure.ac	2007-08-16 22:46:38.000000000 -0400
-+++ xorg-server/configure.ac	2007-08-16 22:47:32.000000000 -0400
-@@ -276,6 +276,7 @@
+--- xorg-server.orig/configure.ac	2007-08-23 21:57:04.000000000 -0400
++++ xorg-server/configure.ac	2007-08-23 21:57:10.000000000 -0400
+@@ -282,6 +282,7 @@
  	case $host_os in
  		*netbsd*)	AC_DEFINE(USE_ALPHA_PIO, 1, [NetBSD PIO alpha IO]) ;;
  	esac
@@ -24,7 +24,7 @@ Index: xorg-server/configure.ac
  	;;
    arm*)
  	ARM_VIDEO=yes
-@@ -305,6 +306,7 @@
+@@ -311,6 +312,7 @@
  	xorg_loader_sparcmuldiv="yes"
  	SPARC64_VIDEO=yes
  	BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c"
@@ -32,7 +32,7 @@ Index: xorg-server/configure.ac
  	;;
    x86_64*|amd64*)
    	use_x86_asm="yes"
-@@ -319,8 +321,16 @@
+@@ -325,8 +327,16 @@
  				SYS_LIBS=-lamd64
  				;;
  	esac
@@ -51,8 +51,8 @@ Index: xorg-server/configure.ac
  AM_CONDITIONAL(ALPHA_VIDEO, [test "x$ALPHA_VIDEO" = xyes])
 Index: xorg-server/hw/dmx/glxProxy/Makefile.am
 ===================================================================
---- xorg-server.orig/hw/dmx/glxProxy/Makefile.am	2007-08-04 18:25:15.000000000 -0400
-+++ xorg-server/hw/dmx/glxProxy/Makefile.am	2007-08-16 22:47:32.000000000 -0400
+--- xorg-server.orig/hw/dmx/glxProxy/Makefile.am	2007-08-23 21:57:04.000000000 -0400
++++ xorg-server/hw/dmx/glxProxy/Makefile.am	2007-08-23 21:57:10.000000000 -0400
 @@ -32,6 +32,7 @@
                          unpack.h
  
diff --git a/debian/patches/series b/debian/patches/series
index 95b31a4..b06baee 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,7 @@
 001_ubuntu_add_extra_modelines_from_xorg.patch -p1
 02_libvgahw_gcc4_volatile_fix.diff
 03_auto_load_driver.diff
+04_auto_load_driver_no_conf.diff
 06_use_proc_instead_of_sysfs_for_pci_domains.diff
 10_dont_look_in_home_for_config.diff -p0
 13_debian_add_xkbpath_env_variable.diff

commit 7c7efcd1b8d8829fdfd643cea07df528cafd43a6
Author: David Nusinow <dnusinow@debian.org>
Date:   Thu Aug 23 22:27:56 2007 -0400

    Split autoConfigDevice in to separate functions for device and device

diff --git a/debian/changelog b/debian/changelog
index d02eedb..9237277 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xorg-server (2:1.3.99.0-3) unreleased; urgency=low
+
+  * Refactor auto_load_driver patch to allow the same method to be used when
+    there is no xorg.conf present
+
+ -- David Nusinow <dnusinow@debian.org>  Thu, 23 Aug 2007 21:06:32 -0400
+
 xorg-server (2:1.3.99.0-2) experimental; urgency=low
 
   * Improve 03_auto_load_driver.diff
diff --git a/debian/patches/03_auto_load_driver.diff b/debian/patches/03_auto_load_driver.diff
index d6ae102..65a5e1a 100644
--- a/debian/patches/03_auto_load_driver.diff
+++ b/debian/patches/03_auto_load_driver.diff
@@ -1,7 +1,7 @@
 Index: xorg-server/hw/xfree86/common/xf86AutoConfig.c
 ===================================================================
---- xorg-server.orig/hw/xfree86/common/xf86AutoConfig.c	2007-08-19 13:05:23.000000000 -0400
-+++ xorg-server/hw/xfree86/common/xf86AutoConfig.c	2007-08-19 13:06:48.000000000 -0400
+--- xorg-server.orig/hw/xfree86/common/xf86AutoConfig.c	2007-08-23 21:55:25.000000000 -0400
++++ xorg-server/hw/xfree86/common/xf86AutoConfig.c	2007-08-23 21:56:10.000000000 -0400
 @@ -39,6 +39,7 @@
  #include "xf86Config.h"
  #include "xf86Priv.h"
@@ -10,7 +10,7 @@ Index: xorg-server/hw/xfree86/common/xf86AutoConfig.c
  
  /* Sections for the default built-in configuration. */
  
-@@ -287,3 +288,191 @@
+@@ -287,3 +288,202 @@
  
      return (ret == CONFIG_OK);
  }
@@ -36,11 +36,44 @@ Index: xorg-server/hw/xfree86/common/xf86AutoConfig.c
 +{
 +    GDevPtr ptr = NULL;
 +    confScreenPtr scrn = NULL;
++
++    if (!xf86configptr) {
++        return NULL;
++    }
++
++    ptr = (GDevPtr)xalloc(sizeof(GDevRec));
++    if (!ptr) {
++        return NULL;
++    }
++    memset((GDevPtr)ptr, 0, sizeof(GDevRec));
++    ptr->chipID = -1;
++    ptr->chipRev = -1;
++    ptr->irq = -1;
++
++    ptr->active = TRUE;
++    ptr->claimed = FALSE;
++    ptr->identifier = "Autoconfigured Video Device";
++    ptr->driver = chooseVideoDriver();
++
++    /* TODO Handle multiple screen sections */
++    if (xf86ConfigLayout.screens && !xf86ConfigLayout.screens->screen->device) {   
++        xf86ConfigLayout.screens->screen->device = ptr;
++        ptr->myScreenSection = xf86ConfigLayout.screens->screen;
++    }
++    xf86Msg(X_DEFAULT, "Assigned the driver to the xf86ConfigLayout\n");
++
++    return ptr;
++}
++
++char*
++chooseVideoDriver(void)
++{
 +    pciVideoPtr *pciptr, info = NULL;
 +    DIR *idsdir;
 +    FILE *fp;
 +    struct dirent *direntry;
 +    char *line = NULL;
++    char *chosen_driver = NULL;
 +    size_t len;
 +    ssize_t read;
 +    char path_name[256], vendor_str[5], chip_str[5];
@@ -48,18 +81,6 @@ Index: xorg-server/hw/xfree86/common/xf86AutoConfig.c
 +    int i, j;
 +    char *matches[20]; /* If we have more than 20 drivers we're in trouble */
 +    
-+    if (!xf86configptr) {
-+        goto end;
-+    }
-+
-+    ptr = (GDevPtr)xalloc(sizeof(GDevRec));
-+    if (!ptr) {
-+        goto end;
-+    }
-+    memset((GDevPtr)ptr, 0, sizeof(GDevRec));
-+    ptr->chipID = -1;
-+    ptr->chipRev = -1;
-+    ptr->irq = -1;
 +    for (i=0 ; i<20 ; i++)
 +        matches[i] = NULL;
 +
@@ -165,47 +186,37 @@ Index: xorg-server/hw/xfree86/common/xf86AutoConfig.c
 +
 +    /* TODO Handle multiple drivers claiming to support the same PCI ID */
 +    if (matches[0]) {
-+        ptr->driver = matches[0];
++        chosen_driver = matches[0];
 +    } else {
 +        #if defined  __i386__ || defined __amd64__ || defined __hurd__
-+        ptr->driver = "vesa";
++        chosen_driver = "vesa";
 +        #elif defined __alpha__
-+        ptr->driver = "vga";
++        chosen_driver = "vga";
 +        #elif defined __sparc__
-+        ptr->driver = "sunffb";
-+        #else ptr->driver = "fbdev";
++        chosen_driver = "sunffb";
++        #else chosen_driver = "fbdev";
 +        #endif
 +    }
 +
-+    xf86Msg(X_DEFAULT, "Matched %s for the autoconfigured driver\n", ptr->driver);
-+    ptr->active = TRUE;
-+    ptr->claimed = FALSE;
-+    /* TODO Handle multiple screen sections */
-+    if (xf86ConfigLayout.screens && !xf86ConfigLayout.screens->screen->device) {   
-+        xf86ConfigLayout.screens->screen->device = ptr;
-+        ptr->myScreenSection = xf86ConfigLayout.screens->screen;
-+    }
-+    xf86Msg(X_DEFAULT, "Assigned the driver to the xf86ConfigLayout\n");
++    xf86Msg(X_DEFAULT, "Matched %s for the autoconfigured driver\n", chosen_driver);
 +
++    end:
 +    i = 0;
 +    while (matches[i]) {
-+        if (matches[i] != ptr->driver) {
++        if (matches[i] != chosen_driver) {
 +            xfree(matches[i]);
 +        }
 +        i++;
 +    }
-+
-+    ptr->identifier = "Autoconfigured Video Device";
-+
-+    end:
 +    xfree(line);
 +    closedir(idsdir);
-+    return ptr;
++
++    return chosen_driver;
 +}
 Index: xorg-server/hw/xfree86/common/xf86Config.c
 ===================================================================
---- xorg-server.orig/hw/xfree86/common/xf86Config.c	2007-08-19 13:05:23.000000000 -0400
-+++ xorg-server/hw/xfree86/common/xf86Config.c	2007-08-19 13:05:54.000000000 -0400
+--- xorg-server.orig/hw/xfree86/common/xf86Config.c	2007-08-23 21:55:25.000000000 -0400
++++ xorg-server/hw/xfree86/common/xf86Config.c	2007-08-23 21:55:35.000000000 -0400
 @@ -1928,8 +1928,10 @@
  	    return FALSE;
      }
@@ -240,8 +251,8 @@ Index: xorg-server/hw/xfree86/common/xf86Config.c
      devicep->board = conf_device->dev_board;
 Index: xorg-server/hw/xfree86/common/xf86Config.h
 ===================================================================
---- xorg-server.orig/hw/xfree86/common/xf86Config.h	2007-08-19 13:05:23.000000000 -0400
-+++ xorg-server/hw/xfree86/common/xf86Config.h	2007-08-19 13:05:54.000000000 -0400
+--- xorg-server.orig/hw/xfree86/common/xf86Config.h	2007-08-23 21:55:25.000000000 -0400
++++ xorg-server/hw/xfree86/common/xf86Config.h	2007-08-23 21:56:38.000000000 -0400
 @@ -34,6 +34,8 @@
  #define _xf86_config_h
  
@@ -251,18 +262,19 @@ Index: xorg-server/hw/xfree86/common/xf86Config.h
  
  #ifdef HAVE_PARSER_DECLS
  /*
-@@ -76,5 +78,7 @@
+@@ -76,5 +78,8 @@
  ConfigStatus xf86HandleConfigFile(Bool);
  
  Bool xf86AutoConfig(void);
 +GDevPtr autoConfigDevice(void);
++char* chooseVideoDriver(void);
 +int xchomp(char *line);
  
  #endif /* _xf86_config_h */
 Index: xorg-server/hw/xfree86/common/xf86Init.c
 ===================================================================
---- xorg-server.orig/hw/xfree86/common/xf86Init.c	2007-08-19 13:05:23.000000000 -0400
-+++ xorg-server/hw/xfree86/common/xf86Init.c	2007-08-19 13:05:54.000000000 -0400
+--- xorg-server.orig/hw/xfree86/common/xf86Init.c	2007-08-23 21:55:25.000000000 -0400
++++ xorg-server/hw/xfree86/common/xf86Init.c	2007-08-23 21:55:35.000000000 -0400
 @@ -347,6 +347,15 @@
      }
  
@@ -281,8 +293,8 @@ Index: xorg-server/hw/xfree86/common/xf86Init.c
        xfree(modulelist);
 Index: xorg-server/hw/xfree86/parser/Screen.c
 ===================================================================
---- xorg-server.orig/hw/xfree86/parser/Screen.c	2007-08-19 13:05:23.000000000 -0400
-+++ xorg-server/hw/xfree86/parser/Screen.c	2007-08-19 13:05:54.000000000 -0400
+--- xorg-server.orig/hw/xfree86/parser/Screen.c	2007-08-23 21:55:25.000000000 -0400
++++ xorg-server/hw/xfree86/parser/Screen.c	2007-08-23 21:55:35.000000000 -0400
 @@ -526,15 +526,7 @@
  			}
  		}
@@ -302,8 +314,8 @@ Index: xorg-server/hw/xfree86/parser/Screen.c
  		while (adaptor)
 Index: xorg-server/hw/xfree86/parser/read.c
 ===================================================================
---- xorg-server.orig/hw/xfree86/parser/read.c	2007-08-19 13:05:23.000000000 -0400
-+++ xorg-server/hw/xfree86/parser/read.c	2007-08-19 13:05:54.000000000 -0400
+--- xorg-server.orig/hw/xfree86/parser/read.c	2007-08-23 21:55:25.000000000 -0400
++++ xorg-server/hw/xfree86/parser/read.c	2007-08-23 21:55:35.000000000 -0400
 @@ -80,8 +80,8 @@
  static int
  xf86validateConfig (XF86ConfigPtr p)



Reply to: