diff options
author | Keith Packard <keithp@keithp.com> | 2012-09-10 11:14:20 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-09-19 15:48:12 +1000 |
commit | 37d956e3ac9513b74078882dff489f9b0a7a5a28 (patch) | |
tree | d0358ded270cc034567c16be7be7bb5262113e4b | |
parent | e0b92f5f86f8ce71ab4c80e9902e51e2525f9705 (diff) |
xf86: fix compat output selection for no output GPUs
This should work properly with dynamic outputs.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index e3eaf5f4c..177f7ac11 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]; } |