summaryrefslogtreecommitdiff
path: root/vmwgfx/vmwgfx_output.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2011-08-30 12:22:53 +0200
committerThomas Hellstrom <thellstrom@vmware.com>2011-08-31 14:39:21 +0200
commit3c2f9cc43f7d36952e78d10d224da0ba68ecefea (patch)
treec4b31562faf98ca2b2408c7a4d086983b0af3020 /vmwgfx/vmwgfx_output.c
parentf17abaa926fdbedab1e6236e109fa746fcc2320b (diff)
vmwgfx-xorg: Avoid enabling unwanted outputs in initial configuration
Add a hack so that we avoid enabling all connected outputs during the initial configuration. On older X servers they would be enabled as cloned, which didn't really cause any problem, but on later X servers they would initially be enabled next to eachother which looks odd. A RandR call will still show the disabled outputs as connected, and if there is a monitor section in the config file for the output in question, it will also have a connected status, so that it may be explicitly enabled or disabled from a config file. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Diffstat (limited to 'vmwgfx/vmwgfx_output.c')
-rw-r--r--vmwgfx/vmwgfx_output.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/vmwgfx/vmwgfx_output.c b/vmwgfx/vmwgfx_output.c
index 2081f2a..5ec84a1 100644
--- a/vmwgfx/vmwgfx_output.c
+++ b/vmwgfx/vmwgfx_output.c
@@ -104,7 +104,25 @@ output_detect(xf86OutputPtr output)
switch (drm_connector->connection) {
case DRM_MODE_CONNECTED:
- status = XF86OutputStatusConnected;
+ /*
+ * Hack to avoid enabling outputs during the intial
+ * configuration that are connected but that we don't
+ * really want to have enabled just yet.
+ *
+ * If we are in initial config, and
+ * an output higher than LVDS1 is connected,
+ * and it has no monitor section in the config file,
+ * status will be reported as unknown, which means
+ * the xorg modesetting code will think it is
+ * disconnected.
+ */
+
+ if (ms->initialization &&
+ drm_connector->connector_type_id != 1 &&
+ !output->conf_monitor)
+ status = XF86OutputStatusUnknown;
+ else
+ status = XF86OutputStatusConnected;
break;
case DRM_MODE_DISCONNECTED:
status = XF86OutputStatusDisconnected;