xserver: Branch 'master' - 2 commits

Keith Packard keithp at kemper.freedesktop.org
Mon Apr 29 09:11:34 PDT 2013


 hw/xfree86/modes/xf86Crtc.c |    5 +++--
 miext/shadow/c2p_core.h     |    4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 451ba4bd41b82acd4aec6236ba121e00cfeb311b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Jan 10 03:26:33 2013 +0000

    hw/xfree86: Only report SetDesiredModes() failed if at least one modeset fails
    
    commit 6703a7c7cf1a349c137e247a0c8eb462ff7b07be
    Author: Keith Packard <keithp at keithp.com>
    Date:   Tue Jan 8 20:24:32 2013 -0800
    
        hw/xfree86: Require only one working CRTC to start the server.
    
    changed the logic to try to set the mode on all connected outputs rather
    than abort upon the first failure. The return error code was then
    tweaked such that it reported success if it set a mode on any crtc.
    However, this confuses the headless case where we never enable any crtcs
    and also, importantly, never fail to set a crtc.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59190
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
    Also-written-by: Maarten Lankhorst <maarten.lankhorst at canonical.com>
    Reviewed-by: Keith Packard <keithp at keithp.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index e4b393c..d64f6bd 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2687,8 +2687,8 @@ xf86SetDesiredModes(ScrnInfoPtr scrn)
 {
     xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
     xf86CrtcPtr crtc = config->crtc[0];
+    int enabled = 0, failed = 0;
     int c;
-    int enabled = 0;
 
     /* A driver with this hook will take care of this */
     if (!crtc->funcs->set_mode_major) {
@@ -2748,11 +2748,12 @@ xf86SetDesiredModes(ScrnInfoPtr scrn)
                 if (config->output[o]->crtc == crtc)
                     config->output[o]->crtc = NULL;
             crtc->enabled = FALSE;
+            ++failed;
 	}
     }
 
     xf86DisableUnusedFunctions(scrn);
-    return enabled != 0;
+    return enabled != 0 || failed == 0;
 }
 
 /**
commit e779402d531625ba4ed5d628d06c6b1e06b2ec7b
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Apr 25 09:02:31 2013 -0700

    shadow: Define c2p_unsupported
    
    Just make this call BUG_WARN(1) to indicate that something unexpected
    happened
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/miext/shadow/c2p_core.h b/miext/shadow/c2p_core.h
index 252f93e..a48e223 100644
--- a/miext/shadow/c2p_core.h
+++ b/miext/shadow/c2p_core.h
@@ -41,7 +41,9 @@ static inline void _transp(CARD32 d[], unsigned int i1, unsigned int i2,
 }
 
 
-extern void c2p_unsupported(void);
+static inline void c2p_unsupported(void) {
+    BUG_WARN(1);
+}
 
 static inline CARD32 get_mask(unsigned int n)
 {


More information about the xorg-commit mailing list