diff -u xorg-server-1.7.6/debian/changelog xorg-server-1.7.6/debian/changelog --- xorg-server-1.7.6/debian/changelog +++ xorg-server-1.7.6/debian/changelog @@ -1,3 +1,10 @@ +xorg-server (2:1.7.6-1ubuntu2) lucid; urgency=low + + * Updated 111_armel-drv-fallbacks.patch to also add support for finding + dovefb devices in addition to imx51 ones. + + -- Michael Casadevall Fri, 26 Mar 2010 15:36:35 -0400 + xorg-server (2:1.7.6-1ubuntu1) lucid; urgency=low [Timo Aaltonen] diff -u xorg-server-1.7.6/debian/patches/111_armel-drv-fallbacks.patch xorg-server-1.7.6/debian/patches/111_armel-drv-fallbacks.patch --- xorg-server-1.7.6/debian/patches/111_armel-drv-fallbacks.patch +++ xorg-server-1.7.6/debian/patches/111_armel-drv-fallbacks.patch @@ -2,16 +2,11 @@ hw/xfree86/common/xf86AutoConfig.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) -Index: xorg-server-1.7.5/hw/xfree86/common/xf86AutoConfig.c +Index: xorg-server-1.7.6/hw/xfree86/common/xf86AutoConfig.c =================================================================== ---- xorg-server-1.7.5.orig/hw/xfree86/common/xf86AutoConfig.c -+++ xorg-server-1.7.5/hw/xfree86/common/xf86AutoConfig.c -@@ -39,16 +39,20 @@ - #include "xf86Config.h" - #include "xf86Priv.h" - #include "xf86_OSlib.h" - #ifdef __sparc__ - # include "xf86sbusBus.h" +--- xorg-server-1.7.6.orig/hw/xfree86/common/xf86AutoConfig.c 2010-03-26 17:29:54.536898573 -0400 ++++ xorg-server-1.7.6/hw/xfree86/common/xf86AutoConfig.c 2010-03-26 17:31:22.796899575 -0400 +@@ -44,6 +44,10 @@ #endif #include "dirent.h" @@ -22,36 +17,27 @@ #ifdef sun # include # include - #endif - - /* Sections for the default built-in configuration. */ - - #define BUILTIN_DEVICE_NAME \ -@@ -429,16 +433,37 @@ - direntry = readdir(idsdir); - } - end: - xfree(line); - closedir(idsdir); +@@ -433,6 +438,28 @@ } #endif /* __linux__ */ +#if defined(__arm__) && defined(__linux__) +static int -+test_imx_drv () ++test_sysfs_device (char * device_name, char * driver_name) +{ + DIR* dir = opendir("/sys/devices/platform"); + struct dirent *current_dir; ++ int len = strlen(device_name); + + while (current_dir = readdir(dir)) { -+ if (strlen(current_dir->d_name) >= 7 && strncmp("mxc_gpu", current_dir->d_name, 7) == 0) ++ if (strlen(current_dir->d_name) >= len && strncmp(device_name, current_dir->d_name, len) == 0) + break; + } + closedir(dir); + if(!current_dir) + return 0; + -+ if (!LoadModule("imx", NULL, NULL, NULL, NULL, NULL, NULL, NULL)) ++ if (!LoadModule(driver_name, NULL, NULL, NULL, NULL, NULL, NULL, NULL)) + return 0; + return 1; +} @@ -60,23 +46,15 @@ static void listPossibleVideoDrivers(char *matches[], int nmatches) { - struct pci_device * info = NULL; - struct pci_device_iterator *iter; - int i; - - for (i = 0 ; i < nmatches ; i++) { -@@ -540,17 +565,24 @@ - #endif - } - - /* Fallback to platform default frame buffer driver */ - if (i < (nmatches - 1)) { +@@ -544,7 +571,16 @@ #if !defined(__linux__) && defined(__sparc__) matches[i++] = xnfstrdup("wsfb"); #else +#if defined(__linux__) && defined(__arm__) -+ if (test_imx_drv()) ++ if (test_sysfs_device("mxc_gpu", "imx")) + matches[i++] = xnfstrdup("imx"); ++ else if (test_sysfs_device("dovefb", "dovefb")) ++ matches[i++] = xnfstrdup("dovefb"); + else + matches[i++] = xnfstrdup("fbdev"); +#else @@ -88,5 +65,0 @@ - - static char* - chooseVideoDriver(void) - { - char *chosen_driver = NULL;