Fixes regression on xserver 1.14 introduced by 6703a7c7cf1a. "hw/xfree86: Require only one working CRTC to start the server."
https://bugs.freedesktop.org/show_bug.cgi?id=62916 Without any crtc's enabled, 1.13 worked correctly, but the logic in xf86SetDesiredModes will now return false instead. Fix this to return success if all outputs were already disabled. Signed-off-by: Maarten Lankhorst <[email protected]> --- diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index f9ae465..eb72f0e 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -2599,7 +2599,7 @@ xf86SetDesiredModes(ScrnInfoPtr scrn) xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); xf86CrtcPtr crtc = config->crtc[0]; int c; - int enabled = 0; + int enabled = 0, failed = 0; /* A driver with this hook will take care of this */ if (!crtc->funcs->set_mode_major) { @@ -2659,11 +2659,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; } /** _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
