summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2013-04-30 14:30:18 -0700
committerDave Airlie <airlied@redhat.com>2013-07-12 11:24:34 +1000
commit54b125d1751385bcfc3c1b51d21ee6a7dc14143b (patch)
treea63577b3a588697c4fe722f4cbbaad6a4fd517f1
parent29545a422bbdd11fda5cb61f27720332d68d0c36 (diff)
xfree86: don't enable anything in xf86InitialConfiguration for GPU screens
There's no point in turning on outputs connected to GPU screens during initial configuration. Not only does this cause them to just display black, it also confuses clients when these screens are attached to a master screen and RandR reports that the outputs are already on. Also, don't print the warning about no outputs being found on GPU screens, since that's expected. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Dave Airlie <airlied@gmail.com> (cherry picked from commit dbfeaf70623a83e1a3f3255c94d52e0e04702837)
-rw-r--r--hw/xfree86/modes/xf86Crtc.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 5a07793ab..989595fee 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1908,6 +1908,14 @@ xf86CollectEnabledOutputs(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
Bool any_enabled = FALSE;
int o;
+ /*
+ * Don't bother enabling outputs on GPU screens: a client needs to attach
+ * it to a source provider before setting a mode that scans out a shared
+ * pixmap.
+ */
+ if (scrn->is_gpu)
+ return FALSE;
+
for (o = 0; o < config->num_output; o++)
any_enabled |= enabled[o] = xf86OutputEnabled(config->output[o], TRUE);
@@ -2377,9 +2385,11 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
ret = xf86CollectEnabledOutputs(scrn, config, enabled);
if (ret == FALSE && canGrow) {
- xf86DrvMsg(i, X_WARNING,
- "Unable to find connected outputs - setting %dx%d initial framebuffer\n",
- NO_OUTPUT_DEFAULT_WIDTH, NO_OUTPUT_DEFAULT_HEIGHT);
+ if (!scrn->is_gpu)
+ xf86DrvMsg(i, X_WARNING,
+ "Unable to find connected outputs - setting %dx%d "
+ "initial framebuffer\n",
+ NO_OUTPUT_DEFAULT_WIDTH, NO_OUTPUT_DEFAULT_HEIGHT);
have_outputs = FALSE;
}
else {