[PATCH] Require only one working CRTC to start the server.
Keith Packard
keithp at keithp.com
Tue Jan 8 17:19:42 PST 2013
Instead of requiring every mode set to complete successfully, start up
as long as at least one CRTC is working. This avoids failures when one
or more CRTCs can't start due to mode setting conflicts.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
hw/xfree86/modes/xf86Crtc.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index aac33d3..83af6a6 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2618,6 +2618,7 @@ xf86SetDesiredModes (ScrnInfoPtr scrn)
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
xf86CrtcPtr crtc = config->crtc[0];
int c;
+ int enabled = 0;
/* A driver with this hook will take care of this */
if (!crtc->funcs->set_mode_major) {
@@ -2671,13 +2672,19 @@ xf86SetDesiredModes (ScrnInfoPtr scrn)
transform = &crtc->desiredTransform;
else
transform = NULL;
- if (!xf86CrtcSetModeTransform (crtc, &crtc->desiredMode, crtc->desiredRotation,
- transform, crtc->desiredX, crtc->desiredY))
- return FALSE;
+ if (xf86CrtcSetModeTransform (crtc, &crtc->desiredMode, crtc->desiredRotation,
+ transform, crtc->desiredX, crtc->desiredY)) {
+ ++enabled;
+ } else {
+ for (o = 0; o < config->num_output; o++)
+ if (config->output[o]->crtc == crtc)
+ config->output[o]->crtc = NULL;
+ crtc->enabled = FALSE;
+ }
}
xf86DisableUnusedFunctions(scrn);
- return TRUE;
+ return enabled != 0;
}
/**
--
1.7.9.5
More information about the xorg-devel
mailing list