xserver: Branch 'master' - 4 commits

Keith Packard keithp at kemper.freedesktop.org
Wed Sep 19 16:27:30 PDT 2012


 config/udev.c                       |    8 +++++++-
 hw/xfree86/common/xf86Bus.c         |    4 ++++
 hw/xfree86/common/xf86platformBus.c |    6 +++++-
 hw/xfree86/modes/xf86Crtc.c         |    3 ++-
 4 files changed, 18 insertions(+), 3 deletions(-)

New commits:
commit 70e5766874a919039678bb2ed75f2ccea0cb4345
Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Aug 27 15:22:44 2012 +1000

    xf86: fix multi-seat video device support. (v2)
    
    If we are not seat 0 the following apply:
    
    don't probe any bus other than platform
    don't probe any drivers other than platform
    assume the first platform device we match on the bus is the primary GPU.
    
    This just adds checks in the correct places to ensure this, and
    with this X can now start on a secondary seat for an output device.
    
    v2: fix Seat0 macros
    Reviewed-by: Keith Packard <keithp at keithp.com>
    Signed-off-by: Dave Airlie <airlied at redhat.com>

diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 6de8409..4ffbf7e 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -81,6 +81,8 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only)
     if (drv->platformProbe != NULL) {
         foundScreen = xf86platformProbeDev(drv);
     }
+    if (ServerIsNotSeat0())
+        return foundScreen;
 #endif
 
 #ifdef XSERVER_LIBPCIACCESS
@@ -214,6 +216,8 @@ xf86BusProbe(void)
 {
 #ifdef XSERVER_PLATFORM_BUS
     xf86platformProbe();
+    if (ServerIsNotSeat0())
+        return;
 #endif
 #ifdef XSERVER_LIBPCIACCESS
     xf86PciProbe();
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 6a8fb90..0525e39 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -359,6 +359,9 @@ xf86platformProbeDev(DriverPtr drvp)
                     break;
             }
             else {
+                /* for non-seat0 servers assume first device is the master */
+                if (ServerIsNotSeat0())
+                    break;
                 if (xf86_platform_devices[j].pdev) {
                     if (xf86IsPrimaryPlatform(&xf86_platform_devices[j]))
                         break;
commit 37d956e3ac9513b74078882dff489f9b0a7a5a28
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Sep 10 11:14:20 2012 +1000

    xf86: fix compat output selection for no output GPUs
    
    This should work properly with dynamic outputs.
    
    Reviewed-by: Dave Airlie <airlied at redhat.com>
    Signed-off-by: Dave Airlie <airlied at redhat.com>

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index e3eaf5f..177f7ac 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -66,6 +66,7 @@ xf86CrtcConfigInit(ScrnInfoPtr scrn, const xf86CrtcConfigFuncsRec * funcs)
     config = xnfcalloc(1, sizeof(xf86CrtcConfigRec));
 
     config->funcs = funcs;
+    config->compat_output = -1;
 
     scrn->privates[xf86CrtcConfigPrivateIndex].ptr = config;
 }
@@ -1841,7 +1842,7 @@ SetCompatOutput(xf86CrtcConfigPtr config)
     if (compat >= 0) {
         config->compat_output = compat;
     }
-    else {
+    else if (config->compat_output >= 0 && config->compat_output < config->num_output) {
         /* Don't change the compat output when no valid outputs found */
         output = config->output[config->compat_output];
     }
commit e0b92f5f86f8ce71ab4c80e9902e51e2525f9705
Author: Dave Airlie <airlied at gmail.com>
Date:   Thu Sep 13 18:44:06 2012 +1000

    config/udev: ignore change on drm devices
    
    for input devices we handle change like remove/add, but for
    drm devices we get change events when we hotplug outputs,
    so lets just ignore change at this level, and let the drivers
    handle it. We may in the future want to route driver udev
    from here instead.
    
    Reported-by: Timo Aaltonen <timo.aaltonen at canonical.com>
    Reviewed-by: Keith Packard <keithp at keithp.com>
    Signed-off-by: Dave Airlie <airlied at redhat.com>

diff --git a/config/udev.c b/config/udev.c
index c2d00bb..454838f 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -300,9 +300,15 @@ wakeup_handler(pointer data, int err, pointer read_mask)
             return;
         action = udev_device_get_action(udev_device);
         if (action) {
-            if (!strcmp(action, "add") || !strcmp(action, "change")) {
+            if (!strcmp(action, "add")) {
                 device_removed(udev_device);
                 device_added(udev_device);
+            } else if (!strcmp(action, "change")) {
+                /* ignore change for the drm devices */
+                if (strcmp(udev_device_get_subsystem(udev_device), "drm")) {
+                    device_removed(udev_device);
+                    device_added(udev_device);
+                }
             }
             else if (!strcmp(action, "remove"))
                 device_removed(udev_device);
commit 10672a5abe7d4e924844d7e41c86c24d6367a52b
Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Sep 10 14:48:37 2012 +1000

    xf86/platform: scan pci after probing devices
    
    This solves a race if we are trying to dynamically power off
    secondary GPUs. Its not the greatest fix ever but it probably
    as good as we can do for now.
    
    The GPU probing causes the devices to be powered up, then when
    we scan the PCI bus we get the correct information from the kernel,
    rather than a bunch of 0xff due to the device being powered off.
    
    drop gratuitous '&'.
    
    Reviewed-by: Keith Packard <keithp at keithp.com>
    Signed-off-by: Dave Airlie <airlied at redhat.com>

diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 24b9473..6a8fb90 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -213,11 +213,12 @@ xf86platformProbe(void)
     int i;
     Bool pci = TRUE;
 
+    config_odev_probe(xf86PlatformDeviceProbe);
+
     if (!xf86scanpci()) {
         pci = FALSE;
     }
 
-    config_odev_probe(&xf86PlatformDeviceProbe);
     for (i = 0; i < xf86_num_platform_devices; i++) {
         char *busid = xf86_get_platform_attrib(i, ODEV_ATTRIB_BUSID);
 


More information about the xorg-commit mailing list