EE Xorg.bin xf86PlatformMatchDriver - Segmentation fault - Server aborting

poma pomidorabelisima at gmail.com
Fri Sep 5 14:19:14 PDT 2014


...

- xorg-x11-server-Xorg-1.16.99.1-1.fc21.x86_64
  commit 3a51418
  *auto-detection* PASSED

- xorg-x11-server-Xorg-1.16.99.1-2.fc21.x86_64
  commit 3a51418 + xorg-non-pci-v2.patch[1] (rebased xorg-non-pci.patch)
  *auto-detection* BROKEN

/var/log/Xorg.0.log
[    29.408] 
This is a pre-release version of the X server from Fedora Project.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the "xorg" product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the X.Org Foundation git repository.
See http://wiki.x.org/wiki/GitPage for git access instructions.
[    29.409] 
X.Org X Server 1.16.99.1
Release Date: 2014-07-17
[    29.409] X Protocol Version 11, Revision 0
[    29.409] Build Operating System: lnx 3.17.0-0.rc3.git0.1.fc22.x86_64 
[    29.409] Current Operating System: Linux rawhide642 3.17.0-0.rc3.git0.1.fc22.x86_64 #1 SMP Mon Sep 1 14:47:34 UTC 2014 x86_64
[    29.409] Kernel command line: BOOT_IMAGE=/vmlinuz-3.17.0-0.rc3.git0.1.fc22.x86_64 root=UUID=a07556d2-6fe2-417f-8202-c54c07fd9386 drm_kms_helper.edid_firmware=DVI-I-1:edid/848x480.bin  initrd=/initramfs-3.17.0-0.rc3.git0.1.fc22.x86_64.img
[    29.409] Build Date: 05 September 2014  09:11:28PM
[    29.410] Build ID: xorg-x11-server 1.16.99.1-2.fc21 
[    29.410] Current version of pixman: 0.32.6
[    29.410] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[    29.410] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    29.411] (==) Log file: "/var/log/Xorg.0.log", Time: Fri Sep  5 22:40:21 2014
[    29.411] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    29.426] (==) No Layout section.  Using the first Screen section.
[    29.426] (==) No screen section available. Using defaults.
[    29.426] (**) |-->Screen "Default Screen Section" (0)
[    29.427] (**) |   |-->Monitor "<default monitor>"
[    29.427] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[    29.427] (==) Automatically adding devices
[    29.427] (==) Automatically enabling devices
[    29.427] (==) Automatically adding GPU devices
[    29.428] (==) FontPath set to:
	catalogue:/etc/X11/fontpath.d,
	built-ins
[    29.428] (==) ModulePath set to "/usr/lib64/xorg/modules"
[    29.428] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[    29.428] (II) Loader magic: 0x81be40
[    29.428] (II) Module ABI versions:
[    29.428] 	X.Org ANSI C Emulation: 0.4
[    29.428] 	X.Org Video Driver: 18.0
[    29.428] 	X.Org XInput driver : 21.0
[    29.428] 	X.Org Server Extension : 8.0
[    29.434] (EE) systemd-logind: failed to get session: PID 655 does not belong to any known session
[    29.435] (II) xfree86: Adding drm device (/dev/dri/card1)
[    29.436] (II) xfree86: Adding drm device (/dev/dri/card0)
[    29.460] (--) PCI:*(0:1:0:0) 10de:087d:1849:087d rev 177, Mem @ 0xfb000000/16777216, 0xe0000000/268435456, 0xf6000000/33554432, I/O @ 0x0000ec00/128, BIOS @ 0x????????/131072
[    29.461] (II) LoadModule: "glx"
[    29.462] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[    29.487] (II) Module glx: vendor="X.Org Foundation"
[    29.487] 	compiled for 1.16.99.1, module version = 1.0.0
[    29.488] 	ABI class: X.Org Server Extension, version 8.0
[    29.488] (==) AIGLX enabled
[    29.488] (EE) 
[    29.488] (EE) Backtrace:
[    29.490] (EE) 0: /usr/libexec/Xorg.bin (OsSigHandler+0x29) [0x59ab89]
[    29.491] (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x7f0d482947cf]
[    29.492] (EE) 2: /usr/libexec/Xorg.bin (xf86PlatformMatchDriver+0x31d) [0x49a3fd]
[    29.494] (EE) 3: /usr/libexec/Xorg.bin (listPossibleVideoDrivers.constprop.0+0x3d) [0x49d54d]
[    29.508] (EE) 4: /usr/libexec/Xorg.bin (autoConfigDevice+0xfe) [0x49da3e]
[    29.509] (EE) 5: /usr/libexec/Xorg.bin (InitOutput+0xb56) [0x47b9e6]
[    29.510] (EE) 6: /usr/libexec/Xorg.bin (dix_main+0x1ea) [0x43cd5a]
[    29.512] (EE) 7: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7f0d47edd0e0]
[    29.514] (EE) 8: /usr/libexec/Xorg.bin (_start+0x29) [0x4273ae]
[    29.516] (EE) 9: ? (?+0x29) [0x29]
[    29.516] (EE) 
[    29.516] (EE) Segmentation fault at address 0x0
[    29.517] (EE) 
Fatal server error:
[    29.517] (EE) Caught signal 11 (Segmentation fault). Server aborting
[    29.517] (EE) 
[    29.517] (EE) 
Please consult the Fedora Project support 
	 at http://wiki.x.org
 for help. 
[    29.517] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    29.517] (EE) 


[1] xorg-non-pci-v2.patch

diff -ur a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
--- a/hw/xfree86/common/xf86Init.c	2014-09-05 17:48:49.000000000 +0200
+++ b/hw/xfree86/common/xf86Init.c	2014-09-05 20:21:25.627416201 +0200
@@ -544,10 +544,18 @@
             if (xf86DriverList[i]->Identify != NULL)
                 xf86DriverList[i]->Identify(0);
 
-            if (xf86DriverList[i]->driverFunc)
+            if (xf86DriverList[i]->driverFunc) {
                 xf86DriverList[i]->driverFunc(NULL,
                                               GET_REQUIRED_HW_INTERFACES,
                                               &flags);
+                /* also let the driver know that it is safe to
+                 * allow platformProbe() to claim the device
+                 * if it is a non-pci platform device:
+                 */
+                xf86DriverList[i]->driverFunc(NULL,
+                                              SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS,
+                                              NULL);
+            }
 
             if (NEED_IO_ENABLED(flags))
                 want_hw_access = TRUE;
diff -ur a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
--- a/hw/xfree86/common/xf86platformBus.c	2014-09-05 17:48:49.000000000 +0200
+++ b/hw/xfree86/common/xf86platformBus.c	2014-09-05 20:38:47.619819642 +0200
@@ -237,6 +237,41 @@
     return i;
 }
 
+static int
+find_non_pci_driver(const char *busid, char *returnList[], int returnListMax)
+{
+    /* Add more entries here if we ever return more than 4 drivers for
+       any device */
+    const char *driverList[5] = { NULL, NULL, NULL, NULL, NULL };
+    int i = 0;
+    char *p, *s;
+
+    s = xstrdup(busid);
+    p = strtok(s, ":");
+
+    if (strcmp(p, "platform"))
+        goto out;
+
+    /* extract device name: */
+    p = strtok(NULL, ":");
+
+    /* check for special cases where DDX driver name does not match busid: */
+    if (!strcmp(p, "mdp")) {
+        driverList[i++] = "freedreno";
+    }
+
+    /* add name derived from busid last: */
+    driverList[i++] = p;
+
+    for (i = 0; (i < returnListMax) && (driverList[i] != NULL); i++) {
+        returnList[i] = xnfstrdup(driverList[i]);
+    }
+
+out:
+    free(s);
+    return i;                   /* Number of entries added */
+}
+
 /**
  *  @return The numbers of found devices that match with the current system
  *  drivers.
@@ -267,6 +302,9 @@
 
             if ((info != NULL) && (j < nmatches)) {
                 j += xf86VideoPtrToDriverList(info, &(matches[j]), nmatches - j);
+            } else if (j < nmatches) {
+                char *busid = xf86_platform_odev_attributes(i)->busid;
+                j += find_non_pci_driver(busid, &(matches[j]), nmatches - j);
             }
         }
     }
@@ -285,6 +323,9 @@
         pci = FALSE;
     }
 
+    /* First pass, look for PCI devices.  If we find a suitable
+     * PCI device that takes priority.
+     */
     for (i = 0; i < xf86_num_platform_devices; i++) {
         char *busid = xf86_platform_odev_attributes(i)->busid;
 
@@ -292,6 +333,24 @@
             platform_find_pci_info(&xf86_platform_devices[i], busid);
         }
     }
+
+    /* if we found something, we are done: */
+    if (primaryBus.type != BUS_NONE)
+        return 0;
+
+    /* Second pass, look for real platform devices (ie. in the linux-
+     * kernel sense of platform device.. something that is not pci)
+     */
+    for (i = 0; i < xf86_num_platform_devices; i++) {
+        char *busid = xf86_platform_odev_attributes(i)->busid;
+
+        if (strncmp(busid, "platform:", 9) == 0) {
+            primaryBus.type = BUS_PLATFORM;
+            primaryBus.id.plat = &xf86_platform_devices[i];
+            break;
+        }
+    }
+
     return 0;
 }
 
diff -ur a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
--- a/hw/xfree86/common/xf86str.h	2014-09-05 17:48:49.000000000 +0200
+++ b/hw/xfree86/common/xf86str.h	2014-09-05 20:18:52.805726572 +0200
@@ -258,6 +258,7 @@
     RR_GET_MODE_MM,
     GET_REQUIRED_HW_INTERFACES = 10,
     SUPPORTS_SERVER_FDS = 11,
+    SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS = 12
 } xorgDriverFuncOp;
 
 typedef Bool xorgDriverFuncProc(ScrnInfoPtr, xorgDriverFuncOp, void *);


poma




More information about the xorg-devel mailing list